niko:
'\end_of_program' - ending bracket '}' expected C:\Program Files\Go Trader MT4\experts\workbook_nick_all the time.mq4 (83, 1)
'\end_of_program' - ending bracket '}' expected C:\Program Files\Go Trader MT4\experts\workbook_nick_all the time.mq4 (83, 1)
Why?
I tested the OrderSend lines on their own, they are fine. Problem is with the OrdersSelect parts, I just can't fit them into this properly. As always help hugely appreciated!
This is the code:
You have 2 } and 4 { so you are missing a }
Maybe . . .
OrderSend(Symbol(),OP_SELL,LotSize,Bid,3,Bid+StopLoss*pips,Bid-TakeProfit*pips,NULL,MagicNumber,0,Red); // if last history order didn't have the openprice<close price then sellorder open { OrderSend(Symbol(),OP_SELL,LotSize,Bid,3,Bid+StopLoss*pips,Bid-TakeProfit*pips,NULL,MagicNumber,0,Red);
should be . . .
OrderSend(Symbol(),OP_SELL,LotSize,Bid,3,Bid+StopLoss*pips,Bid-TakeProfit*pips,NULL,MagicNumber,0,Red); // if last history order didn't have the openprice<close price then sellorder open } OrderSend(Symbol(),OP_SELL,LotSize,Bid,3,Bid+StopLoss*pips,Bid-TakeProfit*pips,NULL,MagicNumber,0,Red);
Also, you need to test the return values from your trading functions so you know what is wrong if they go wrong and you can then also print out the relevant variables to enable you to diagnose the issue after the event, read and implement this: What are Function return values ? How do I use them ?
Thank you Raptor!
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
Why?
I tested the OrderSend lines on their own, they are fine. Problem is with the OrdersSelect parts, I just can't fit them into this properly. As always help hugely appreciated!
This is the code: