
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
thank you for your help, I have removed the while loop and break to the start function on each order execution, removed the IsTesting function (for now) and my OrderSend appears to be working.
Running it now no matter where I have a Print() function nothing is appearing in the journal (or the log book) the initial order opens fine and then nothing - even if i have my print order as the next line in the code?
thank you for your help, I have removed the while loop and break to the start function on each order execution, removed the IsTesting function (for now) and my OrderSend appears to be working.
Running it now no matter where I have a Print() function nothing is appearing in the journal (or the log book) the initial order opens fine and then nothing - even if i have my print order as the next line in the code?
how does your code look now ??
double, int, string, bool, datetime, color, ........ what do i have to use ???....
Are they double ???
SEEEEEE What are Function return values ? How do I use them ? - MQL4 forum
big explanation
Where a function returns an int, such as OrderSend(), we can use code such as this to check that the function worked and report an error to the logs if it did not work . . .
. See the link you have given by WHRoeder and you find what i have hidden here with stars ......
use it also checking closing the trades
Make something like that inside your code.... in that way when ordersend fails you know what kind and where the error is coming from
.
what happens if orderclose fails.......?????
Both RSI and MA's are doubles so the variables need to be as well no?
https://docs.mql4.com/indicators/iRSI && https://docs.mql4.com/indicators/iMA
I coded in the print errors, but nothing is being printed to the journal so I cant work off which errors are occuring? Am I still missing something obvious? Now I am back to opening a sell and then not being able to close...
duuuhhhh iRSI is double but the comparison outputs 1 - so I replaced RSI30 and RSI70 with just RSI and had a comparison and all works HOORAY! EXCEPT when I change the SMA6 to shift it outputs SMA6=0 always? why?
Thank you all for the help! I hope not to annoy so much next time!
Both RSI and MA's are doubles so the variables need to be as well no?
https://docs.mql4.com/indicators/iRSI && https://docs.mql4.com/indicators/iMA
I coded in the print errors, but nothing is being printed to the journal so I cant work off which errors are occuring? Am I still missing something obvious? Now I am back to opening a sell and then not being able to close...
place the EA on a chart of a demo account
don't look only in terminal journal ...
look also in terminal experts .....
what do you see there printed
place the EA on a chart of a demo account
don't look only in terminal journal ...
look also in terminal experts .....
what do you see there printed
Printing and executing now :) thank you for your help - i was wrong definining iRSI<70 as a double (since it was a comparison) and was causing issues. It prints now and works as expected, except, if I change the SMA shift its prints SMA=0?
Printing and executing now :) thank you for your help - i was wrong definining iRSI<70 as a double (since it was a comparison) and was causing issues. It prints now and works as expected, except, if I change the SMA shift its prints SMA=0?
Place a SMA with same settings to the chart of your EA and see what you have done ...
Why do you total += 1;
at this moment i don't know if ordersend succeed
and if it fails i don't see what ordertype it tried to open it could be also a sell trade you tried to open