PureBytes Links
Trading Reference Links
|
here is the literal translation,(as close as I could figure), but
condition4 is missing from original code;
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;
PctAbvMAValue = (MA(Close,MAvgLen) * (100- PctAbvMA) / 100);
PctBlwMAValue = (MA(Close,MAvgLen) * (100+ PctBlwMA) / 100);
FDBVal = StochD(FDBLen);
FDSVal = StochD(FDSLen);
condition1 = C < PctAbvMAValue;
condition2 = C > PctBlwMAValue;
Condition4 = ???;
condition3=LinRegSlope(C,length3)>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]);
Buy= condition1 AND condition3 AND condition5;
BuyPrice=(L - .5);
Plot(Buy,"LE",colorGreen,styleHistogram,styleOwnScale);
Short= condition2 AND condition4 AND condition6 ;
ShortPrice=(H + .5);
Plot(Short,"SE",colorRed,styleHistogram,styleOwnScale);
--- In amibroker@xxxxxxxxxxxxxxx, "m.smith" <ink@xxxx> wrote:
> This is a scalping formula from trade station. Can it be put in a
form that
> can be used in Amibroker? I have no idea where to start. The person
who gave
> this to me said it worked well for him.
>
> 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; 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;
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/
|