Recording the Moving Average value at OrderOpenTime
simoncs:
I would like to be able to capture the Moving average value at the time of Order.
I was using ibarshift to convert OrderOpenTime to a bar value to use in iMA, but I have noticed that the MA value continues to calculate until the bar of the timeframe selected closes. Is there a way to prevent this?
- So capture it at the time you open the order.
- Of course, it does. Stopping it would be breaking the indicator.
Thanks WHR - I think those are for MQL5?
After a rest, i thought to change the iMA to calculate on Open prices rather than Close. I appreciate it changes the calc of the MA, but for my purposes this is better as then the MA value will be static at the time of entry.
Hi
I would like to be able to capture the Moving average value at the time of Order.
I was using ibarshift to convert OrderOpenTime to a bar value to use in iMA, but I have noticed that the MA value continues to calculate until the bar of the timeframe selected closes. Is there a way to prevent this?
ExtZZSwingTF is the timeframe - 15mins in this case.