lxdknight 發表於 10-6-16 20:23

Simple Trailing Stop 希望可以帮到大家

_SECTION_BEGIN("Chaloke Simple Trailing Stop");
///// Chaloke Simple Trailing Stop /////

Prd1=Param("ATR Period 1-20",4,1,20,1);//{Default = 4 Because most traders use 5}
Prd2=Param("LookBack Period 1-20",11,1,20,1);//{Default = 11 Because most traders use 10}

//{Green} {Start Long position when Close>Green}
Green=HHV(LLV(L,Prd1)+ATR(Prd1),Prd2);

//{Red} {Stop loss when Close<Red}
RED=LLV(HHV(H,Prd1)-ATR(Prd1),Prd2);

Color=IIf(C>Green ,colorBrightGreen,IIf(C < RED,colorRed,colorBlue));


Plot(Green,"Green",colorBrightGreen,styleLine);
Plot(RED,"Red",colorRed,styleLine);
Plot(C,"Chaloke Simple Trailing Stop System",Color,64);


Plot(LLV(HHV(H,5)-ATR(5),6),"",colorBlack);
Plot(LLV(HHV(H,5)-ATR(5),5),"",colorBlack);
Plot(LLV(HHV(H,5)-ATR(5),4),"",colorBlack);
Plot(LLV(HHV(H,5)-ATR(5),3),"",colorBlack);
_SECTION_END();

alexwang7777 發表於 10-6-17 08:22

回復 1# lxdknight


    好程式!推一嘞....

mimi 發表於 10-6-17 11:26

也推一下 ~~€€

綠茶妹 發表於 10-6-17 13:17

{:4_190:}實用,推!
頁: [1]
查看完整版本: Simple Trailing Stop 希望可以帮到大家