PureBytes Links
Trading Reference Links
|
The problem came from the last lines which are not necessary .
With this one , no syntax error BUT it shows only the price chart.
Do not plot any pivot or ivot ranges.
Could anybody have a look at this:
// 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
+styleNoLabel);
Plot
(ORLow,"ORLow",colorBlue,style=styleStaircase+styleDots+styleNoLine+s
tyleNoLabel);
Plot
(ORHigh+ACDOffset,"AUp",colorYellow,style=styleStaircase+styleDots+st
yleNoLine);
Plot(ORLow-
ACDOffset,"ADn",colorYellow,style=styleStaircase+styleDots+styleNoLin
e);
}
--- In amibroker@xxxxxxxxxxxxxxx, "jism1992" <gdihia@xxxx> wrote:
>
> 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+s
tyl
> > eNoLabel);
> >
> Plot
(ORHigh+ACDOffset,"AUp",colorYellow,style=styleStaircase+styleDots+st
yle
> > NoLine);
> >
> Plot(ORLow-
ACDOffset,"ADn",colorYellow,style=styleStaircase+styleDots+styleN
> > oLine);
> >
> > }
Perhaps DIMITRIS ??
Best regards
> >
> > 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 --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/
|