[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 186
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
Hello.
Why is the stop not transferring for buy positions? for sell everything is working.
if(OrdersTotal()>0)
{
if(Bid==bubuy||Bid==busell)
{
OrderSelect(ticket, SELECT_BY_TICKET, MODE_TRADES);
OrderModify(OrderTicket(),OrderOpenPrice(),OrderTakeProfit(), 0, Blue);
}
return(0);
}
originally what is if(Bid==buy||Bid==busell),....??????? can you tell.
and probably the following condition should be:
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*number of points,OrderTakeProfit(),0,Blue)
if(Bid==buy||Bid==busell)
double bubuy is a level on touching which the stop of the buy position is moved to the opening level of this position.
double busell is the level for a sell position.
if(Bid==bubuy||Bid==busell)
double bubuy is a level on touching which the stop of the buy position is moved to the opening level of this position.
double busell is a level for a sell position.
check the condition anyway.
Figured it out
if(OrdersTotal()>0)
{
OrderSelect(ticket, SELECT_BY_TICKET, MODE_TRADES);
if(OrderStopLoss()==OrderOpenPrice()) return(0);
if (OrderType()==OP_BUY) if(Bid>=buy) OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(), 0, Blue);
if(OrderType()==OP_SELL) if(Bid<=busell) OrderModify(OrderTicket(),OrderOpenPrice(),OrderTakeProfit(), 0, Red);
return(0);
}
And another question, if data are taken from several TFs, is it necessary for the EA to open all these charts (in different ones) when it works online, or may I take only one chart and set the EA on it? Suppose the EA works on EUR/OD takes data from H1 H4 D1 frames for analysis, and it (the EA) is attached to H1, should I open in other charts H4 and D1?
Figured it out
if(OrdersTotal()>0)
{
OrderSelect(ticket, SELECT_BY_TICKET, MODE_TRADES);
if(OrderStopLoss()==OrderOpenPrice()) return(0);
if(OrderType()==OP_BUY) if(Bid>=buy) OrderModify(OrderTicket(),OrderOpenPrice(),OrderTakeProfit(), 0, Blue);
if (OrderType()==OP_SELL) if(Bid<=busell) OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(), 0, Red);
return(0);
}
And another question, if my EA takes data from several TFs, do I need all these TFs to be open (in different charts) when EA works online or can I take only one chart and set EA on it? Suppose the EA works on EUR/OD takes data from H1 H4 D1 frames for analysis, and attached to H1, does it need to open in other charts H4 and D1?
No need to open other charts with timeframes... The EA will calculate all the data from the timeframes itself.
Hi, could you please tell me how to fix the indicator https://www.mql5.com/ru/code/7361.
The matter is that the signal appears on the current bar, and with each tick a sound signal sounds. I would like to have a sound after the bar closes, if the signal is not cancelled.
Greetings all!
Help me solve the following problem.
There is a custom indicator that draws signals on the chart.
The signals are given with a delay, which I am trying to determine for each signal and write next to it on the chart.
I decided to try to output the time of signal's appearance:
But the code doesn't work, I can't see the time.
What am I doing wrong?
Hello.
I have downloaded with "Quote Archive" the pound/dollar (M1) quotes from 1999 in DAT format, how can I convert this data for testing?