I have a question regarding the Doji usage in a strategy.I want to keep a strategy triggering signal per current bar,but wouldn`t want it to get jerky - back and forth,when and if the price level would stick at the doji level.How do i prevent the strategy,or in the indicator,from multiple alternations?Let`s say,i want it to alternate only one time - from long to short,or from short to long and then quit for the current bar.
for,e.g,here is the snippet:
if(Low[0] < Open[0] && Close[0] > Open[0] )
{enter a position}
else if(High[0] > Open[0] && Close[0] < Open[0] )
{enter a position}
Thank you!
Comment