Skip to main content

P&T for Amibroker (AFL)

hanoom almost 13 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 3)
  • Tags:
    trading system, amibroker

First time for me Peak and Trough..

Screenshots

Indicator / Formula

Copy & Paste Friendly
qZZP   = Param("ZigZag % :",  1, 0.1, 5, 0.1);
zUpper = Ref(Peak(C,qZZP,1),-1);          // Upper band
zLower = Ref(Trough(C,qZZP,1),-1);        // Lower band
Buy    = Nz(Cross(C,zUpper),0);           //Nz: convert NULL before 1st signal to 0
Sell   = Nz(Cross(zLower, C),0);
Plot(C,"",Colorgrey40,styleCandle);      // Plot price chart
PlotShapes(Sell*shapeDownArrow, colorRed, 0, High,-20);  //plot down arrow 20 pixel above High price of that bar
PlotShapes(Buy*shapeUpArrow, ColorRGB(0,255,0), 0, Low,-20); //plot up arrow 20 pixel below Low price of that b

0 comments

Leave Comment

Please login here to leave a comment.