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
Error 130 may be due to a lack of braces after OrderSelect()
{
Print ("Real Ticket: ",OrderTicket());
if (OrderMagicNumber()==MagicNumberLong)
if (OrderSymbol()==Symbol())
if (OrderType()==OP_BUY)
{
if(Ask-OrderTakeProfit()>Trail*Point)
TrailingStop(OrderTicket());
oldticketnumber = OrderTicket();
if (oldticketnumber > buyticketnumber)
buyticketnumber = oldticketnumber; //Sets buyticketnumber to newest order
}
}
}
I thought about that as well but it has to do with the minimum distance to SL and TP. I use the highest high and lowest low of the last x candles on a 1M chart. Sometimes the price range is just too small. I temporarily solved it by setting a fixed number of pips.
Rather than guess, try using
https://book.mql4.com/appendix/limits
Rather than guess, try using
https://book.mql4.com/appendix/limits
The last time I did any programming Ronald Reagan was president. It's taking me a bit to get back in to it. I appreciate the help.