I'm not getting any error codes processed in the strategy tester. What's wrong there? Is there a problem with Sleep or are the errors just not being generated?
Wow... I didn't realise there were so many trailing stops. My head is spinning )))) Whatever you want )))
I would like a simple trailing stop, like built in MT4 on order of the current price. )))
) ) The primitive trawl from MACD Sample corresponds to the trawl in the terminal and the server is bombarded with orders on every tick:
extern TrailingStop=100;
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if(OrderType()<=OP_SELL && // check for opened position OrderSymbol()==Symbol()) // check for symbol
{
//--- long position is openedif(OrderType()==OP_BUY)
{
//--- check for trailing stopif(TrailingStop>0)
{
if(Bid-OrderOpenPrice()>Point*TrailingStop)
{
if(OrderStopLoss()<Bid-Point*TrailingStop)
{
//--- modify order and exitOrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green);
return;
}
}
}
}
else// go to short position
{
//--- check for trailing stopif(TrailingStop>0)
{
if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
{
if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0))
{
//--- modify order and exitOrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red);
return;
}
}
}
}
}
}
Hello, I don't know where to place this question, the gist of it is this: sometimes EA writes a 7 gigabyte log file with one error, it writes (EURUSD,M15: Failed to close leading order, repeat operation), although it closes everything without error. I try to prohibit this EA to record its actions in the log, but it's no use, I need the log of the terminal.
Please advise how to prohibit this "creep" to keep the log? I understand that I have to use the Print option but how?
I hardly scraped together 100$ to start trading and get out of the deepest hole in Forex. I've known about 2 months of trading. I just opened a real account yesterday but I don't know how to install an EA, what is the subscription and how much it costs.
I'm not getting any error codes processed in the strategy tester. What's wrong there? Is there a problem with Sleep or are the errors just not being generated?
Sleep is not working in the tester.
Help.
As far as I understand, there is no trailing stop on an order in mql 4?
And if not, how can I use a simple method to execute a trailing stop on an open order?
Help.
As far as I understand, there is no Trailing Order function built into mql 4?
And if not, how can I trailing an open order be done in a simple line?
Something like this
Something like this
Wow... I did not realise there were so many trailing stops. My head's spinning )))) Anything you want )))
I'd like a simple one, like the one built into MT4 on an order from the current price. )))
Wow... I didn't realise there were so many trailing stops. My head is spinning )))) Whatever you want )))
I would like a simple trailing stop, like built in MT4 on order of the current price. )))
) ) The primitive trawl from MACD Sample corresponds to the trawl in the terminal and the server is bombarded with orders on every tick:
When debugging, "USDCHF" window opens by default...
Can you tell me how to make during debugging from MeteEditor to initialize and work in MetaTrader
with determined or already opened window, and not with window "USDCHF" by default?
When debugging, "USDCHF" window opens by default...
Can you tell me how to make during debugging from MeteEditor to initialize and work in MetaTrader
with determined or already opened window, and not with window "USDCHF" by default?
In the terminal settings, search through the tabs. You will find it.
You can change the pair and timeframe, but not the terminal settings ;)
Hello, I don't know where to place this question, the gist of it is this: sometimes EA writes a 7 gigabyte log file with one error, it writes (EURUSD,M15: Failed to close leading order, repeat operation), although it closes everything without error. I try to prohibit this EA to record its actions in the log, but it's no use, I need the log of the terminal.
Please advise how to prohibit this "creep" to keep the log? I understand that I have to use the Print option but how?