How I can get value of price (op_buy with lot 0.01 - have only a op_buy with 0.01)?
Note: symbol()
Thank you
Ask Price?
Bid Price?
Order Open Price?
Order Close Price?
Profit?
Loss?
What price.
Ask Price?
Bid Price?
Order Open Price?
Order Close Price?
Profit?
Loss?
What price.
For the function PositionGetDouble()
Identifier |
Description |
Type |
POSITION_VOLUME |
Position volume |
double |
POSITION_PRICE_OPEN |
Position open price |
double |
POSITION_SL |
Stop Loss level of opened position |
double |
POSITION_TP |
Take Profit level of opened position |
double |
POSITION_PRICE_CURRENT |
Current price of the position symbol |
double |
POSITION_SWAP |
Cumulative swap |
double |
POSITION_PROFIT |
Current profit |
double |
https://www.mql5.com/en/docs/trading/positiongetdouble
pre-selected using PositionGetSymbol or PositionSelect.

- www.mql5.com
For the function PositionGetDouble()
Identifier |
Description |
Type |
POSITION_VOLUME |
Position volume |
double |
POSITION_PRICE_OPEN |
Position open price |
double |
POSITION_SL |
Stop Loss level of opened position |
double |
POSITION_TP |
Take Profit level of opened position |
double |
POSITION_PRICE_CURRENT |
Current price of the position symbol |
double |
POSITION_SWAP |
Cumulative swap |
double |
POSITION_PROFIT |
Current profit |
double |
https://www.mql5.com/en/docs/trading/positiongetdouble
pre-selected using PositionGetSymbol or PositionSelect.
I used OrderOpenPrice();
It's is working.
But, thank you
void OnStart()
{
double lots_total=9999;
double precoinicial=0;
for(int i=0;i<OrdersTotal();i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true)
{
//if(OrderMagicNumber()==MagicNumber)
{
//if(OrderSymbol()==Symbol())
{
// if(OrderSymbol()!=Symbol()) continue;
if(OrderSymbol()!=Symbol()) continue;
if(OrderLots()<lots_total){
lots_total=OrderLots();
precoinicial=OrderOpenPrice();
}
}
}
}
}
Alert("lots:",lots_total);
Alert("precoinicial",precoinicial);
Sleep(20000);
}
Forum on trading, automated trading systems and testing trading strategies
How to Start with Metatrader 5
Simon Gniadkowski, 2013.07.24 10:18
How to post code on this forum . . .
I used OrderOpenPrice();
It's is working.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
How I can get value of price (op_buy with lot 0.01 - have only a op_buy with 0.01)?
Note: symbol()
Thank you