Momentum-Range Differential Acceleration System
Forums › ProRealTime English forum › ProOrder support › Momentum-Range Differential Acceleration System
- This topic has 51 replies, 13 voices, and was last updated 6 years ago by victormork.
-
-
05/01/2017 at 7:34 AM #34096
My idea is that it only works with DFB.
The English users with DFB (https://www.ig.com/uk/glossary-trading-terms/dfb-definition)
do not have problems, all others, including all other European countries can not get it working properly.
05/01/2017 at 9:39 AM #3410605/01/2017 at 9:50 AM #3411505/01/2017 at 9:54 AM #3411605/01/2017 at 10:01 AM #3411805/01/2017 at 10:14 AM #3412205/01/2017 at 10:35 AM #34125mine is running from may 2015 yours is from nov 2016- 100000 units?
05/01/2017 at 10:46 AM #3412705/01/2017 at 11:50 AM #34141no problem:-)
05/01/2017 at 6:15 PM #3419205/01/2017 at 6:36 PM #34193Maz,
Hello It’s quite difficult for me to understand the code, I’ve not your big knowledge..So I’ve some problem to start to optimize.. I’ll try it, but if you want make an explanation for stupid, here I’m 🙂
Thanks very much to participate to the forum!
05/02/2017 at 11:57 AM #34242@Ale, guys,
If you take a look at the indicator I posted to the library it has the explanation on the premise of the system.
The system takes a long on a prediction of increased volatility whilst we are in an uptrend. Prediction of increased volatility is made using two indicators in this case – differentials between long and short term candle ranges as well as long and short term and momentum. There are two versions of the system because range and momentum delta can be measured in various ways (eg differential or a coefficient). The uptrend filter is confirmed by a moving average comparison. The likelihood of volatility to the upside is greater than volatility to the downside if we are in an uptrend, which is why we use a moving average filter. If you were creating a short system, the reverse would be true. The ATR filter ensures that we don’t take trades during low volatility periods.
In order to optimize you need to understand what sensible ranges would be. You can make custom indicators out of the indicators included in the system code and plot them on a graph. That will give you a graphical representation of ranges for the instrument you want to try. Alternatively you can use the GRAPH function. Once you know the indicator ranges you can work with the optimizer tool.
Hope that helps?
1 user thanked author for this post.
05/05/2017 at 8:25 AM #3459506/06/2017 at 9:44 AM #37549Firstly, many thanks for sharing this!
I have converted your style of coding into my own style. Result here:
12345678910111213141516171819202122232425262728293031323334353637MomShort = Momentum[5](close)MomLong = Momentum[100](close)MomCoef = MomShort/MomLong - 1SMARange = Average[4,0](Range)LMARange = Average[100,0](Range)RangeCoef = SMARange/LMARange - 1SMA = Average[18,1](close)LMA = Average[53,1](close)TradeTime = BarIndex - TradeIndexMinTradeTime = 43MomThreshold = 0.1RangeThreshold = 0.9UpBar = close > openLongEntry = NOT LongOnMarketLongEntry = LongEntry AND MomCoef >= MomThresholdLongEntry = LongEntry AND RangeCoef >= RangeThresholdLongEntry = LongEntry AND UpBarLongEntry = LongEntry AND SMA > SMA[1]LongExit = LongOnMarketLongExit = LongExit AND TradeTime >= MinTradeTimeLongExit = LongExit AND LMA < LMA[4]WinTarget = 43// Conditions to enter long positionsIF NOT LongOnMarket AND LongEntry THENBUY 1 CONTRACTS AT MARKETSET TARGET pprofit WinTargetENDIF// Conditions to exit long positionsIF LongOnMarket AND LongExit THENSELL AT MARKETENDIFPerhaps this can help others understand the logic. Some thoughts:
- The Exit condition could be thought of as referring to another timeframe, namely 1h. The exit time condition is similar to MA25<MA25[1] on the 1h timeframe. What it achieves is 1. it gives room for the trade to play out and 2. it gives room for the trade to play out even further beyond the exit condition if the MA100 is sloping upwards. A nice continuation of the trendfollowing aspect.
- I will test sensitivity to the all the different constants/variables in order to see if there is some risk of lucky curve -fit. I would recommend this to each and every one trying this code out.
- As has been pointed out by Maz, this is not a ready-to-go code. One particular area is it’s vulnerability to a large setback in the 43 bars following the entry. One would absolutely need to implement a stop to avoid potential bankruptcy.
All in all, I would say this is a really nice piece of code. Both for instructional use and learning to code, and potentially as a backbone in a live trading system. The logic makes perfect trading sense. Thanks again for posting! I salute your generosity!
>> Message edited to make appear PRC code format, for clarity of messages on ProRealCode’s forums, please use the “<> insert PRT code PRT” button during message creation to separate the text of the code part, thank you! <<
06/06/2017 at 12:14 PM #37604One note on the above post: I omitted doing absolute values of momentum. Thought it wouldn’t detract a lot to do so. It does. MomShort and MomLong variables should be absolute values of momentum, ie:
MomShort = ABS(Momentum[5](close))MomLong = ABS(Momentum[100](close)) -
AuthorPosts
Find exclusive trading pro-tools on