- Katılım
- 23 Eki 2020
- Mesajlar
- 1,828
Hi, does anyone know how to programm selling x days after entry? Thanks Mensur This should do it. Roy |
|
Buy - Example F1:=ValueWhen(1,H<Ref(H,-2) AND Ref(H,-1)<Ref(H,-2) AND Ref(H,-3)<Ref(H,-2) AND Ref(H,-4)<Ref(H,-2),Ref(H,-2)); a:=H>=F1; If(a>0 AND Alert(a=0,2),Max(O,F1),0); |
|
Sell x Days After Entry (Timed Sell) Pd:=Input("Timed exit delay periods",1,99,25); N:=Fml("Buy - Example")>0; {your entry formula} Tr:=If(PREV<=0,If(N>0,1,0), If(BarsSince(PREV<=0)=Pd,-1,PREV)); Tr=-1; |
Mensur, ...Or you can use INACTIVITY STOP with a large number : Example: 999 % within 10 days. If you don't encounter un 999 % change of price in 10 days, the trade will be closed. Pierre Tremblay | |
| |
Source / From: |