Couple of questions reg. same day execution
1) If i use GetSessionOpen(bar+1) in my Buy condition and set schedule strategy monitor to execute mid-day on a Daily strategy (US stocks data-set), will it alert and stage orders mid-day?
e.g. if (GetSessionOpen(bar+1)>Low[bar] && GetSessionOpen(bar+1)<<High[bar]) BuyAtLimt(bar+1)
2) Is there mid-day (partial bar OLHC) data available from either Fidelity or other static data providers I can use in this strategy? Would like to evaluate partial-day bar Indicator[bar+1] that uses Open and mid-day Close in my Buy condition if possible
thanks
Kiran
Size:
Color:
1) Why not? GetSessionOpen is already OK to run shortly after the market open.
2) In theory, accessing partial bar OHLC data is possible using Yahoo! (Wealth-Lab User Guide > Data > Data Manager > Create New DataSet > Data Providers > Yahoo!)
Size:
Color:
Currently, my strategy Buy condition references bar+1 (sample code below) and it backtests without spitting errors (i recognize that it's not fully accurate as partial bars can reverse direction). If I activate this strategy in the Strategy Monitor to generate mid-day alerts and Yahoo's partial bar-capable Daily data ..
1) how does my strategy code need to change to import the partial bar and evaluate the "partial Close"? Will the strategy monitor handle that seamlessly when it gets scheduled?
2) Also, where do i include GetSessionOpen function?
CODE:
Please log in to see this code.
Size:
Color:
CODE:
Please log in to see this code.
Since the trade (limit order) must occur sometime during bar + 1, this condition requires a crystal ball and therefore cannot be used.
What <value> should be used? What does the limit trigger price depend on?
Did you review the design pattern (example) for using GetSessionOpen in the QuickRef (F11)?
Size:
Color:
QUOTE:
this condition requires a crystal ball and therefore cannot be used.
Let me disagree, with Y! partial bar data updated during the day it can work w/o peeking. However, since the logic highly depends on execution time (mid-day), you really should not be coding it this way i.e. as a EOD strategy. It's not backtestable w/lo looking at a lower bar scale. IMO, it should be converted into a pure intraday strategy.
Size:
Color:
It would work only on the last partial bar, but this was not specified and there really isn't a good way to enforce that condition for a trade that actually took place. Agreed that it must be an intraday strategy.
Size:
Color:
Thanks - i'll go the Intraday route. Couple of questions
- Is there an equivalent of Bars.IntradayBarNumber function for large intraday intervals such as 60 minutes e.g. a Bars.IntraLargeIntervalBarNumber(60) ?
- Also, want to see if trades correlate better with some fundamental indicators (P/E ratios, etc) - how do i project those on the Analysis tab in Performance Visualizers?
Size:
Color:
1 - I'm sure it would be there if the developers saw some point in that. ;)
2 - Follow the User Guide (Preferences > Performance Visualizers >
Analysis Series) and
Wiki tutorial.
Size:
Color: