David Diez:
Have this code to get Breakeven from a deal:
By the way, it doesn't work if there's just an order, so I set BE=OP as default.
So how should I set the code to filter when it's more than one order on the same symbol in the same direction from a single chart?
Tried this, but unsuccesful:
Thank you in advance.
Hi all, nobody responded but it's quite simple and gonna let the solution here for everyone who needs:
double Breakeven=0,Volume=0; Volume+=OrderLots(); // Get volume total by OrderLots() sum. Breakeven+=(OrderLots()*OrderOpenPrice())/Volume; // Get breakeven for open positions.
Orders must be
same symbol and directionto work properly.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Have this code to get Breakeven from a deal:
double Breakeven+=Volume*OrderLots;
By the way, it doesn't work if there's just an order, so I set BE=OP as default.
So how should I set the code to filter when it's more than one order on the same symbol in the same direction from a single chart?
Tried this, but unsuccesful:
Thank you in advance.