Please EDIT your post and use the SRC button to place your source code (or attach the file it if it is large).
this post has been updated
if(OrdersTotal()==1){//Select previous order if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES)==true)
No filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.) Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 forumif((Ask>Add_double(Main_Recovery_Zone,TWS))&&(Ticket_1<=0)==true)
You would never write if( (2+2 == 4) == true) would you? if(2+2 == 4) is sufficient. So Don't write if(bool == true), just use if(bool) or if(!bool). Code becomes self documenting when you use meaningful variable names, like bool isLongEnabled. Long_Entry sounds like a trigger price or a ticket number and "if long entry" is an incomplete sentence.
Well I appreciate your input on this WHRoeder and yeah I must admit, I was using the ==true part for easier reading. it's superficial really a filtering system is needed in this EA but not essential to me at the moment as I'm working on one chart at a time for the moment.
What is essential to me is making these two if statements work. I was thinking of something like a switch statement for this. How would you go about this WHRoeder
if you want to have a play? Here's the file.
Ahh no need now I think I've cracked it
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
Hello everyone!! I am pretty new to MQL4 and I've only been coding with this language for 3 months. I seem to have hit a major wall in coding today. and I am not sure how to go about this.
This is a section of meatgrinder, A trade recovery system that I have been building. This section of code works flawlessly
Now I would like to enter this section of code into the mix
With this part of code in the mix, it now constantly places trades
i know that this is wrong because the 2 conflicting if statements produces unreliable results. I just want it to do
if price is above or below the boundary and the trade has not been placed place trade immediately.
Any help is greatly appreciated. Thank you for your time