[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 187
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Every brokerage house has its own "minimum lifetime" for a pending order. That's why it doesn't give on 5 minutes.
How can I use iFractals() to always have the latest High and Low values for LOS?
I.e. it is necessary to have actual StopLoss_SELL and StopLoss_BUY.
The compiler is picking on the very last curly bracket - it says '}'. - unbalanced parentheses
What does it mean.... I removed it, added a third one, moved it to the right, to the left.
What does it want?
int start()
{
double Price=Ask+300*Point;
double SL=Price-300*Point;
double TP=Price+150*Point;
if (Time[0])
int Ticket = OrderSend(Symbol(),OP_BUYSTOP,0.1,Price,3,SL,TP );
if(TimeCurrent( )+300)
OrderDelete(Ticket)
}
}
Can you tell me if it is possible to paint the body of the desired candle in the EA?
You can
Tell me how, please.
Trying to delete a pending order after 5 minutes if it has not converted to a market order.
At first I tried to do it via passed parameter.
I.e. expiration = 300 OrderSend(Symbol(),OP_BUYSTOP,0.1,Price,3,SL,TP, "SUDF",237,TimeCurrent( )+300) - It didn't work.
It was explained to me that my brokerage company may have a limit for a minimum lifetime of a pending order.
Then I tried to remove it another way
int start()
{
double Price=Ask+300*Point;
double SL=Price-300*Point;
double TP=Price+150*Point;
if (Time[0])
int Ticket = OrderSend(Symbol(),OP_BUYSTOP,0.1,Price,3,SL,TP );
if (TimeCurrent( )+300)
OrderDelete(Ticket)
}
still not deleted..... the same restriction must be in effect.
Please tell me how I can delete a pending order at the beginning of a 5 minute window after 5 minutes if it has not changed into a market order.
Please tell me how to delete a pending order after 5 minutes if it has not transformed into a market order.
if (Time[0])
if (TimeCurrent( )+300)
Explain the purpose and meaning of these lines, please (according to the language rules they are always true)
double Price=Ask+300*Point;
double SL=Price-300*Point;
double TP=Price+150*Point;
if (Time[0])// if a new candle is formed on any TF(but I need five minutes)
int Ticket = OrderSend(Symbol(),OP_BUYSTOP,0.1,Price,3,SL,TP ); // set a pending order at a distance of 30 p. from the opening price of the last, i.e. current five-minute price
if (TimeCurrent( )+300)// if upon expiry of the current five-minute candle, the pending order has not transformed into a market order
OrderDelete(Ticket)//delete this pending order
}
Thank you.