Page 163 of 339

Re: Indicators with ON/OFF buttons

Posted: Wed Feb 02, 2022 2:16 am
by chris006
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.

Re: Indicators with ON/OFF buttons

Posted: Wed Feb 02, 2022 10:54 am
by kvak
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.

Re: Indicators with ON/OFF buttons

Posted: Wed Feb 02, 2022 6:07 pm
by Teruyoshi
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?

Re: Indicators with ON/OFF buttons

Posted: Wed Feb 02, 2022 7:39 pm
by chris006
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

Posted: Wed Feb 02, 2022 8:25 pm
by kvak
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...

Re: Indicators with ON/OFF buttons

Posted: Wed Feb 02, 2022 11:14 pm
by Borshchov A.N.
chris006 wrote: Wed Feb 02, 2022 2:16 am My first go at incorporating a button into an indicator :)
how to use it in real trading? Does he start each level without looking back at the story?

Re: Indicators with ON/OFF buttons

Posted: Thu Feb 03, 2022 12:29 am
by chris006
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?

Re: Indicators with ON/OFF buttons

Posted: Thu Feb 03, 2022 1:14 am
by josi
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?
for example in a classical retest, like this morning (while bias remains up):

update: or another perfect entry (US100; H1; last night):

Re: Indicators with ON/OFF buttons

Posted: Thu Feb 03, 2022 2:12 am
by Borshchov A.N.
josi wrote: Thu Feb 03, 2022 1:14 am for example in a classical retest, like this morning (while bias remains up):
there is a suspicion that he recalculates the values after the close of the daily session ... there are no false signals on the history. we'll see tomorrow.

Re: Indicators with ON/OFF buttons

Posted: Thu Feb 03, 2022 10:27 am
by kvak
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.