Re: Indicators with ON/OFF buttons

2011
太虚一毫 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.
These users thanked the author mrtools for the post (total 2):
太虚一毫, erynade


Re: Indicators with ON/OFF buttons

2012
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

2019
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.
These users thanked the author kvak for the post (total 4):
太虚一毫, Teruyoshi, talaate, Thangarasu

Re: Indicators with ON/OFF buttons

2020
[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.


Who is online

Users browsing this forum: Abdi, bbookgenius, ChatGPT [Bot], Facebook [Crawler], Jimmy, kvak, Majestic-12 [Bot], muhammadFarooq2k20, whiteadrian23 and 105 guests