BollingerBands

Did Bollinger Bands help you?

  • Yes

    Votes: 239 77.9%
  • No

    Votes: 68 22.1%

  • Total voters
    307

rajendrani

Well-Known Member


Dont know much about coding. Added "Zig Zag Indicator with Valid Entry and Exit Points" from AMi Library.

Hope this helps

code is:

//z_ZigZagValid
// ******** CHARTING
PercentChange = 6;
mystartbar = SelectedValue(BarIndex()); // FOR GRAPHING

mystartbardate = LastValue(ValueWhen(mystartbar == BarIndex(), DateNum(),1));

InitialValue = LastValue(ValueWhen(mystartbardate == DateNum(), C , 1 ) ) ;
Temp1 = IIf(BarIndex() >= mystartbar, InitialValue, Null) ;
Plot(Temp1, " ", colorBlack,styleLine);
Plot((1+(LastValue(PercentChange)/100))*(Temp1), " ", colorGreen, styleLine) ;
Plot((1-(LastValue(PercentChange)/100))*(Temp1), " ", colorRed, styleLine) ;

ZZ = Zig(C,LastValue(PercentChange)) ;
PivotLow = Ref(IIf(Ref(ROC(ZZ,1),-1) < 0 AND ROC(ZZ,1) > 0, 1, Null),1);
PivotHigh = Ref(IIf(Ref(ROC(ZZ,1),-1) > 0 AND ROC(ZZ,1) < 0, 1, Null),1);

PlotShapes( shapeCircle*PivotLow, colorGreen,0, L, -20) ;
PlotShapes( shapeCircle*PivotHigh,colorRed,0,H, 20) ;

Buy_Valid = IIf(C>(1+(LastValue(PercentChange)/100))*(ValueWhen(PivotLow, C, 1))
AND ROC(ZZ,1) > 0,1,0);
Sell_Valid = IIf(C<(1-(LastValue(PercentChange)/100))*(ValueWhen(PivotHigh, C, 1))
AND ROC(ZZ,1) < 0,1,0);

Buy_Valid = ExRem(Buy_Valid,Sell_Valid);
Sell_Valid = ExRem(Sell_Valid,Buy_Valid);

PlotShapes( shapeUpArrow*Buy_Valid, colorGreen,0, L, -20);
PlotShapes( shapeDownArrow*Sell_Valid, colorRed,0,H, -20) ;

BarColors =
IIf(BarsSince(Buy_Valid) < BarsSince(Sell_Valid)
AND BarsSince(Buy_Valid)!=0, colorGreen,
IIf(BarsSince(Sell_Valid) < BarsSince(Buy_Valid)
AND BarsSince(Sell_Valid)!=0, colorRed, colorBlue));

Plot(C, " ", BarColors, styleBar ) ;
Plot(ZZ," ", colorLightGrey,styleLine|styleThick);
Plot(ZZ," ", BarColors,styleDots|styleNoLine);

Title = Name() + " " + Date() + WriteIf(PivotLow, " Up Pivot ","")+WriteIf(PivotHigh," Down Pivot ","")+ WriteIf(Buy_Valid, " Buy Point ", "") + WriteIf(Sell_Valid, " Sell Point ", "") ;
Thanks ajax for the afl code
 

columbus

Well-Known Member

Ajax

Well-Known Member
Hi Columbus,

Ok As Promised Posting The ZZBBSMA...:)
Sorry Don't Have AMI or MS Therefore Can't Post For NF Or Stocks, But I Use This For FX & It s Helpful For Intraday & Positional This Particular One Is Of USD/JPY 15 Min.

Parameters Are Same As I Had Posted Earlier Here




Happy & Safe Trading

SavantGarde
Looks good....

But SG question is at what point in time you get the reversal point.
Is it right when its formed or a few bars later on (In retrospect).
If later is the case then, atleast gives an idea of trend direction
and you can flow along the line.
Pl elaborate:confused:
 

columbus

Well-Known Member
Hi Columbus,

Ok As Promised Posting The ZZBBSMA...:)
Sorry Don't Have AMI or MS Therefore Can't Post For NF Or Stocks, But I Use This For FX & It s Helpful For Intraday & Positional This Particular One Is Of USD/JPY 15 Min.

Parameters Are Same As I Had Posted Earlier Here



Happy & Safe Trading

SavantGarde
Dear Savant/Friends,

Excellent.We have many such indicators like,

Keltner channels
Standard Error Bands
Envelopes etc..

If people like AJAX can contribute to this ,by virtue of having familiarity
with Amibroker,it will be great contribution.
 
Last edited:

SavantGarde

Well-Known Member
Hi Ajax,

Ok This What I Do With My Forex.

Now You Will Notice There is No ZZ On The Last 3 Bars, But When The Last Up Move Came Up I Squared Of 50, 30 & 20% Which Earler & While Squaring My Last 20% I Went Short 50% On Top Therafter, 30% & 20%, Since The Market Was Going To Close For The Weekend In A Few Hours, I Squared Up Everything In Final Few Minutes Of The Downthrust & I Am Long Now In Keeping With Daily Trend, When The Market Opens Sunday Early Morning.

Of Course You Don't See The Progress Of The Bars Till The End Will Try & Post That A Little Later.

Idea Basically Is You Stagger Your Trades When The Line Comes Up That Way One Can Milk Some More & be Safe, Especially In Forex 0.01 (1 Pip) Translates To Almost 10 USD For USDJPY Pair Other Pairs Are 0.0001 (1 Pip)


Happy & Safer Trading

SavantGarde

Looks good....

But SG question is at what point in time you get the reversal point.
Is it right when its formed or a few bars later on (In retrospect).
If later is the case then, atleast gives an idea of trend direction
and you can flow along the line.
Pl elaborate:confused:
 
Thread starter Similar threads Forum Replies Date
B AmiBroker 0

Similar threads