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

Re: Bug On Arrows on SHORT with Varperiod



PureBytes Links

Trading Reference Links

If it is permitted, a slight hint.
What is hard to implement is not a bug.
If you have the time, read the release notes for Amibroker Upgrades
--- In amibroker@xxxx, "Stephane Carrasset" <s.carrasset@xxxx> wrote:
> Tz,
> 
> Could you tell me why
> Tz,
> 
> 
> if I test SHORT with a percent target 
> this system below with a short signal and a stoploss, I have two 
> arrows above the bars of the day of the short ( one arrow full and 
> one arrow empty)
> 
> 
> /*stoploss*/
> Sell= cross(ma(c,10),c);
> 
> Red=cross( c , ma(c,3) );
> StopLoss= valuewhen( sell, 
> HHV( H, peakbars(red,1,1)+1)) ;
> Stoploss = stoploss *1.01;
> 
> Stop= H>Stoploss AND BarsSince(Sell) !=0;
> Stop=Stop and ref(stop,-1)==0;
> Stop= ExRem( Stop,Sell);
> 
> Short= Sell
> Cover= Stop;
> 
> =================
> 
> if I take a simple system
> 
> Short= cross(ma(c,10),c);
> Cover= cross(c,ma(c,10));
> 
> and test it short, I have only 1 arrow above the bars tha day of 
the 
> short
> 
> is it the fault of variable period in the HHv of the stoploss
> 
> Stephane