Strategy Not Working On Chart

marktcoleman

Newbie
Messages
3
Likes
0
I have written a very simple EL strategy and inserted it onto a chart. The chart goes back 600 bars and has a paintbar applied that uses the same logic as the strategy.

No orders are taken although most charts have 4-8 paintbars with the condition met.

I inserted some print statements in the EL to try to debug in the output bar but nothing printed.

It seems as though TS is not even running this strategy.

Any suggestions will be appreciated.

Thank you,

Mark Coleman
Minneapolis, MN
 
Found the Problem

On the Format Properties for All tab I had set the 'Maximum Number of bars Study Will Reference' to 600 (the same as the bars in the chart). I changed it to five (since I my code was only looking back 5 candles) and voila - it worked !

Hope this helps someone else struggling with this problem that leaves few clues.

Cheers,

Mark
 
You were telling the code to wait for N bars before being allowed to start. 'Maximum Number of bars Study Will Reference' or MaxBarsBack is what you will set for a strategy and indicator in the charts and you will set it to be the minimum amount of bars necessary for the study to begin. This is a fairly common misconception with using TradeStation.
 
Top