Error . . .
//---- sell conditions if((rsis>50 && rsi<50 && rsiegs>50 && rsieg<50 && rsigds>50 && rsigd<50 && Volume[0]<1) && (rsis5>50 && rsi5<50 && rsiegs5>50 && rsieg5<50 && rsigds5>50 && rsigd5<50)) { // <-- CHANGE to { res=OrderSend("EURUSD",OP_SELL,LotsOptimized(),Bid,3,0,0,"",MAGICMA,0,Red); // REMOVE () after "EURUSD" return; } //---- buy conditions if((rsis<50 && rsi>50 && rsiegs<50 && rsieg>50 && rsigds<50 && rsigd>50 && Volume[0]<1) && { // <-- REMOVE { (rsis5<50 && rsi5>50 && rsiegs5<50 && rsieg5>50 && rsigds5<50 && rsigd5>50)) { // <-- CHANGE to { res=OrderSend("EURUSD",OP_BUY,LotsOptimized(),Ask,3,0,0,"",MAGICMA,0,Blue); // REMOVE () after "EURUSD" return; } } // <-- ADD }
Error . . .
Fantastic!! I had a little trouble at first understanding the correction text. Then I just added the bottom bracket and presto. 0 errors!
Can't thank you enough Raptor. I have really been struggling with this. The problem I am having is this. Yeah, I am kind of pushing along quicker
than I probably should by looking at examples. Do help though. The other problem is, a lot of the little details aren't described in the manuals. One
example is, unless I am wrong is the Brackets. If you know of anything better than the standard MQL4 language book let me know. I have one e-book
that a guy sent me and that is quite clear. Still doesn't touch on everything for somebody new like me.
Thanks again,
JimTrader1
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have spent quite a bit of time on this to get it to work. Tried other Trade Order formats and that didn't work either.
I have never done any programming before when more than one currency pair is used in the code. Am still new at the
code also but doing ok. This thing has got the best of me though. I need some help to get this to work and learn more
about what's going on here. Also I want to throw out a couple of code words here I need some help on:
res Why is this used for Order send and sometimes not?
Also the difference between void Start() and int Start() ? I know that void doesn't return a value and int stands for integer.
Thanks,
JimTrader1