[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Mark Fisher ACD breakout



PureBytes Links

Trading Reference Links


This codes doesn't work. It has a lot of syntax error. 


--- In amibroker@xxxxxxxxxxxxxxx, "Geo Singleman" <geosing@xxxx> wrote:
> I think I posted this before.. Here is one version. This plots the
opening
> range, ACD levels for some instruments I trade and the daily pivot
range.
> 
> Geo
> --
> 
> 
> // ACD Plot
> // ACD.afl
> // v 1.1 9/3/2004 (GS)
> // plots ACD levels and pivot range from daily in intraday 5 min charts
> 
> 
> Offset = Param("A Level",1);
> ACDFlag = 0;
> IntervalFlag = IIf(Interval(format=0)==300,1,0); // flag set to true
for 5
> min time frame only
> 
> 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 = 1;     // ACD number
>  ACDFlag = 1;
>  ACDTime = 94500; // Opening Range time period
> 
>  }
> if( StrFind( Name(), "ES" ) )
>  {
>  ACDOffset = 2;
>  ACDFlag = 1;
>  ACDTime = 94500;
> 
>  }
> 
> if( StrFind( Name(), "NQ" ) )
>  {
>  ACDOffset = 3;
>  ACDFlag = 1;
>  ACDTime = 94500;
> 
>  }
> 
> 
> 
> Shift = 2;
> MaxGraph = 7;
> 
> // 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;
> 
> 
> Plot(Close,"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+st
> yleNoLabel);
>
Plot(ORLow,"ORLow",colorBlue,style=styleStaircase+styleDots+styleNoLine+styl
> eNoLabel);
>
Plot(ORHigh+ACDOffset,"AUp",colorYellow,style=styleStaircase+styleDots+style
> NoLine);
>
Plot(ORLow-ACDOffset,"ADn",colorYellow,style=styleStaircase+styleDots+styleN
> oLine);
> 
> }
> 
> Title=Name()+" ["+strInterval+"] "+ strWeekday + " " +Date()+ " Close:
> "+WriteVal(C,format=1.2) +" "+WriteVal(per,format=1.0)+"-Per MA: "
> +WriteVal(Graph1,format=1.2)+" " + WriteVal(per2,format=1.0)+"-Per MA: "
> +WriteVal(Graph1,format=1.2) + " PR High:
"+WriteVal(PRHi,format=1.2) + " PR
> Low: "+WriteVal(PRLo,format=1.2)  ;





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/