Forum

Delete an object from only 1 of the open pairs, not all of them...

Hey all, I use my EA to draw a line called "Trigger" on the chart upon the first tick which I then move to a support/resistance area i want to wait for a signal from to take a trade, I have then also programmed it to delete this line when the EA takes a trade to avoid opening multiple trades for the

Using a horizontal line as part of your trigger for EA to take a trade

Hey, I have written the following code that describes a pin bar and a subsequent bar that closes above the pin bar to confirm it, I would like to control the EA taking these trades by having a horinzontal line on the chart named "trigger" that I can manually move to support and resistance levels . I

Can't get this code to delete a pending order..

Hi All, Been trying to get this code to delete a pending order . Basically I'm trying to set two pending orders, one buystop and one sellstop, and when one executes i want to close the other one. Trying to do it by naming them ticket1 and ticket2 as below but its not deleting any: //if entry

Less trades when testing every tick?

Hey all, I've been strategy testing using on close of candle rather than every tick as it's quicker and at the moment I am just getting the code to do what I want it to do before then properly testing with every tick. I have tried every tick a few times and find it takes out less trades than when on

Is it possible to do this?

Hey all, Been looking at using a MA or support resistance indicator to using in my EA but none are as good as me drawing in key support resistance lines. So, is it possible to get an EA to recognize horizontal lines you have manually drawn onto the chart, and what would they be named as standard

Set value for TP or a risk reward ratio?

Just a discussion point; 1. do you go for a set take profit target for every trade, say 100pips regardless of your stop loss size, or 2. do you make your take profit level a set ratio larger than your stop loss for each trade, i.e. Risk reward ratio of 1 to 3.. Reason I ask is I had the EA I'm

Totally baffled, can you spot whats going on??

Hi all, I've written some "if" functions that delete a stop_order if the price goes past the high/low of the applicable candle in these three bar signals. However, if you take a look at the screen shot below, the sellstop order at 1.11737 has deleted incorrectly just before it would have entered

Quick way to combine two EA's

Hi All, Is there a quick way to combine two EA's? Such as using a line to start EA1, and then another before the second EA to start EA2, and a master start at the top to start the both of them? Can't seem to find anything on this subject in the material on MQL4 book, or on here.. Thanks

Combined two EA's and just have one error left to solve. Struggling to solve!

Hi All, I've been practicing/learning MQL4 by modifying and tweaking a few example EA's to make this one and just have this one error left that I can't seem to spot the cause of! I don't suppose anything stands out to any of you does it? The error is: "not all control paths return a value" and is on