Display Arrows and Crosses when trades Open and Close
I would like to make an Action so that a green/red arrow displays on the chart when a new buy/sell trade is produced by the EA, and a red cross when a trade is closed. How can I do this?
Basically, you setup your entry and exit rules. You need to have a rule for each (cannot use SL or TP).
Once you have that setup, then go to Get EA. Change the format to Signals Indicator format. Save that format to the MT4’s Indicators folder.
Open MT4, open the chart, and load the indicator onto the chart.
Go into the Input tab of the indicator settings, and there you can change wingdings character for each rule. By default it is set to 167. You can change this to be an arrow or an x as you requsted. Just look at the coresponding winddings number at this website: http://docs.mql4.com/constants/objectconstants/wingdings
I also suggest that you delete the rule text and put whatever works best for you or can leave blank and then it will say what you named the rule tab in EA Wizard.
I have attached screenshot of what I did as an exmaple and the example strategy.
the newest version of EA Wizard already has functions for this, you can find it in THEN action -> Other -> Draw Up Arrow/Draw Down Arrow
So you can add this action after you open the trade using Enter at market and it should draw an arrow on the chart.
The other possibility is to save your strategy as signal indicator.
I have tried to add the arrow function to my EA so that it shows an up arrow when the last trade closes with a profit and a down arrow when the trade closes with a loss, but the arrow keeps drawing every single second on the bar so I end up with hundred of arrows over that bar instead of just one clear signal.
CLOSED P/L in money (1000, 1) < 0
THEN: Draw Down Arrow : Shift: 1
Also, how do I change the arrow to show a different signal such as a square, or X, what part of the code do I go to?
You should also add condition BarsSinceOrderClosed() = 1 – this will avoid drawing arrow on every bar.
– drawing some other character than arrow – this is not that simple, drawing objects to a chart in MT4 is quite complicated, and EA Wizard currently doesn’t allow choosing different drawing types.
It is an idea for next version.
Thanks again Mark, you’re feedback is really helping me learn this software, though a bit slowly as I’m not from a programming background.
It’s a pity the spammers are trying to ruin this forum.
Viewing 6 posts - 1 through 6 (of 6 total)