Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Weekly SMA System with ATR Stop for Amibroker (AFL)
Weekly SMA System with ATR stop. Amibroker reports that this formula references future quotes.
Similar Indicators / Formulas
Indicator / Formula
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 | SetBarsRequired (10000,10000); SetFormulaName ( "Weekly SMA System with ATR stop" ); SetTradeDelays ( 1, 1, 1, 1 ); SetOption ( "initialequity" , 100000 ); SetOption ( "PriceBoundChecking" , 1 ); SetOption ( "CommissionMode" , 2 ); SetOption ( "CommissionAmount" , 32.95 ); SetOption ( "UsePrevBarEquityForPosSizing" , True ); SetOption ( "MaxOpenPositions" , 20); // SetOption ( "AllowPositionShrinking" , False ); SetOption ( "AllowSameBarExit" , False ); ATRLevel = 3* ATR (20); Buy = C > MA ( C ,30); PositionSize=-10; // invest 10% of portfolio equity in single trade Sell = 0; trailARRAY = Null ; trailstop = 0; for ( i = 1; i < BarCount ; i++ ) { if ( trailstop == 0 AND Buy [ i ] ) { trailstop = H [ i ]- ATRLevel[ i ]; } else Buy [ i ] = 0; // remove excess buy signals if ( trailstop > 0 AND Low [ i ] < trailstop ) { Sell [ i ] = 1; SellPrice [ i ] = trailstop; trailstop = 0; } if ( trailstop > 0 ) { trailstop = Max ( H [ i ]- ATRLevel[ i ], trailstop ); trailARRAY[ i ] = trailstop; } } Sell = trailARRAY; Buy = ExRem ( Buy , Sell ); Sell = ExRem ( Sell , Buy ); |
1 comments
Leave Comment
Please login here to leave a comment.
Back
good afl..