Hi
I am trying to back test a system that looks at a stock at its open on a particular day ---say " P- zero" and then enters into trades over the next five days based on how the stock has moved in relation to the stock at "P-zero". It then has a timed exit based on" P-zero1". Do i need to use a data series notation in order to do this or do i not have to be concerned about peeking when buying? Or am i altogether clueless!
Size:
Color:
No. Here's a design pattern that you need to implement this sort of condition:
Tutorial: Setups, Triggers, Delays, and TimeoutsAnd below is an example of coding your strategy's rules based on that design pattern. Let's say your " P- zero" occurs when a stock is having a lowest open in 10 days. Then for 5 days you wait until the stock opens above the previous day's High. If that happens, you buy and install a 10-day timed exit; otherwise you don't enter and wait for next setup.
CODE:
Please log in to see this code.
Size:
Color: