Hi there,
I'm a programmer but new to MQL5. I've created an indicator that uses %R to determine buy or sell based on over-bought or over-sold stock. When I drag the indicator onto the chart I get DOWN_ARROW and UP_ARROW indicators fine. I wrote an EA to automate opening and closing positions based on that indicator using iCustom however no arrows appear on the chart. Do I need to duplicate the indicator plotting code in the EA to draw the up and down arrows when the EA discovers a BUY or SELL in the buffers?
Yes simply load the indicator on the chart and read it by iCustom.
Reading by iCustum does not plot on the chart so you either have to have the EA plot the arrows or load the indicator onto the chart.
It defies purpose because if you run a robot to trade its usually because you do not want to look at the screen, and if you load an indicator it is usually because you do want to look at the screen.
So if you load the indicator and also run the robot i can only assume its some sort of hybrid or semi automatic type of strategy that you still want to keep an eye on.
Thank you for the response, that makes complete sense. What's strange is that when I right click the EA and test it, the arrows from the indicator appear but when dragged onto a Live chart they don't. Is there a reason why? I have created a hybrid for now to check that the trades are occuring correctly when the indicator triggers a buy or sell. At the moment the indicator in the test it showing but not always firing the trade. Really strange.
ChartIndicatorAdd
to mql4. For now it is in mql5.
But you can use
ChartApplyTemplate
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi there,
I'm a programmer but new to MQL5. I've created an indicator that uses %R to determine buy or sell based on over-bought or over-sold stock. When I drag the indicator onto the chart I get DOWN_ARROW and UP_ARROW indicators fine. I wrote an EA to automate opening and closing positions based on that indicator using iCustom however no arrows appear on the chart. Do I need to duplicate the indicator plotting code in the EA to draw the up and down arrows when the EA discovers a BUY or SELL in the buffers?