| Technical Analysis The technical discussion forum for traders. |
![]() | | Tweet | |
| | #1 | ||
![]() | Help with TS Paint Bar I need help with TS paint bar I like to paint bar with MACD Histogram colors inputs: FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ) , HistabvZeroUpColor(Green) , HistabvZeroDwnColor(DarkG reen), HistblwZeroFallColor(Red) , HistblwZeroRiseColor(Dark Red); variables: MACDValue(0), MACDAvg(0), MACDDiff(0); MACDValue = MACD( Close, FastLength, SlowLength ); MACDAvg = XAverage(MACDValue, MACDLength); MACDDiff = MACDValue - MACDAvg ; Plot1( MACDValue, "MACD" ) ; Plot2( MACDAvg, "MACDAvg" ) ; {Plot3( MACDDiff, "MACDDiff" ) ;} Plot4( 0, "ZeroLine" ) ; var:color(0); plot3(MACDDiff,"MACDDiff" ,color); if MACDDiff > 0 Then begin If MacdDiff > MacdDiff[1] then setplotcolor(3, HistabvZeroUpColor) else setplotcolor(3, HistabvZeroDwnColor); end; if MACDDiff < 0 Then begin If MACDDiff < MACDDiff[1]then setplotcolor(3, HistblwZeroFallColor) else setplotcolor(3, HistblwZeroRiseColor); end; { Alert criteria } if MACDDiff crosses over 0 then Alert( "Bullish alert" ) thanks in advance | ||
| |
|
| | #2 | ||
![]() | Re: Help with TS Paint Bar inputs: FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ) , HistabvZeroUpColor(Green) , HistabvZeroDwnColor( DarkGreen ), HistblwZeroFallColor(Red) , HistblwZeroRiseColor(Dark Red); variables: MACDValue(0), MACDAvg(0), MACDDiff(0); MACDValue = MACD( Close, FastLength, SlowLength ); MACDAvg = XAverage(MACDValue, MACDLength); MACDDiff = MACDValue - MACDAvg ; plotpb(h,l,o,c,"MACDDiff" ); if MACDDiff > 0 Then begin If MacdDiff > MacdDiff[1] then begin setplotcolor(1, HistabvZeroUpColor); setplotcolor(2, HistabvZeroUpColor); setplotcolor(3, HistabvZeroUpColor); setplotcolor(4, HistabvZeroUpColor); end; If MacdDiff < MacdDiff[1] then begin setplotcolor(1, HistabvZeroDwnColor); setplotcolor(2, HistabvZeroDwnColor); setplotcolor(3, HistabvZeroDwnColor); setplotcolor(4, HistabvZeroDwnColor); end; end; if MACDDiff < 0 Then begin If MACDDiff < MACDDiff[1]then begin setplotcolor(1, HistblwZeroFallColor); setplotcolor(2, HistblwZeroFallColor); setplotcolor(3, HistblwZeroFallColor); setplotcolor(4, HistblwZeroFallColor); end; If MACDDiff > MACDDiff[1]then begin setplotcolor(1, HistblwZeroRiseColor); setplotcolor(2, HistblwZeroRiseColor); setplotcolor(3, HistblwZeroRiseColor); setplotcolor(4, HistblwZeroRiseColor); end; end; { Alert criteria } if MACDDiff crosses over 0 then Alert( "Bullish alert" ) Hope this helps Blu-Ray
__________________ “ Search is the ultimate expression of the power of the individual, using a computer, looking at the world, and finding exactly what they want ” – Eric Schmidt, Google | ||
| |
|
| | #3 | ||
![]() | Re: Help with TS Paint Bar thanks | ||
| |
|
![]() |
| Tags |
| paint, paintbar |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Paint Bar Comparison | Robert2617 | Technical Analysis | 5 | 11-17-2008 07:00 AM |