Page 202 of 371

Re: Indicators with ON/OFF buttons

Posted: Thu Apr 14, 2022 4:08 pm
by mrtools
太虚一毫 wrote: Thu Apr 14, 2022 3:40 pm Hello teacher!
No need to display numbers (red 1.68, white 1.68), how to modify the code?
Image
Around line 309 try something like

Code: Select all

If (ShowLabels}
{
then on line 362 add another

Code: Select all

}
then on around line 48 add

Code: Select all

extern bool ShowLabels = false;
that should work and make showing those labels a true/false option

ps) just to add, far as I can tell that indicator is using TMA Centered which recalculates/repaints.

Re: Indicators with ON/OFF buttons

Posted: Thu Apr 14, 2022 4:30 pm
by 太虚一毫
mrtools wrote: Thu Apr 14, 2022 4:08 pm Around line 309 try something like

Code: Select all

If (ShowLabels}
{
then on line 362 add another

Code: Select all

}
then on around line 48 add

Code: Select all

extern bool ShowLabels = false;
that should work and make showing those labels a true/false option

ps) just to add, far as I can tell that indicator is using TMA Centered which recalculates/repaints.


Thanks mrtools!

Re: Indicators with ON/OFF buttons

Posted: Thu Apr 14, 2022 4:49 pm
by josi
mrtools wrote: Thu Apr 14, 2022 4:08 pm
Tried - didn't work with me....

Re: Indicators with ON/OFF buttons

Posted: Thu Apr 14, 2022 5:20 pm
by 太虚一毫
kvak wrote: Thu Apr 14, 2022 8:43 am Added button
Image


Not sure if 10.2 TMA slope v.1.4B 4.30_Mod.mq4 redraws. If it doesn't redraw, please add a button to it by Kvak teacher. Infinite merit! :thumbup:

Re: Indicators with ON/OFF buttons

Posted: Thu Apr 14, 2022 5:37 pm
by sal
please add BUTTON for INSIDE BAR

Re: Indicators with ON/OFF buttons

Posted: Thu Apr 14, 2022 7:27 pm
by Teruyoshi
kvak wrote: Thu Apr 14, 2022 8:36 am Try....button is not for arrows.
Thanks for spending your time adding on-off function. :hug:
It is a little hard to say, but is it also possible to put on-off function to arrows?
I mean I want to on and off the band and arrows at the same time when I click the button.

Re: Indicators with ON/OFF buttons

Posted: Fri Apr 15, 2022 7:55 am
by kvak
太虚一毫 wrote: Thu Apr 14, 2022 5:20 pm Not sure if 10.2 TMA slope v.1.4B 4.30_Mod.mq4 redraws. If it doesn't redraw, please add a button to it by Kvak teacher. Infinite merit! :thumbup:
It is the same like previous 10.2 tma. Repaint.

Re: Indicators with ON/OFF buttons

Posted: Fri Apr 15, 2022 8:05 am
by kvak
sal wrote: Thu Apr 14, 2022 5:37 pm please add BUTTON for INSIDE BAR
Added button

Re: Indicators with ON/OFF buttons

Posted: Fri Apr 15, 2022 9:00 am
by kvak
Teruyoshi wrote: Thu Apr 14, 2022 7:27 pm Thanks for spending your time adding on-off function. :hug:
It is a little hard to say, but is it also possible to put on-off function to arrows?
I mean I want to on and off the band and arrows at the same time when I click the button.
I make this....in your file is arrows make as object and this sometimes is problem to make it "buttoned"
Also added option to show only first arrow or all.

Re: Indicators with ON/OFF buttons

Posted: Fri Apr 15, 2022 3:16 pm
by Teruyoshi
[quote=kvak post_id=1295464742 time=1649977253 user_id=4930099]
I make this....in your file is arrows make as object and this sometimes is problem to make it "buttoned"
Also added option to show only first arrow or all.

Thank you for making.
This is much better than expected and makes my chart cleaner.
Many Thanks for your warm thoughts. :hug:

I am not a coder and don't have much knowledge but this time I am going to write about how to calculate the delay of MA.
Although EMA is difficult, SMA and LWMA is easy to calculate.

SMA=(n-1)/2
LWMA=(n-1)/3
For example, if you use 21sma, it means you are analyzing your chart on 10 period.
Of course, 1 MA, which is price itself, doesn't delay( (1-1)/2=0).
 I hope this could be of help to anyone when considering.