Hi, I am new to WLP and am trying to come up to speed by doing some simple trades. I have noticed that it appears when using the rules engine all trades are set to occur 3 bars after the actual formula should have triggered the trade (int bar = 1; bar < Bars.Count; bar+).
It appears that you can move that up a few bars by editing the code “bar + 1” to “bar + 0” but it still lags a bar when it triggers which in today’s market can make the difference in the strategy.
I called Fidelity WLP help and they said they had heard about this but had no idea and never got back to me.
Questions:
a) is there a reason behind this?
b) Is there a way to get the transaction to occur when the mathematical event actually happens on that bar?
c) Am I missing something here?
Thanks
Size:
Color:
Trades do not occur 3 bars after, rather on the following bar. Editing the code to "bar+0" should only be made when you really understand what you're doing, otherwise it will create a peeking effect. See
Knowledge Base -> Peeking for more details.
QUOTE:
b) Is there a way to get the transaction to occur when the mathematical event actually happens on that bar?
Probably there is misunderstanding here. A mathematical event that utilizes this bar's prices, such as the EMA turning up or down, isn't happened until after the bar is closed.
For some indicators it's possible to
reverse engineer the target price:
RevEngRSIRevEngSMA_TC (Tomorrow's Close)
Size:
Color:
Size:
Color: