atlanta ga usa
Experience: Advanced
Platform: tradestation, ninja trader
Trading: es
Posts: 12 since Aug 2011
Thanks Given: 10
Thanks Received: 5
|
thanks for pointing this out! i completely forgot to post the code on the first post so here it is:
inputs: FastLength( 8 ),
SlowLength( 161 ),
Length( 8 ) ,
StDv(1),
OBColor (Green),
OSColor (Red);
variables: MyMACD( 0 ), MACDAvg( 0 ), MACDDiff( 0 ), BB_Macd (0),
Avg(0),
SDev(0),
Upper_band(0),
Lower_band(0);
MyMACD = MACD( Close, FastLength, SlowLength ) ;
MACDAvg = XAverage( MyMACD, Length ) ;
MACDDiff = MyMACD - MACDAvg ;
BB_Macd= MACD( Close, FastLength, SlowLength ) ;
Avg = XAverage(BB_Macd,Length);
SDev = StdDev( BB_Macd, Length ) ;
Upper_Band = Avg + StDv * SDev ;
Lower_Band = Avg - StDv * SDev ;
Plot1( MyMACD, "MyMACD" ) ;
Plot2( 0, "ZeroLine" ) ;
Plot3(BB_Macd, "BBMACD");
Plot4(Upper_Band, "HighBand");
Plot5(Lower_Band, "LowBand");
{ Alert criteria }
if MyMACD > 0 then
SetPlotColor(1, OBColor);
if MyMACD < 0 then
SetPlotColor(1, OSColor);
If 0 > MyMACD then
Setplotcolor(2, OSColor);
If 0 < MyMACD then
setplotcolor(2, OBColor);
|