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
Entry Price Question [SOLVED]
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
Code: Select all
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;
See Code in Code Box Above.
Problem: EntryRate does not work as described in the documentation. Why does the code above in the Code Box not retrieve and print the Entry Price? I tried both EntryPrice and EntryPrice_Checked which both had similar descriptions.
There is only one position and it retrieves the GetPositionOpenPL correctly so there is definitely a position recognized. The parameter for entryprice_checked is set to 0 to retrieve the open position, which is what I want.
The position is created manually as you can see that there is no other code in the Code Box above that would create a trade. Is it not possible to obtain the entry price of a manually entered trade?
Here is what I get in the output.,
Date: 1170330 Time: 1526
Open Position Profit PL: -0.90
Initial Entry Price:0.0000
Problem: EntryRate does not work as described in the documentation. Why does the code above in the Code Box not retrieve and print the Entry Price? I tried both EntryPrice and EntryPrice_Checked which both had similar descriptions.
There is only one position and it retrieves the GetPositionOpenPL correctly so there is definitely a position recognized. The parameter for entryprice_checked is set to 0 to retrieve the open position, which is what I want.
The position is created manually as you can see that there is no other code in the Code Box above that would create a trade. Is it not possible to obtain the entry price of a manually entered trade?
Here is what I get in the output.,
Date: 1170330 Time: 1526
Open Position Profit PL: -0.90
Initial Entry Price:0.0000
- ABC
- Posts: 733
- Joined: Dec 16 2006
- Location: www.abctradinggroup.com
- Has thanked: 126 times
- Been thanked: 415 times
- Contact:
mcjohn,
EntryPrice doesn't return values from the Order & Position Tracker, it just returns the entry price of a signal on that chart.
Regards,
ABC
EntryPrice doesn't return values from the Order & Position Tracker, it just returns the entry price of a signal on that chart.
Regards,
ABC