How to get partial bar value for weekly, monthly data?
Author: kelvinyip
Creation Date: 9/4/2019 11:57 AM
profile picture

kelvinyip

#1
Eugene

I am able to fetch partialValue for my 30min timeframe data before the full bar is formed.
Is there any easy way to fetch partialValue for weekly and monthly in the same strategy ?My symbol for the loop would be SPY 30 mins? I want to check my weekly, monthly , daily in realtime before the bar is fully formed.

If I do SetScaleWeekly(); I can only access the bar already formed (last week) not this week (not formed yet). I can go back using 30 mins data to reconstruct my open, high for current week /month but before I do that, I want to check with you to see if you have a less painful way.
profile picture

Eugene

#2
QUOTE:
I can go back using 30 mins data to reconstruct my open, high for current week /month

That's the way to go.

Out of curiosity, why would you want to do this?
profile picture

Eugene

#3
Strategy code from post #3 by Starburst might help:

Plot weekly data on to an intraday chart
profile picture

kelvinyip

#4
I want to generate signal if the partial bar shows certainly week AND monthly AND daily AND intraday pattern
profile picture

Eugene

#5
Until the Weeekly/Monthly bar is finally formed your signal may get canceled and resumed many times. Anyway it's up to you.
profile picture

kelvinyip

#6
yeah i know.. intraday trade with stops no worries
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).