My Strategy calls Indicator that give trade signals. Lets just say it has Longentry and Shortentry signals. It works well, I plot the signal on the Indicator, calling LgSignal.Set command when longentry signal is given, and LgSignal.Reset when no longsignal is given, on each BarUpdate. And on the Strategy signals are detected calling condition testing Indicator.LgSignal.ContainsValue(0), I print out the signals, they match up. However, not often but every now and then, a signal is missed. Ie. It is shown on my Indicator but the Strategy debugging tell me, ContainsValue test returning false.
Further, during debugging, I found, even when a signal is detected at Strategy, on the same BarUpdate, Reset values are detected within same BarUpdate. I included herewith a Indicator Plots showing three signals, Ex5, ExL1, EnL7. And Strategy output showing prints at each OnBarUpdate. I also print out the signals when containsvalue return false. Ie. the value of signal.Reset().
My questions:
1. How could signal EnL7 be missed?
2. Why is reset values detected during the same OnBarUpdate when valid signal is given?
My Strategy code does not execute print value of same direction when containsvalue already return true so this seems to suggest it can only happens, if OnBarUpdate routine is called twice on each BarUpdate.
I hope your answer would give me a good understanding to solve the issue.
Thanks.
Regards.
Edwardk.

Comment