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 ....
OPEN RANGE STRATEGEY for Amibroker (AFL)
Copy & Paste Friendly
Back
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 69 70 71 72 73 74 75 | _SECTION_BEGIN ( "Price1" ); SetChartOptions (0, chartShowArrows | chartShowDates ); _N (Title = StrFormat ( "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}" , O , H , L , C , SelectedValue ( ROC ( C , 1 ) ) )); Plot ( C , "Close" , ParamColor ( "Color" , colorDefault ), styleNoTitle | ParamStyle ( "Style" ) | GetPriceStyle () ); _SECTION_END (); NewDay = Day ()!= Ref ( Day (), -1); EndDay = ( Day ()!= Ref ( Day (), 1)); DayH = TimeFrameGetPrice ( "H" , inDaily , -1); // yesterdays high DayL = TimeFrameGetPrice ( "L" , inDaily , -1); // low DayC = TimeFrameGetPrice ( "C" , inDaily , -1); // close DayO= ValueWhen (NewDay, O ,1); //Todays Open GPUP=DayO>DayH; GPDN=DayO<DayL; GPUP= ExRem (GPUP,EndDay); GPDN= ExRem (GPDN,EndDay); Ingpup= Flip (gpup,endday); IngpDn= Flip (gpdn,endday); BT = Param ( "BreakoutTime" ,93000,09000,120000); target = Param ( "Target in Percentage" ,2.5,0.1,10,0.1); HighValue= HighestSince (newDay, H ); LowValue= LowestSince (newDay, L ); RangeHigh = ValueWhen ( Cross ( TimeNum () , BT), HighValue); RangeLow = ValueWhen ( Cross ( TimeNum () , BT), LowValue); Buy = (Ingpup OR Ingpdn) AND TimeNum () > BT AND TimeNum () < 150000 AND Cross ( H ,RangeHigh); Short = (Ingpup OR Ingpdn) AND TimeNum () > BT AND TimeNum () < 150000 AND Cross (RangeLow, L ); Buy = ExRem ( Buy ,newDay); Short = ExRem ( Short ,newday); Sell = Cross ( H ,RangeHigh*(1+target/100)) OR Cross (DayH, L ) OR TimeNum ()>151500 ; Cover = Cross (RangeLow*(1-target/100), L ) OR Cross ( H ,DayL) OR TimeNum ()>151500 ; Sell = ExRem ( Sell , Buy ); Cover = ExRem ( Cover , Short ); BuyPrice = ValueWhen ( Buy , C ); ShortPrice = ValueWhen ( Short , C ); CoverPrice = ValueWhen ( Cover , C ); SellPrice = ValueWhen ( Sell , C ); Long = Flip ( Buy , Sell ); Shrt = Flip ( Short , Cover ); SetPositionSize (100, spsShares ); Plot (RangeHigh, "Range High" , colorYellow , styleLine | styleDots ); Plot (RangeLow, "Range Low" , colorBlue , styleLine | styleDots ); PlotShapes ( IIf ( Buy , shapeSquare , shapeNone ), colorBlueGrey , 0, L , Offset=-40); PlotShapes ( IIf ( Buy , shapeSquare , shapeNone ), colorBlueGrey , 0, L , Offset=-50); PlotShapes ( IIf ( Buy , shapeHollowUpArrow , shapeNone ), colorWhite , 0, L , Offset=-45); PlotShapes ( IIf ( Short , shapeSquare , shapeNone ), colorYellow , 0, H , Offset=40); PlotShapes ( IIf ( Short , shapeSquare , shapeNone ), colorYellow , 0, H , Offset=50); PlotShapes ( IIf ( Short , shapeHollowDownArrow, shapeNone ), colorRed , 0, H , Offset=-45); PlotShapes ( Sell * shapeStar , colorWhite ,0, H ,20); PlotShapes ( Cover * shapeStar , colorWhite ,0, L ,-20); |