(Cross posted @ Forex-Tsd.com)
The following is the code for "sweet spots" in the Shimodax SDX TZ Pivot indicator, a classic IMHO:
(If "sweet spots" =true, a line is drawn at the "00" level and the "50" level.)
//---- High/Low, Open
if (ShowSweetSpots) {
int ssp1, ssp2;
double ds1, ds2;
ssp1= Bid / Point;
ssp1= ssp1 - ssp1%50;
ssp2= ssp1 + 50;
ds1= ssp1*Point;
ds2= ssp2*Point;
SetLevel(DoubleToStr(ds1,Digits), ds1, Black, LineStyle, LineThickness, Time[10]);
SetLevel(DoubleToStr(ds2,Digits), ds2, Black, LineStyle, LineThickness, Time[10]);
gvname=Symbol()+"ds1";
gvval=ds1;
GlobalVariableSet(gvname,gvval);
gvname=Symbol()+"ds2";
gvval=ds2;
GlobalVariableSet(gvname,gvval);
}
So what would need to be added to have two additional lines, one at 85 and one at 15? ( but not at 65 and 35?) Also- does the "Time[10]" variable set the length of the line?
Thanks for your help-
Cheers,
Taters
The following is the code for "sweet spots" in the Shimodax SDX TZ Pivot indicator, a classic IMHO:
(If "sweet spots" =true, a line is drawn at the "00" level and the "50" level.)
//---- High/Low, Open
if (ShowSweetSpots) {
int ssp1, ssp2;
double ds1, ds2;
ssp1= Bid / Point;
ssp1= ssp1 - ssp1%50;
ssp2= ssp1 + 50;
ds1= ssp1*Point;
ds2= ssp2*Point;
SetLevel(DoubleToStr(ds1,Digits), ds1, Black, LineStyle, LineThickness, Time[10]);
SetLevel(DoubleToStr(ds2,Digits), ds2, Black, LineStyle, LineThickness, Time[10]);
gvname=Symbol()+"ds1";
gvval=ds1;
GlobalVariableSet(gvname,gvval);
gvname=Symbol()+"ds2";
gvval=ds2;
GlobalVariableSet(gvname,gvval);
}
So what would need to be added to have two additional lines, one at 85 and one at 15? ( but not at 65 and 35?) Also- does the "Time[10]" variable set the length of the line?
Thanks for your help-
Cheers,
Taters