Hello:
It would want to modify the following AFL:
//SWING FORMULA//
function stoploss (no) {
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);
return tsl;
}
Plot(stoploss(2),"Stop Loss",colorblack, styleStaircase);
The AFL is ascending and descendant stairs that follow the price. But that it has in his ascending trip or descendant small backward movements which I want to eliminate, to use it as a trailing stoploss .
They could add linear the necessary ones to me to the AFL, or modify this one. Thank you very much.
They pardon by my level of English.
Greetings,
It would want to modify the following AFL:
//SWING FORMULA//
function stoploss (no) {
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);
return tsl;
}
Plot(stoploss(2),"Stop Loss",colorblack, styleStaircase);
The AFL is ascending and descendant stairs that follow the price. But that it has in his ascending trip or descendant small backward movements which I want to eliminate, to use it as a trailing stoploss .
They could add linear the necessary ones to me to the AFL, or modify this one. Thank you very much.
They pardon by my level of English.
Greetings,