PRT Bands Strategy
Forums › ProRealTime English forum › ProOrder support › PRT Bands Strategy
- This topic has 8 replies, 6 voices, and was last updated 12 months ago by JS.
-
-
08/25/2021 at 3:26 PM #176218
I have created a very simple strategy for DJ 1h using the PRT bands indicator – if the price crosses over the upper/lower band then it takes a long/short position with TP and SL set at 2xATR. It is profitable in backtest (apart from during the covid crash last year).
I have one issue with the code that I would be grateful for help to improve. When in an uptrend, the price crosses over the upper band multiple times and it re-opens the long position, cumulating profit. In downtrends however, the price only crosses the lower band once, at the very start. It never seems to cross the lower band again, coming very close but not below the band to trigger a trade.
I have attached examples of a typical up and down trend – the uptrend executes three trades whereas the downtrend only has one despite two or three other opportunities to short.
How can I best modify this code to take repeated short positions in the down trend? Maybe take shorts within x% or x points of the lower band?
Thanks in advance for your help.
12345678910111213141516171819202122232425262728293031323334353637383940414243//-------------------------------------------------------------------------// Main code : JH DJ 1h PRTBands 2xATR//-------------------------------------------------------------------------// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Conditions to enter long positionsindicator1 = PRTBANDSUPc1 = (close > indicator1)IF c1 THENBUY 1 PERPOINT AT MARKETatr = averagetruerange[14](close)set target profit atr*2set stop loss atr*2ENDIF// Conditions to exit long positionsindicator2 = PRTBANDSDOWNc3 = (close < indicator2)IF c3 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator3 = PRTBANDSDOWNc4 = (close < indicator3)IF c4 THENSELLSHORT 1 PERPOINT AT MARKETatr = averagetruerange[14](close)set target profit atr*2set stop loss atr*2ENDIF// Conditions to exit short positionsindicator4 = PRTBANDSUPc6 = (close > indicator4)IF c6 THENEXITSHORT AT MARKETENDIF08/25/2021 at 3:45 PM #176223how do you mean “it re-opens the long position” if CumulateOrders = False ?
(btw, your c4 is the same as c3, and c6 is the same as c1 – you don’t have to write them out twice) 😁
1 user thanked author for this post.
08/25/2021 at 4:33 PM #176227Apologies, by re-open I didn’t mean cumulating orders. I mean after one long order is closed by hitting the 2xATR take profit, the price often crosses the upper band again in an uptrend and opens a new trade – see the attached screenshots to get an idea of what I mean.
In the downtrends, it doesn’t do this as the price always seems to come very close to, but rarely crosses the lower bands. That is the issue I would like assistance with. It seems to be a feature of the PRT bands that the price only crosses the lower band once (at the start) in downtrends.
Yes – sorry about the messy multiple indicator codes. I started the strategy with the simplified creation tool then finished it off manually.
08/25/2021 at 4:49 PM #176229So, if I understand correctly, your short gets stopped out and you don’t get another entry signal even though the downtrend continues ?
Then it sounds like you need to adjust your exit conditions so as to hold the position longer. You could try using a standard % stop, plus a trailing stop (for example), or change the atr values – either the period or the multiplier.
08/25/2021 at 5:31 PM #176232Hello,
First of all, the author of PRTbands claimed that this indicator is not designed to be used with Short positions.
That said, you may try to use similar indicators to the lower band and the short-term line, when you already are in downtrend.
Some PRTBands signal reversed123456// Breakout in a downtrendc1 = close crosses under lowest[20](low[1])...// Back to downtrend for the short-term linema3 = Average[3]c2 = ma3<ma3[1] and ma3[1]>ma3[2] and ma3[2]>ma3[3]08/25/2021 at 6:53 PM #17623408/25/2021 at 10:04 PM #176248Thanks all for your comments.
I looked at the strategy again and trying to optimise a different ATR multiple for the shorts still gives 2xATR as the optimal exit. And adding on extra points below the close of the bar to trigger additional short trades by crossing the lower PRT band more often didn’t result in any worthwhile additional gain either.
So maybe the answer is that PRT bands aren’t designed for short trades as @swingeur says and I need to use a different indicator for these.
Interesting point regarding the spread however, @magifna. Certainly with a spread of 3.6 and even with the worst possible DJ spread of 9.8, the strategy is still profitable over the last 12 months – but I agree, not beyond this.
It’s great that we can backtest to 200k or 1m bars but are we not looking for strategies that are profitable now, in the current conditions, rather than those that might have been profitable two, three, or more years ago? Is anyone running strategies they started two-hundred-thousand one hour bars ago that are still profitable? Or are we more frequently starting and stopping new strategies that best fit more recent conditions?
I am relatively new to this so these are open questions. Clearly I still have much to learn.
01/21/2024 at 1:58 PM #226669Is anyone running strategies they started two-hundred-thousand one hour bars ago that are still profitable?
Silence is golden! Let’s say the answer is NO and see if anybody comes back with a Yes? 😉
01/21/2024 at 2:30 PM #226670 -
AuthorPosts
Find exclusive trading pro-tools on