- I am trying to code a MA crossover EA-Looking for Assistance with the Code
- How to sum the total of the losses for the closed orders as long as the orders closes at losses
- Indicators: Open Positions Indi
barnacle7:
I am trying to " sum " the pips of all/Several open sell trades, To get a running " total " in pips . any assistance to how I can achieve this is appreciated. Thanks
I am trying to " sum " the pips of all/Several open sell trades, To get a running " total " in pips . any assistance to how I can achieve this is appreciated. Thanks
digits jpy currency and eurusd are not same digits
if you trade 0.6 lots or 0.17 lots and both trades are 5oo pips profit what is in that case pipsprofit ??
bid price is only correct if currency is chartsymbol ()
and why do you make double sumx inside your loop and also sumis
is OrderTicket() a double ???? if not why do you make ticket double
Look for iExposure if you want that summing pips
to my opinion sum of pips has no sense a pip eurusd and pip other currency mostly not same value
use SRC button in the right way
also reread the book your coding is awful
Replace this
if(sell>0) { double sumx; double sumis; // for(int mts=0; mts<sell; mts++) // { sumis=pipsare; sumx=sumis+pipsare; Alert(" Ticket ",ticket," pipsare ",DoubleToStr(pipsare,2)," TotalOpen trade Pips ",DoubleToStr(sumx,2)," Lots ",lotsare); // } }
With this
int TotalPips=TotalPips+pipsare;
Also puting the alert in the for loop might turn out bothersome.

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