Re: Indicators with ON/OFF buttons

593
Banzai wrote: Mon Aug 17, 2020 3:15 am

Code: Select all

  //Set bar widths                   
        if(Chart_Scale == 0) {Bar_Width = 2;}
  else {if(Chart_Scale == 1) {Bar_Width = 3;}      
  else {if(Chart_Scale == 2) {Bar_Width = 3;}
  else {if(Chart_Scale == 3) {Bar_Width = 3;}
  else {if(Chart_Scale == 4) {Bar_Width = 7;}
  else {Bar_Width = 13;} }}}}
According to the code,
if the chart scale is zero, which is the minimum, the bar width is 2.
If the chart scale is 5, or the maximum, the bar width is 13.
Anway, I fixed it. In the original indicator, look like it doesn't display quite right???

In the animated gif, look at the words "Chart_Scale ="
and you'll see what's going on.
Perfect!!! Many many thanks Banzai. Hope u have a great week ahead!! Regards Deane
These users thanked the author DVanAssen for the post:
Banzai




Who is online

Users browsing this forum: Abdi, DotNetDotCom [Bot], felixo, friend4you, kvak, Proximic [Bot], ssscary and 83 guests