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
Could someone please help me with this...I am trying to revise my script so that it will work on an Market execution system (Boston Technologies) and my stoploss and takeprofit need to defined... I am totally new to this and a neophyte here so any help would be greatly appreciated! Here is what (BT) recommends changing...
BT- It is advised to change the following line :
OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order
#2",16384,0,Green);
With :
ticket=OrderSend(Symbol(),OP_BUY,1,Ask,0,0,0,"My order #2",16384,0,Green);
if(ticket>0)
{
OrderSelect(ticket,SELECT_BY_TICKET);
OrderModify(OrderTicket(),OrderOpenPrice(),STOPLOSS,TAKEPROFIT,0,Green);
}
else
{
Print("OrderSend failed with error #",GetLastError());
}
I made the changes as recommended but this is what I get in the editor for errors...
'STOPLOSS' - variable not defined C:\Documents and Settings\Chris\My Documents\K2\FOREX\HiLo Breakout.mq4 (196, 50)'TAKEPROFIT' - variable not defined C:\Documents and Settings\Chris\My Documents\K2\FOREX\HiLo Breakout.mq4 (196, 59)
'(' - function definition unexpected C:\Documents and Settings\Chris\My Documents\K2\FOREX\HiLo Breakout.mq4 (213, 12)
'ticket' - variable already defined C:\Documents and Settings\Chris\My Documents\K2\FOREX\HiLo Breakout.mq4 (218, 7)