I want to calculate the entry of a position and have successfully completed the historical part.
Therefore I am aware that I have to respect different conditions for the entry signal and the sequence signal.
Realtime I still have problems. I cannot understand which entry price I have to use.
In my opinion, the CurrentAsk would be correct if the entry condition is given.
Currently I work with Close [0], which is most often correct.
This usually works but not always; attached an tick - evaluation.
12.09.2019 13:59:00 Close[0] 12418 Close[1] 12419 Open[0] 12418,5 Open[1] 12427,5 mybid 12417,5 myask 12419 calcEntryPriceLong 12418,5 tradedEntryPriceLong 12419,5
12.09.2019 14:06:00 Close[0] 12417,5 Close[1] 12417 Open[0] 12417,5 Open[1] 12428,5 mybid 12416,5 myask 12417,5 calcEntryPriceLong 12417,5 tradedEntryPriceLong 12417,5
tradeEntryPriceLong equals Position.AveragePrice (green Target and Stopp)
At 13:59, the tradedEntryPrice (Entry from NT8) is derived neither from
the current or previous Close, the current or previous Open or from the Current ASK / BID !?
So my question: What is the correct starting price in a real-time position?
I am aware that the calculation of the entry price also depends on the fill of the position.
Currently I calculate and simulate.
I'll deal with the necessary adjustments in live trading later.
In any case, the programming must be correct first.
THANK YOU!
Comment