Get profit last closed position in point. - page 2

 

this example:

NewProfit =  GetProfitLastClosePosInPoint ("EURUSD", OP_BUY, magic);

doesn't give the sum of profit for all closed buy positions on EURUSD with magic no. magic ?

 

Thank you

 
NewProfit =  GetProfitLastClosePosInPoint (NULL, -1, magic);
:
if ((OrderSymbol()==sy || sy=="") && (op<0 || OrderType()==op)){
So put some print statements in your functions and you will find out that NULL != ""
Reason: