Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
ACD Breakout Chart for Amibroker (AFL)
This is code for plotting ACD. The best place to find out more about ACD is this site ACD Info
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 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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | // ACD Plot // LSMA is Linreg // ACD.afl // v 1.2 9/13/2004 SetChartBkColor (16); Per = Param ( "Periods" ,13); Per2 = Param ( "Periods 2" ,34); LSMAPer = Param ( "LMSA Period" ,25); Offset = Param ( "A Level" ,1); ACDFlag = 0; IntervalFlag = IIf ( Interval (format=0)==300,1,0); strInterval = Interval (format=2); strWeekday = StrMid ( "SunMonTueWedThuFriSat" , SelectedValue ( DayOfWeek ())*3,3); if ( StrFind ( Name (), "YM" ) ) { ACDOffset = 10; ACDFlag = 1; ACDTime = 94500; } if ( StrFind ( Name (), "ER" ) ) { ACDOffset = 0.5; ACDFlag = 1; ACDTime = 93500; } if ( StrFind ( Name (), "ES" ) ) { ACDOffset = 2; ACDFlag = 1; ACDTime = 94500; } if ( StrFind ( Name (), "NQ" ) ) { ACDOffset = 3; ACDFlag = 1; ACDTime = 94500; } if ( StrFind ( Name (), "ZB" ) ) { ACDOffset = 0.15; ACDFlag = 1; ACDTime = 83000; } if ( StrFind ( Name (), "ZN" ) ) { ACDOffset = 0.15; ACDFlag = 1; ACDTime = 83000; } GraphXSpace = 1; Shift = 2; // calculate the pivot range PDH = TimeFrameGetPrice ( "H" , inDaily , -1 ); // gives previous Day High when working on intraday data PDL = TimeFrameGetPrice ( "L" , inDaily , -1 ); PDC = TimeFrameGetPrice ( "C" , inDaily , -1 ); PP = (PDH+PDL+PDC)/3; DIFF = abs ((PDH+PDL)/2 - PP); PRHi = PP + DIFF; PRLo = PP - DIFF; EMA1 = EMA (Avg,Per); EMA2 = EMA (Avg,Per2); LSMA = LinearReg (Avg, LSMAPer); Plot ( C , "Close" , colorWhite , styleCandle ); if (ACDFlag AND IntervalFlag) { ORHigh= ValueWhen ( TimeNum ()<ACDTime, HighestSince ( DateNum ()> Ref ( DateNum (),-1), High )); ORLow = ValueWhen ( TimeNum ()<ACDTime, LowestSince ( DateNum ()> Ref ( DateNum (),-1), Low )); Plot (PRHi, "PRHigh" , colorWhite , styleDots + styleNoLine + styleNoLabel ); Plot (PRLo, "PRLow" , colorWhite , styleDots + styleNoLine + styleNoLabel ); Plot (ORHigh, "ORHigh" , colorBlue ,style= styleStaircase + styleDots + styleNoLine + styleNoLabel ); Plot (ORLow, "ORLow" , colorBlue ,style= styleStaircase + styleDots + styleNoLine + styleNoLabel ); Plot (ORHigh+ACDOffset, "AUp" , colorYellow ,style= styleStaircase + styleDots + styleNoLine ); Plot (ORLow-ACDOffset, "ADn" , colorYellow ,style= styleStaircase + styleDots + styleNoLine ); // Plot(LSMA, "LSMA", colorYellow,style=styleThick); } Title= Name ()+ " [" +strInterval+ "] " + strWeekday + " " + Date ()+ " Close: " + WriteVal ( C ,format=1.2) + " " + WriteVal (per,format=1.0)+ "-Per MA: " + WriteVal (EMA1,format=1.2)+ " " + WriteVal (per2,format=1.0)+ "-Per MA: " + WriteVal (EMA2,format=1.2) + " PR High: " + WriteVal (PRHi,format=1.2) + " PR Low: " + WriteVal (PRLo,format=1.2); |
1 comments
Leave Comment
Please login here to leave a comment.
Back
now.. this is only set up to work for futures..
obviously you cant just put the below condition in and make it work for stocks..