how do you expect help if you don't say what the errors are...
- Don't post pictures of code or error message; just post the error message.
- Not allowed on global scope means you have too many closing brackets above that line.
-
if((RSI_Signal[0]<30) && (MainLine[1]>SignalLine[1]) && (MainLine[0]<SignalLine [0]) && (StocMain[1]>StocSignal[1]) && (StocMain[0]<StocSignal [0])) mrequest.action=TRADE_ACTION_DEAL; mrequest.price=NormalizeDouble(latest_price.ask,Digits());
The if statement only applies to the action.
1. Line 188 - You have an extra bracket on line 188 which prematurely ends the OnTick() function and excludes subsequent lines [as mentioned by William above]
2. Line 160 - you are missing a logic operator for the last term - it should be (CopyBuffer(StocHandle,0,0,3,StocMain)!=3) || (CopyBuffer(StocHandle,1,0,3,StocSignal)!=3))
3. Line 202 - You have a warning "declaration of 'result' hides local variable" - you could remove the bool re-declaration and use the existing variable
If you have not done so already, switch on and learn how to use bracket matching as that is usually the most tricky error to resolve - the others are straightforward once the brackets are corrected
1. Line 188 - You have an extra bracket on line 188 which prematurely ends the OnTick() function and excludes subsequent lines [as mentioned by William above]
2. Line 160 - you are missing a logic operator for the last term - it should be (CopyBuffer(StocHandle,0,0,3,StocMain)!=3) || (CopyBuffer(StocHandle,1,0,3,StocSignal)!=3))
3. Line 202 - You have a warning "declaration of 'result' hides local variable" - you could remove the bool re-declaration and use the existing variable
If you have not done so already, switch on and learn how to use bracket matching as that is usually the most tricky error to resolve - the others are straightforward once the brackets are corrected
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use