Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.
-
Welcome Guests
Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.
Search the Community
Showing results for tags 'bollinger band'.
Found 3 results
-
Here is a fast MACD using a Hull Moving Average and a Fractal Moving Average. The FastMACD dots change color when they breach outside their Bollinger Bands (which you can't see). I have taken from other coder's work, so full credit goes to them. I have simply added the faster MAs and incorporated the BBs. This indicator came about just by experimenting. So try an idea out......you never know It seems to pick the highs and lows nicely. I have coded it with a standard MACD so I can see divergences. You are quite welcome to add or remove anything and post it if you think it has merit. The indicator also has a gapless code added which will take into account opening gaps on intraday charts. I use this with Blu-Ray's Paintbars (Similar to the Heikin Ashi), Double Stochastics and The Gapless Squeeze (here): http://www.traderslaboratory.com/forums/f46/gapless-squeeze-6161.html#post68059 Here is the code: {**************FMA Function******************} // generates very smooth and responsive moving average // copyright 2008 John McCormick // feel free to copy and use this code royalty free // as long as you don't remove the above acknowledgement // Inputs: Price(numericseries), Length(numericsimple); Vars: j(0), workinglen(maxlist(1,absvalue(Length))), peak(workinglen/3), tot(0), divisor(0); Array: val[100](0); if workinglen>100 then workinglen=100; // use larger array to handle lengths over 100 tot=0; divisor=0; for j=1 to floor(workinglen+1) begin if j<=peak then val[j]=j/peak else val[j]=(workinglen+1-j)/(workinglen+1-peak); tot=tot+price[j-1]*val[j]; divisor=divisor+val[j]; end; if divisor<>0 then FMA_smooth=tot/divisor; {jtHMA - Hull Moving Average Function} {Author: Atavachron} {May 2005} Inputs: price(NumericSeries), length(NumericSimple); Vars: halvedLength(0), sqrRootLength(0); { Original equation is: --------------------- waverage(2*waverage(close,period/2)-waverage(close,period), SquareRoot(Period) Implementation below is more efficient with lengthy Weighted Moving Averages. In addition, the length needs to be converted to an integer value after it is halved and its square root is obtained in order for this to work with Weighted Moving Averaging } if ((ceiling(length / 2) - (length / 2)) <= 0.5) then halvedLength = ceiling(length / 2) else halvedLength = floor(length / 2); if ((ceiling(SquareRoot(length)) - SquareRoot(length)) <= 0.5) then sqrRootLength = ceiling(SquareRoot(length)) else sqrRootLength = floor(SquareRoot(length)); Value1 = 2 * WAverage(price, halvedLength); Value2 = WAverage(price, length); Value3 = WAverage((Value1 - Value2), sqrRootLength); jtHMA = Value3; {***************FastMACD Function********************** inputs: Price( numericseries ), FastLength( numericsimple ), { this input assumed to be a constant >= 1 } SlowLength( numericsimple ) ; { this input assumed to be a constant >= 1 } MACD_HMA_FMA = jthma( Price, FastLength ) - FMA_smooth( Price, SlowLength ) ; { ** Copyright (c) 2001 - 2009 TradeStation Technologies, Inc. All rights reserved. ** ** TradeStation reserves the right to modify or overwrite this analysis technique with each release. ** } {******************FastMACD Indicator*************} inputs: price(close), fastlength (12), slowlength (26), signal (9), BBstDv(1), DirColor(True), BBColorUp(White), BBColorDn(Magenta), ZeroColor(DarkCyan); VARS: BB_Macd(0), MyMACD(0), Avg(0), SDev(0), Alert_Msg(" "), Upper_Band(0), Lower_Band(0), BBColor(0), Cross_Up(False), Cross_Dn(False); // gapless day transitions - John McCormick May 2008 Vars: RelO(0), // Relative Open RelH(0), // Relative High RelL(0), // Relative low RelC(0), // Relative Close gap(0), // the opening gap (modified by the gap coefficient) GapCoef(1.0), // Gap Coefficient Accum(0); // The sum of all the daily gaps if currentsession(0)<>currentsession(0)[1] or date<>date[1] then begin gap=GapCoef*(O-C[1]); Accum=Accum+gap; end; if BarType<=1 then //Valid only for Tick or Intraday begin RelO = O-Accum; RelC = C-Accum; RelH = H-Accum; RelL = L-Accum; end else begin RelO = O; RelC = C; RelH = H; RelL = L; end; // Gapless - end Var: GL_Price(0); GL_price = RelC; If Price=open then GL_price = RelO; If Price=high then GL_price = RelH; If Price=low then GL_price = RelL; BB_Macd = FMA_smooth(MACD_HMA_FMA(GL_price, FastLength, SlowLength),3)*0.5 ;//added xaverage to smooth 'bumps' MyMACD = MACD( GL_price, FastLength, SlowLength )*1.5 ; //Avg = FMA_smooth( BB_Macd, Signal); Avg = XAverage( MyMACD,Signal ) ; SDev = StandardDev( BB_Macd, Signal, 1); Upper_Band = ( Avg + BBStDv * SDev ); Lower_Band = ( Avg - BBStDv * SDev ); //******************************************************// // Sub-Graph plot logic. // //******************************************************// if DirColor=True then begin If BB_Macd > BB_Macd[1] then BBColor = BBColorUp else BBColor = BBColorDn; If Cross_Up = False then if BB_Macd > Upper_Band then begin Cross_Up = True; Cross_Dn = False; BBColor = Cyan; If CheckAlert then Alert( "BB cross up " + Alert_Msg ); end; If Cross_Dn = False then if BB_Macd < Lower_Band then begin Cross_Up = False; Cross_Dn = True; BBColor = Yellow; If CheckAlert then Alert( "BB cross down " + Alert_Msg ); end; Plot1( BB_Macd, "BBMACD" ,BBColor ); Plot2(Avg, "Signal",Cyan); Plot4( 0, "Zero_Line", ZeroColor ); Plot3(MyMACD, "MACD", green,2); end else setplotcolor(1,green); @SK_FAST_MACDBB.ELD
-
Does anyone have a Bollinger Band that has a middle band plot a different color as it moves up/down? This is similar to T3 trend band.
-
Hi.. I am looking for an RSI with BB indicator for tradestation 8 a nonbn price frame rsi with no overbought and oversold and BB overlay for the indicator frame.... tried to build my own.... but the bads just squish on the indicator frame... would appreciate help with this... thanks sergej