Please,
Let me know something :
I would like to know if i'm right or not with the initializing of the strategy informations.
As you can see to the joined picture, the "barssinceentry" can have a different value if MC is in realtime mode or in backtest mode. For the "entryprice", it takes the value as soon as the buy bar is ended.
I'm in AA mode and the IOG is disabled.
Regards,
BarsSinceEntry value
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: BarsSinceEntry value
I thought this was something 'by design', but I'm not sure about that. Have you tried AvgEntryPrice?For the "entryprice", it takes the value as soon as the buy bar is ended.
Regarding the BarsSinceEntry, I don't know (don't use those in real-time trading). Have you tried it's 'brother' PosTradeEntryBar?
Can you share a code example that causes this wrong behavior?
Re: BarsSinceEntry value
Thanks JoshM,
After vérification, I was wrong. The "barsSinceEntry" takes the same value in realtime mode and in the offline mode. The bar on which a buy limit (or stop) is filled is the bar number 0.
After vérification, I was wrong. The "barsSinceEntry" takes the same value in realtime mode and in the offline mode. The bar on which a buy limit (or stop) is filled is the bar number 0.