BarsSinceEntry value

Questions about MultiCharts and user contributed studies.
youn56
Posts: 46
Joined: 29 Mar 2012
Has thanked: 13 times
Been thanked: 6 times

BarsSinceEntry value

Postby youn56 » 28 Apr 2012

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,
MC BarsSinceEntry.png
(8.51 KiB) Downloaded 280 times

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: BarsSinceEntry value

Postby JoshM » 28 Apr 2012

For the "entryprice", it takes the value as soon as the buy bar is ended.
I thought this was something 'by design', but I'm not sure about that. Have you tried AvgEntryPrice?

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?

youn56
Posts: 46
Joined: 29 Mar 2012
Has thanked: 13 times
Been thanked: 6 times

Re: BarsSinceEntry value

Postby youn56 » 01 May 2012

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.


Return to “MultiCharts”