Insert/remove indicator by CHARTEVENT_KEYDOWN possible?

 

Hey guys,

I sometimes want to see the Bill Williams Fractal indicator in my charts and I wondered if it is somehow possible to insert it by just pressing a key.

Removing it can be simply done by ChartIndicatorDelete() but I have no idea how to insert it. 

Any ideas if this is possible?

Thanks!

 
Marbo:

Hey guys,

I sometimes want to see the Bill Williams Fractal indicator in my charts and I wondered if it is somehow possible to insert it by just pressing a key.

Removing it can be simply done by ChartIndicatorDelete() but I have no idea how to insert it. 

Any ideas if this is possible?

Thanks!

Will be https://www.mql5.com/en/docs/chart_operations/chartindicatoradd for MT5, but if you're using MT4, I doubt there is any way other than using template...

Documentation on MQL5: Chart Operations / ChartIndicatorAdd
Documentation on MQL5: Chart Operations / ChartIndicatorAdd
  • www.mql5.com
"the Expert Advisor's properties and specify correct  and  parameters." //| Expert initialization function                                   |                                                                                       ); "Attention! %s: Trying to add MACD(%s/%s) indicator on %s/%s chart. Receiving error 4114" //
 
Seng Joo Thio:

Will be https://www.mql5.com/en/docs/chart_operations/chartindicatoradd for MT5, but if you're using MT4, I doubt there is any way other than using template...

So I think sooner or later I have to switch to MT5...

Unfortunately, I can't use another template because I need the self-drawn objects in my charts. But ok, if it's not possible I have to drag the needed indicators into my charts manually.

 
https://www.mql5.com/en/forum/73391
MQL4 Add indicator to chart from EA
MQL4 Add indicator to chart from EA
  • 2016.02.13
  • www.mql5.com
Hello people, I am trying to solve the current problem...
 
Alain Verleyen:
https://www.mql5.com/en/forum/73391

Awesome! Thanks a lot!!