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

[amibroker] Re: formula trouble



PureBytes Links

Trading Reference Links

I have tested the code on YM RT one minute. Seems to work ok on the 
Yellow marker, But no Green up marks.

Seems like a problem exists on Cond 1, 3, and 5. I have made slight 
changes.

Ray

LRSBval= -0.12; 
LRSSval = 0.11;
Length3 = Length4 = FDBLen = FDSLen = MAvgLen = 20;
FDBuy = 6; 
FDSell = 94; 
PctAbvMA = .1; 
PctBlwMA = .05;
PctAbvMAValue = MA(C,MAvgLen) * (100- PctAbvMA) / 100;
PctBlwMAValue = MA(C,MAvgLen) * (100+ PctBlwMA) / 100;

FDBVal = StochD(FDBLen);
FDSVal = StochD(FDSLen);

condition1 = C < PctAbvMAValue;
condition2 = C > PctBlwMAValue;
condition3 = LinRegSlope(C,length3)*LRSSval;
condition4 = LinRegSlope(C,20)>LRSSval;

condition5 = (FDBVal <= FDBuy AND FDBVal > Ref(FDBVal,-1)) 
OR (Ref(FDBVal, -1) <= FDBuy AND FDBVal > Ref(FDBVal,-1));

condition6= (FDSVal >= FDSell AND FDSVal < Ref(FDSVal,-1)) 
OR (Ref(FDSVal,-1) >= FDSell AND FDSVal < Ref(FDSVal,-1));

PlotShapes((condition1 AND condition3 AND condition5)
*shapeUpArrow,colorBrightGreen,0,L);

PlotShapes((condition2 AND condition4)
*shapeDownArrow,colorYellow,0,H);

//Plot(C,"",colorGreen,64);
Plot( Close, "", colorBlack, styleCandle );
GraphXSpace =10;


--- In amibroker@xxxxxxxxxxxxxxx, "ricko8294_98" <ricko@xxxx> wrote:
> I have made a stab at translating the code.
> I have to assume that the function LSR() is LinRegSlope()
> I have also added a line to plot the stock.
> 
> Perhaps someone can check this code
> 
> LRSBval= -0.12; LRSSval = 0.11; 
> Length3 = Length4 = FDBLen = FDSLen = MAvgLen = 20;
> FDBuy = 6; FDSell = 94; PctAbvMA = .1; PctBlwMA = .05;
> PctAbvMAValue = MA(C,MAvgLen) * (100- PctAbvMA) / 100;
> PctBlwMAValue = MA(C,MAvgLen) * (100+ PctBlwMA) / 100; 
> FDBVal = StochD(FDBLen);
> 
> FDSVal = StochD(FDSLen); 
> condition1 = C < PctAbvMAValue;
> condition2 = C > PctBlwMAValue; 
> condition3 = LinRegSlope(C,length3)*LRSSval;
> condition4= LinRegSlope(C,20)>LRSSval;
> condition5= (FDBVal <= FDBuy AND FDBVal > Ref(FDBVal,-1)) OR (Ref
> (FDBVal, -1) <= FDBuy AND FDBVal > Ref(FDBVal,-1)); 
> condition6= (FDSVal >= FDSell AND FDSVal < Ref(FDSVal,-1)) OR (Ref
> (FDSVal,-1) >= FDSell AND FDSVal < Ref(FDSVal,-1));
> PlotShapes((condition1 AND condition3 AND condition5)
*shapeUpArrow, 
> colorBrightGreen,0,L);
> PlotShapes((condition2 AND condition4)
> *shapeDownArrow,colorYellow,0,H);
> Plot(C,"",colorGreen,64);
> 
> Hope it helps
> Rick
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "m.smith" <ink@xxxx> wrote:
> > 
> > This is a "pivot formula" not in amibroker. Will someone look at 
> this and
> > see if it can be translated? I have been hasseling with this 
> probably more
> > than it is worth. Thanks. Marshall
> > 
> > {scalper pivot points } Input: LRSBval(-0.12), {level which buys 
> must be
> > below} LRSSval(0.11), {level which sells must be above} Length3
(20),
> {Length
> > for Buy LRS} Length4(20),{Length for Sell LRS} FDBLen(20), 
{Number 
> of bars
> > to use for FastD calculation for Buy side} FDSLen(20), {Number 
of 
> bars to
> > use for FastD calculation for Sell side} FDBuy(6), {Value of 
FastD 
> to Signal
> > long entry} FDSell(94), {Value of FastD to Signal Short entry} 
> MAvgLen(20),
> > PctAbvMA(.1), PctBlwMA(.05); 
> > Vars: PctAbvMAValue(0.0), PctBlwMAValue(0.0), FDBVal(0.0), FDSVal
> (0.0),
> > FastDValL(0.0), FastDValS(0.0); 
> > PctAbvMAValue = (Average(Close,MAvgLen) * (100- PctAbvMA) / 100);
> > PctBlwMAValue = (Average(Close,MAvgLen) * (100+ PctBlwMA) / 
100); 
> > FDBVal = FastD(FDBLen);
> > FDSVal = FastD(FDSLen); condition1 = C < PctAbvMAValue; 
> > condition2 = C > PctBlwMAValue; 
> > condition3=LinearregSlope(C,length3)LRSSval;
> > condition4= LRS(C,20)>LRSSval;
> > condition5= (FDBVal <= FDBuy AND FDBVal > FDBVal[1]) OR (FDBVal
[1] 
> <= FDBuy
> > AND FDBVal > FDBVal[1]); 
> > condition6= (FDSVal >= FDSell AND FDSVal < FDSVal[1]) OR (FDSVal
[1] 
> >=
> > FDSell AND FDSVal < FDSVal[1]);
> > if condition1 AND condition3 AND condition5 then begin Plot1(L -
>  .5,"GoLong
> > ); end; if condition2 AND condition4 AND condition6 then begin 
Plot2
> (H + .5,
> > GoShort"); 
> > end;




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/