kajironpu:
Maybe I'm just blind (I haven't checked your code) but I don't see anything why your code doesn't work properly. Try something like this:I want to stop order by some moths.
For example, from Feb to Nov, EA will trade but in Dec and Jan, EA stop trade.
I put Stop moths in the array.
If buy signal>0 and check to see if it is trade month or not.
However, it is not working properly.
Can you give me some advices what the problem is?
int month_stop[]={1,12}; int month_current=Month(); int month_count=ArraySize(month_stop); for(int j=0;j<month_count;j++) if(month_current==month_stop[j]) return; if(buy_signal>0) { BUY trade() ******;}
Petr
Thank you so much for your advice.
I got it with your code.
If current month ==stop month, then not go to next code (return).
If current month !=stop month, just go to next code ->buy/sell condition.
That is good idea. Thank you very much.
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
I want to stop order by some moths.
For example, from Feb to Nov, EA will trade but in Dec and Jan, EA stop trade.
I put Stop moths in the array.
If buy signal>0 and check to see if it is trade month or not.
However, it is not working properly.
Can you give me some advices what the problem is?