This website uses cookies to enhance site navigation, analyze site usage, and assist in our marketing efforts. By clicking “Accept All” you are providing your consent to our use of all cookies. Alternatively, please provide your choice by pressing “Customize Cookies”. For more information, please read our Privacy policy
Zocchi
31 Jul 2024, 07:55 ( Updated at: 01 Aug 2024, 06:21 )
RE: OnTick() gives me penultimate profit/loss
PanagiotisCharalampous said:
Can you perhaps elaborate on this a little?
On the screenshot you can see that it does not work.
I tried this: (https://help.ctrader.com/ctrader-algo/references/EventArgs/TicksTickEventArgs/)
private void Ticks_Tick(TicksTickEventArgs args){
MessageBox.Show(Positions[0].NetProfit.ToString());
}
And this: (https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolTickEventArgs/?h=symboltickeventargs)
private void Ticks_Tick(SymbolTickEventArgs args){
MessageBox.Show(Positions[0].NetProfit.ToString());
}
But I always get the profit of the older price...
@Zocchi