Entry Price Question
Posted: Mar 30 2017
I can't seem to get the Entry Price retrieved for the open position. What I am I doing wrong here?
inputs:
Reverse1(10);//distance in pips
vars:
intrabarpersist openPosPL(0),
entryRate(0);
//Formulas
openPosPL = GetPositionOpenPL(GetSymbolName,GetAccountID);
entryRate = entryprice_checked(0);
//Print Output
If LastBarOnChart and BarStatus(1)=2 then begin
once ClearPrintLog;
print("");
Print("Date:", Date: 9:0, " ", "Time:", Time:5:0);
Print("Open Position Profit PL:", openPosPL);
Print("Initial Entry Price:", entryRate:4:4);
end;
-----------------
Here is what I get in the output.,
Date: 1170330 Time: 1526
Open Position Profit PL: -0.90
Initial Entry Price:0.0000
inputs:
Reverse1(10);//distance in pips
vars:
intrabarpersist openPosPL(0),
entryRate(0);
//Formulas
openPosPL = GetPositionOpenPL(GetSymbolName,GetAccountID);
entryRate = entryprice_checked(0);
//Print Output
If LastBarOnChart and BarStatus(1)=2 then begin
once ClearPrintLog;
print("");
Print("Date:", Date: 9:0, " ", "Time:", Time:5:0);
Print("Open Position Profit PL:", openPosPL);
Print("Initial Entry Price:", entryRate:4:4);
end;
-----------------
Here is what I get in the output.,
Date: 1170330 Time: 1526
Open Position Profit PL: -0.90
Initial Entry Price:0.0000