Re: Indicators with ON/OFF buttons

21
Banzai wrote: Thu Jun 25, 2020 4:24 pm with a click of a button, you can turn on or off the Heiken Ashi smoothed.

I made this. Thanks to jeanlouie codes and templates @ forexfactory. Oh yeah :thumbup:
Hi Banzai, It's possible to change the button to keep the heiken ashi deleted when you change time frame and only restored when you press the button????
Thank you....


Re: Indicators with ON/OFF buttons

23
Banzai wrote: Sat Jun 27, 2020 4:18 am

lol, that's a very advance level.
I'm only a beginner.
Will look into that when I have more experiences. :think:
Hi Banzai,
what is with the Indi WPR on chart? it is possible?
Thanks
These users thanked the author Skyold for the post:
Banzai
We create order out of chaos - we trade that order, but sometimes that chaos is out of order, so we WAIT!!! for the order to return - and we trade again. XARD777


Re: Indicators with ON/OFF buttons

26
Skyold wrote: Sat Jun 27, 2020 6:08 am Hi Banzai,
what is with the Indi WPR on chart? it is possible?
Thanks
OK. So far so good.
I checked the mtf arrows and they're fine now.
-----------------------------------------------------
Fun facts:
I copy the colors of WPR lines from Tankk, a Russian coder. Those are his favorite colors. I see he uses them all the time.
and then I copy the colors of the band from the TMA bands.

:lol:
These users thanked the author Banzai for the post (total 5):
kvak, rudiarius, Skyold, myrelax82, 太虚一毫

Re: Indicators with ON/OFF buttons

28
Lumios wrote: Sat Jun 27, 2020 12:59 pm Banzai, this is such a great idea. Trying to learn and study this, is there a resource you can point me in the direction of?
Thanks to jeanlouie codes/templates, I was able to copy and paste.
That's why I always post the original indicator and the new button indicator so you can compare the codes.

I started out by comparing the codes of "Swing_ZZ.mq4" and "Swing_ZZ_w_toggle.mq4"
viewtopic.php?p=1295413353#p1295413353
---------------------------------------------------------------------------
The idea is when you click the OFF button,
change all colors to clrNONE
Since there's no colors, we don't see anything on the chart. That's the trick.

Code: Select all

      if(ObjectGetInteger(0,"Swing_ZZ_tog_btn",OBJPROP_STATE)){
         ObjectSetString(0,"Swing_ZZ_tog_btn",OBJPROP_TEXT,btn_pressed);
         SetIndexStyle(2,DRAW_ARROW,STYLE_SOLID,1,clrNONE);
         SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,1,clrNONE);
         SetIndexStyle(0,DRAW_SECTION,STYLE_SOLID,1,clrNONE);
---------------------------------------------------------------------------
when you click the ON button,
change all colors back to the original colors.
---------------------------------------------------------------------------
jeanlouie code is easier to understand than xard777 code
xard777 code is at: viewtopic.php?p=1295413346#p1295413346
These users thanked the author Banzai for the post (total 2):
Lumios, michaelB

Re: Indicators with ON/OFF buttons

30
Banzai wrote: Sat Jun 27, 2020 9:01 am

OK. So far so good.
I checked the mtf arrows and they're fine now.
-----------------------------------------------------
Fun facts:
I copy the colors of WPR lines from Tankk, a Russian coder. Those are his favorite colors. I see he uses them all the time.
and then I copy the colors of the band from the TMA bands.

:lol:
Hi Banzai,
it's great what you did there.
Thank you very much for your effort.
From now on there is only a clear chart with BANZAI BUTTONS :clap: :)
These users thanked the author Skyold for the post:
Banzai
We create order out of chaos - we trade that order, but sometimes that chaos is out of order, so we WAIT!!! for the order to return - and we trade again. XARD777


Who is online

Users browsing this forum: Amazon [Bot], ChatGPT [Bot], IBM oBot [Bot], rudiarius, specialkey, Steam1, Telegram [Bot] and 82 guests