Re: Indicators with ON/OFF buttons

1621
My first go at incorporating a button into an indicator :)

Edit: also attaching the original indicator for comparison purposes if anybody wants to have a go at some other indicator

@Kvak
Although the BT does work, I would be obliged if you could take a look at the code so to verify that everything is in order.
If something needs fixing please post back with amendments so I can learn further.
Thanking you in advance.
These users thanked the author chris006 for the post (total 6):
KAESER444, Krunal Gajjar, Borshchov A.N., Jimmy, ChuChu Rocket, Jedidiah


Re: Indicators with ON/OFF buttons

1622
chris006 wrote: Wed Feb 02, 2022 2:16 am My first go at incorporating a button into an indicator :)

Edit: also attaching the original indicator for comparison purposes if anybody wants to have a go at some other indicator

@Kvak
Although the BT does work, I would be obliged if you could take a look at the code so to verify that everything is in order.
If something needs fixing please post back with amendments so I can learn further.
Thanking you in advance.
Hello.
Nice work.
Only one think
Buffers are as DRAW_ARROW
In line 127 have SetIndexStyle(banzai,DRAW_LINE);
it has no effect in this indicator, but in some indicators it makes a mess.
These users thanked the author kvak for the post (total 2):
josi, chris006

Re: Indicators with ON/OFF buttons

1624
Many thanks Kvak.

So, to see that I understand this correctly, since at line 70 the reading is "Type=DRAW_ARROW", then is more appropriate to also change line 127 to also read "DRAW_ARROW" instead of what is showing now (DRAW_LINE)?

kvak wrote: Wed Feb 02, 2022 10:54 am Hello.
Nice work.
Only one think
Buffers are as DRAW_ARROW
In line 127 have SetIndexStyle(banzai,DRAW_LINE);
it has no effect in this indicator, but in some indicators it makes a mess.

Re: Indicators with ON/OFF buttons

1625
chris006 wrote: Wed Feb 02, 2022 7:39 pm Many thanks Kvak.

So, to see that I understand this correctly, since at line 70 the reading is "Type=DRAW_ARROW", then is more appropriate to also change line 127 to also read "DRAW_ARROW" instead of what is showing now (DRAW_LINE)?
Yes.You must call buffer back as is coded in init,oninit section....as histo,line,arrows...
These users thanked the author kvak for the post:
chris006


Re: Indicators with ON/OFF buttons

1627
Not sure exactly what you mean..

This is an indicator that XARD provided maybe a couple of years back. It shows the daily open line. XARD used to say that the trade starts at the open line, above it for buy, below it for sell.
Of course you cannot trade on this indicator alone.
My purpose for adding button is to be able to remove the indicator at some point when price is hovering around the open line so to be able to see what is happening.

Borshchov A.N. wrote: Wed Feb 02, 2022 11:14 pm how to use it in real trading? Does he start each level without looking back at the story?
These users thanked the author chris006 for the post:
Borshchov A.N.

Re: Indicators with ON/OFF buttons

1630
Teruyoshi wrote: Wed Feb 02, 2022 6:07 pm dear, kvak

I understand you are busy but I'd be grateful if you could help me.
Coud you add on off button to this indicator?
Hi.
Isnt perfect, trying two template...
In MTF, switch to on, when you change timeframe.
Added menu for show, hide bands and AHTF.
These users thanked the author kvak for the post (total 3):
talaate, 太虚一毫, josi


Who is online

Users browsing this forum: Facebook [Crawler], Krunal Gajjar, LittleCaro, Majestic-12 [Bot], NotInPortland, PaperLi [Bot], Samoth, Telegram [Bot] and 89 guests