‘Daxophone’ 5m (v1)
Forums › ProRealTime English forum › ProOrder support › ‘Daxophone’ 5m (v1)
- This topic has 12 replies, 4 voices, and was last updated 2 years ago by borderlineJim.
-
-
04/18/2021 at 10:11 AM #167374
Greetings to the ProRealCode community!
This system was made for fun and practice as I am new to programming. It is very straightforward, using multiple time-frames and indicators to filter trades which are launched from the 5m timeframe.
This system is purely experimental and probably curve fitted to a large extent. However, I did try to optimize some of the variables and I performed a number walk-forward tests. It was fun playing with different indicators and using the WF tool!
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273DEFPARAM CUMULATEORDERS = false// Prevents the system from creating new orders to enter the market or increase position size before the specified timenoEntryBeforeTime = 080000timeEnterBefore = time >= noEntryBeforeTime// Prevents the system from placing new orders to enter the market or increase position size after the specified timenoEntryAfterTime = 183000timeEnterAfter = time < noEntryAfterTime// Prevents the system from placing new orders on specified days of the weekdaysForbiddenEntry = OpenDayOfWeek = 5 OR OpenDayOfWeek = 2//Establish a trend on a higher timeframe - 4hrtimeframe(4 hour,updateonclose)MA24 = average[5]Rplse1 = Repulse[5](close)c2 = close > MA24c3 = Rplse > 0c5 = close < MA24c6 = Rplse < 0c7 = Rplse1 > 0c8 = Rplse1 < 0//Filter a trend on a medium timeframe - 1hrtimeframe (1 hour, updateonclose)Rplse = Repulse[5](close)MA20 = average[20]cA = MA20 < closecB = MA20 > closecC = RocnRoll(close) < 2 and RocnRoll(close) > -1cD = RocnRoll(close) > 1exitL1 = RSI[14](close)> 80exitS1 = RSI[14](close)< 20//These conditions nested together establish direction of the trend. The system will only trade in the direction of trendbullT = (c2 AND c3 AND cA AND c7 and cC)bearT = (c5 AND c6 AND cB AND c8 and cD)//This is the timeframe from which entry signals will be activatedtimeframe(5 minute, default)//buy entry conditionsbuyC = Repulse[5](close) crosses over 0IF bullT AND buyC AND (timeEnterBefore AND timeEnterAfter AND NOT daysForbiddenEntry) THENbuy at marketset stop trailing AverageTrueRange[14](close)*3.5ENDIF// Conditions to exit long positionsExitL = RocnRoll(close) > 1 and RocnRoll(close) < 1IF ExitL or exitl1 THENSELL AT MARKETENDIF//sell entry conditionssellC = Repulse[5](close) crosses under 0IF bearT AND sellC AND (timeEnterBefore AND timeEnterAfter AND NOT daysForbiddenEntry) THENsellshort at marketset stop trailing AverageTrueRange[14](close)*3.5endif//conditions to exit short positionsExitS = RocnRoll(close) < 2IF ExitS or exits1 THENexitshort at marketENDIFThanks everyone
J
2 users thanked author for this post.
04/18/2021 at 10:42 AM #16741504/18/2021 at 1:52 PM #167444I have tested it when ‘true’ and it seems to make a huge difference to the gain. Seemed a bit unrealistic though.
Apologies if much of the code is not correct. I genuinely have no idea apart from the most basic programming. This is merely for fun and learning.
04/18/2021 at 2:07 PM #167445tested over 100k candles, don’t have access to 200k unfortunately 🙁
04/18/2021 at 4:38 PM #1674491M Backtest attached
1 user thanked author for this post.
04/18/2021 at 6:36 PM #167456is that a 1 million back-test???
04/18/2021 at 9:00 PM #167464is that a 1 million back-test???
Yes it is; v11 PRT Premium allows it
1 user thanked author for this post.
04/19/2021 at 9:14 AM #167484that’s amazing…. I thought the maximum was 200k! Do you think that optimizing on over 1 million candles is too much?
04/19/2021 at 9:23 AM #167486I asked myself the same question, here’s the topic: https://www.prorealcode.com/topic/1m-backtest-available-how-do-you-manage-it/
Anyway in a general understanding i think it’s pretty much useless rn; but could be very helpful in low timeframe systems (<1m)
04/19/2021 at 10:29 AM #167490have tested it when ‘true’ and it seems to make a huge difference to the gain.
True means a condition is met and using ‘GRAPH condition’ would result in a ‘1’ on a Chart.
Below can never be True / 1 because how can RocnRol be both > 1 and < 1 at the same time?
The condition below is doing nothing in your strategy.
When you say above “have tested it when ‘true’ and it seems to make a huge difference to the gain.” then you must have made a change that made ExitL = True / 1, for example used OR instead of AND, or changed values for RocnRol etc?
GRAPH ExitL below as it is written in your strategy (using AND) and you will see a straight line at 0?
Sorry to labour the point, but I’m hoping it helps you and others understand about True and False and use of GRAPH?
1ExitL = RocnRoll(close) > 1 and RocnRoll(close) < 11 user thanked author for this post.
04/19/2021 at 11:23 AM #167496Yes GraHal, but it works no matter what owing to line 37, so they are likely not to care much.
04/19/2021 at 1:11 PM #16750504/19/2021 at 5:10 PM #167533thanks Grahal!
You are right, it should have been ‘OR’ instead of ‘AND’
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on