Long only strategy for the BUND (1 eur per contract) on a 4 hours timeframe. Backtest with 2 points spread from mid-2010 to now.
Signals are taken from a super smoothed filter (indicator “PRICE ACTION BUND”). Profit are trailed with a soft coded trailing stop in the strategy.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
//-------------------------------------------------------------------------------- // STRATEGY BYE BYE BYE BUND // IG MARKET - FGBL BUND 1 EUR - 4 H - SPREAD 2 DEFPARAM CumulateOrders = false PositionSize = 1 indicator1, ignored = CALL "PRICE ACTION BUND" c1 = (indicator1 >= 1) indicator1, ignored = CALL "PRICE ACTION BUND" c2 = (indicator1 <=- 1) indicator1, ignored = CALL "PRICE ACTION BUND" c3 = (indicator1 crosses over 0) IF c1 or c2 or c3 AND CurrentDayOfWeek <> 1 THEN BUY POSITIONSIZE CONTRACT AT MARKET ENDIF // TRAILING STOP LOGIK BY KENNETH KVISTAD MODIFIED FOR LONG AND SHORT POSITION TGL =66 if not onmarket then MAXPRICE = 0 EXITPRICE = 0 ENDIF if longonmarket then MAXPRICE = MAX(MAXPRICE,close) if MAXPRICE-tradeprice(1)>=TGL*pointsize then EXITPRICE = MAXPRICE-TGL*pointsize ENDIF ENDIF if onmarket and EXITPRICE>0 then SELL AT EXITPRICE STOP ENDIF SET STOP PLOSS 350 SET TARGET PPROFIT 500 |
Indicator needed to run the strategy (“PRICE ACTION BUND”)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
// UNIVERSAL CODE POSTED BY NICOLAS // INDICATOR PRICE ACTION BUND bandedge=50 whitenoise= (Close - Close[50]) if barindex>bandedge then // super smoother filter a1= Exp(-1.414 * 3.14159 / bandedge) b1= 2*a1 * Cos(1.414*180 /bandedge) c2= b1 c3= -a1 * a1 c1= 1 - c2 - c3 filt= c1 * (whitenoise + whitenoise[1])/2+ c2*filt[1] + c3*filt[1] filt1 = filt if ABS(filt1)>pk[1] then pk = ABS(filt1) else pk = 0.99* pk[1] endif if pk=0 then denom = -1 else denom = pk endif if denom = -1 then result = result[1] else result = filt1/pk endif endif RETURN result COLOURED(66,66,205) as "PRICE ACTION", 0 as "0" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
finché sale …. e se il BUND comincia a scendere ? Con 85% sul mercato loss da 350 ne prendi molti.
Bisogna migliorarlo con la buona idea dell’indicatore utilizzando anche trade short oppure periodi FLAT.
miguel
@miguel33 / You are right, but there is also a trailing stop activated @66 points. What you are saying is the main problem of a long only strategy on an instrument we all know is in a bullish trend since many years.
@ALE / maybe a trend filter for long only period would secure the strategy to be activated only in a bullish trend?
I agree, it concerns me that the equity curve looks highly correlated with trend.
Hello
Miguel, the problem is that we don’t have long periods of down to optimize the short positions, the drop-down periods of the last 5 years have always had rebounds. In fact, even when the indicator =< -1, the strategy buys.
The solution is to avoid trading on the rebound, and then use only indicator => +1 and when the indicator crosses over the zero.
Another solution is to use a lower time frame to take advantage of little drop-down .
The next strategy that I will post will do just that, on the Dax.
I just posted this strategy because I wish that this great community can take advantage from this indicator and the excellent results when used it in the right way
Thank you
Ciao
miguel, il problema è che non abbiamo periodi short abbastanza lunghi per ottimizzare delle posizioni short, i periodi di discesa hanno sempre avuto rimbalzi, ecco perché anche quando l’indicatore è -1 bisogna comprare.
la soluzione è semplicemente evitare di fare trading sul rimbalzo, e quindi usare solo L’ indicatore + 1 e L’indicatore che incrocia a rialzo lo zero.
un altra soluzione è usare un time frame più basso e aprire posizioni più strette. In questo modo si avra modo di usare anche le posizioni short
la prossima strategia che posterò farà proprio questo, sul Dax.
ho postato questa strategia proprio perché vorrei che questa ottima community possa sfruttare L indicatore che da degli ottimi risultati se utilizzato nel modo giusto
Grazie
@Nicola Nicolas thanks for your kind attention, the same indicator used with different set can act as a filter. I work on, but it will not be easy, because the bund with time fram 4 H, does not have a down As you have already said..
In piena sintonia .
Grazie Ale
per aver condiviso con noi il tuo indicatore P.A.B.
aspettiamo il tuo script sul Dax … con molto interesse !!!