DislikedAnybody here who knows some Admin People?? I think we need more page 1 of this thread at least 3 page 1. where we can stick all this attachement and EA, scripts and indicators.
I paste a new ProfitCalc_r1 on page 1. Delete the old one
ThanksIgnored
the spread you subtract is not the spread of the position you want to calculate. It's the spread of the pair of the chart, the indicator is attached.
Maybe this is what you try to achieve:
Inserted Code
double diff; string trend; double TotalProfit4,TotalProfit5; for(int n = OrdersTotal()-1; n>=0; n--) { OrderSelect(n, SELECT_BY_POS); double spread = MarketInfo(OrderSymbol(), MODE_SPREAD); if ( OrderType()== OP_BUY){ double Profit4 = Bid - OrderOpenPrice()- spread; TotalProfit4 += Profit4; } if ( OrderType()== OP_SELL){ double Profit5 = OrderOpenPrice()- Ask - spread; TotalProfit5 += Profit5; } }
Thank you for sharing this great system with us!