Good Day
Is it possible to return two different types of lines in one indicator i.e. an MA and an ADX?
I tried below but obviously, only the MA line is returned as ProBuilder probably doesn’t know against what reference to draw the ADX line;
Was thinking maybe to use the MA line itself a the ‘zero’ line and let the ADX line rise of the MA? Any ideas how to do that?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
//variables to add: //RSIPeriod (Default: 2) //MAPeriod (Default: 21) //MAType (Default: 2) //RSIUpperThreshold (Default: 95) //RSILowerThreshold (Default: 5) //ADXPeriod (Default: 21) myrsi=RSI[RSIPeriod](close) myma=Average[MAPeriod,MAType](close) If myrsi>RSIUpperThreshold then r=255 g=0 b=0 Elsif myrsi<RSILowerThreshold then r=0 g=255 b=0 Else r=0 g=0 b=0 endif myADX = ADX[ADXPeriod] return myma coloured(r,g,b) as "Hybrid MA", myADX coloured(0,0,0) as "Average Directional Index" |