MACD Signals Upper Chart Indicator for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
Warehouse
> MACD Signals Upper Chart

> Mobius

> Chat Room Request 03.03.2016
thinkScript Code
Rich (BB code):
input fastLength = 8; 
input slowLength = 21; 
input MACDLength = 5; 
input averageType = AverageType.EXPONENTIAL; 
  
def Value = MACD(fastLength, slowLength, MACDLength, averageType).Value; 
def Avg = MACD(fastLength, slowLength, MACDLength, averageType).Avg; 

 
plot upArrow = if Value < 0 and  
                  Value crosses above Avg 
                then low 
                else double.nan; 
upArrow.SetPaintingStrategy(paintingStrategy.Arrow_UP); 
upArrow.SetDefaultColor(Color.Green); 
upArrow.SetLineWeight(3); 

 
plot dnArrow = if Value > 0 and  
                  Value crosses below Avg 
                then high 
                else double.nan; 
dnArrow.SetPaintingStrategy(paintingStrategy.Arrow_DOWN); 
dnArrow.SetDefaultColor(Color.Red); 
dnArrow.SetLineWeight(3); 
  
Alert(upArrow, "UP", Alert.Bar, Sound.Chimes); 
Alert(dnArrow, "DN", Alert.Bar, Sound.Ring);
 
Last edited:

Top