Stock Portfolio Organizer
The ultimate porfolio management solution.
Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Advanced Trailstop System for Amibroker (AFL)
Rating:
3 / 5 (Votes 4)
Tags:
amibroker, stop loss
Advanced Trailstop System
www.tatechnics.in
Screenshots
Similar Indicators / Formulas
DODA BAND BUY SELL
Submitted
by saas almost 12 years ago
JMA Stoploss
Submitted
by kuzukapama over 13 years ago
TSL & HL & New
Submitted
by morgen almost 13 years ago
Stop Loss Indicator
Submitted
by nabcha almost 15 years ago
ABKP Benchmark Bar
Submitted
by amitabh almost 15 years ago
Indicator / Formula
Copy & Paste Friendly
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | _SECTION_BEGIN ( "Advanced Trailstop System" ); ///Advanced Trailing stop - www.tatechnics.in mult= Param ( "multi" , 2.0, 0.1, 10, 0.05); Aper= Param ( "ATR period" , 7, 2, 100, 1 ); atrvalue=(mult* ATR (aper)); Bs[0]=0; //=L; L [0]=0; C [0]=0; for ( i = 9; i < BarCount ; i++ ) { if ( L [ i ] > L [ i - 1 ] AND L [ i ] > L [ i - 2 ] AND L [ i ] > L [ i - 3 ] AND L [ i ] > L [ i - 4 ] AND L [ i ] > L [ i - 5 ] AND L [ i ] > L [ i - 6 ] AND L [ i ] > L [ i - 7 ] AND L [ i ] > L [ i - 8 ] AND L [ i ] > L [ i - 9 ] AND C [ i ] > bs[ i - 1 ]) { bs[ i ] = L [ i ] - ATRvalue[ i ] ; } else { if ( H [ i ] < H [ i - 1 ] AND H [ i ] < H [ i - 2 ] AND H [ i ] < H [ i - 3 ] AND H [ i ] < H [ i - 4 ] AND H [ i ] < H [ i - 5 ] AND H [ i ] < H [ i - 6 ] AND H [ i ] < H [ i - 7 ] AND H [ i ] < H [ i - 8 ] AND H [ i ] < H [ i - 9 ] AND C [ i ] < bs[ i - 1 ] ) { bs[ i ] = H [ i ] + ATRvalue[ i ]; } else { bs[ i ] = bs[ i - 1]; } }} //==================================================== Mycolor= IIf ( C >bs, colorLime , colorRed ); bcolor= IIf ( C >bs, colorYellow , colorBlue ); PlotOHLC ( Open , High , Low , Close , "" , Mycolor, styleBar | styleThick ); Plot (bs, "ATS" ,bcolor,1| styleThick ); Buy = Cover = Cross ( C ,bs); Sell = Short = Cross (bs, C ); shape= Buy * shapeUpArrow + Sell * shapeDownArrow ; PlotShapes ( shapeUpArrow * Buy , colorLime , 0, L , -35 ); PlotShapes ( shapeDownArrow * Sell , colorRed , 0, H , -30 ); SellPrice = ValueWhen ( Sell , C ,1); BuyPrice = ValueWhen ( Buy , C ,1); Long= Flip ( Buy , Sell ); Shrt= Flip ( Sell , Buy ); _SECTION_END (); Filter = Buy OR Sell OR Short OR Cover ; //=================TITLE================================================================================================ _SECTION_BEGIN ( "Title" ); if ( Status ( "action" ) == actionIndicator ) ( Title = EncodeColor ( colorWhite )+ "Advanced Trailstop System " + " - " + Name () + " - " + EncodeColor ( colorRed )+ Interval (2) + EncodeColor ( colorWhite ) + " - " + Date () + " - " + "\n" + EncodeColor ( colorYellow ) + "Op-" + O + " " + "Hi-" + H + " " + "Lo-" + L + " " + "Cl-" + C + " " + "Vol= " + WriteVal ( V )+ "\n" + EncodeColor ( colorLime )+ WriteIf ( Buy , " GO LONG / Reverse Signal at " + C + " " , "" )+ WriteIf ( Sell , " EXIT LONG / Reverse Signal at " + C + " " , "" )+ "\n" + EncodeColor ( colorWhite )+ WriteIf ( Sell , "Total Profit/Loss for the Last Trade Rs." +( C - BuyPrice )+ "" , "" )+ WriteIf ( Buy , "Total Profit/Loss for the Last trade Rs." +( SellPrice - C )+ "" , "" )+ WriteIf (Long AND NOT Buy , "Trade : Long - Entry price Rs." +( BuyPrice ), "" )+ WriteIf (shrt AND NOT Sell , "Trade : Short - Entry price Rs." +( SellPrice ), "" )+ "\n" + WriteIf (Long AND NOT Buy , "Current Profit/Loss Rs." +( C - BuyPrice )+ "" , "" )+ WriteIf (shrt AND NOT Sell , "Current Profit/Loss Rs." +( SellPrice - C )+ "" , "" )); _SECTION_END (); |
1 comments
Leave Comment
Please login here to leave a comment.
Back
THANKYOU SIR !