PureBytes Links
Trading Reference Links
|
Tomacz,
I would like to know if you have inculded the
position of the open in the sellprice ( or buyprice )
for example when you write a stopLossprice(
SLp)
Slp = ValueWhen<FONT
size=2>(Buy,LLV<FONT
size=2>(L,5<FONT
size=2>),1)- <FONT
color=#0000ff size=2>MA(<FONT color=#0000ff
size=2>ATR(1<FONT
size=2>),10);
Sellprice=Slp;
if the open is below the Slp , the right sellprice is the open and not the
Slp.
it is the reason why, I have added in testing
Slp = ValueWhen<FONT
size=2>(Buy,LLV<FONT
size=2>(L,5<FONT
size=2>),1)- <FONT
color=#0000ff size=2>MA(<FONT color=#0000ff
size=2>ATR(1<FONT
size=2>),10);
StopLoss= L<Slp AND <FONT color=#0000ff
size=2>BarsSince(Buy)!=<FONT color=#ff00ff
size=2>0;
Sl=StopLoss and Ref(StopLoss,-1)=0; /* to get one binary spike*/<FONT
size=2>
Slp=IIf(Sl,<FONT
color=#0000ff size=2>IIf(O<= Slp
,O,IIf(L<
Slp, Slp ,0)),<FONT
color=#ff00ff size=2>0);
Sellprice=Slp;
Just to Know
Stephane
|