NAS 2m HULL-SAR trading system
Forums › ProRealTime English forum › ProOrder support › NAS 2m HULL-SAR trading system
- This topic has 343 replies, 42 voices, and was last updated 1 year ago by bege.
-
-
10/12/2020 at 6:17 PM #147201
Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.
Thanks 🙂
10/12/2020 at 7:01 PM #147207Yes, i’m getting the same error message today although backtests worked fine at the weekend. For now I’m running tests without tick by tick and getting the same results that I got at the weekend with tick by tick checked.
10/12/2020 at 8:27 PM #14721310/12/2020 at 8:27 PM #14721410/12/2020 at 10:24 PM #14722910/12/2020 at 11:19 PM #147241Looks very nice and found more performance! I start doubting too btw how the tick by tick & spread is handled with cumulative positions.
ullle73, there are too many changes i’am making (layout) and still experimenting.
About the strategy, i’am taking another approach. The equitycurve is very nice, however it’s depended on multiple positions, which could be a warning? I’am not sure.
So i’am testing a different way to see if it can work with 1 position, but taking every signal into account. And that works too it seems.
Nonetheless, try set maxallowedpositions to 1. Something seems off if that’s used in v5
Here’s an early pic with 1 position.
10/13/2020 at 8:33 AM #147257this is v5 with max positions =1
looks ok to me, except that it’s with tick by tick unchecked. the result is consistent with what i was seeing at the weekend though, so seems to me that either this result is correct or none of our results is correct.
are you getting backtests with t-b-t ?
10/13/2020 at 12:59 PM #147290Hi
Thank you very much for sharing this strategy, it’s a great approach to run a strategy with just a few entry criteria. I have been learning to keep entry signals to a minimum, and that the exit and position sizing are as important as the entry signals (highly recommend ‘Quantitative Trading’ by E. Chan, and ‘Building Winning Algorithmic Trading Systems’ by K. Davey). I ran the results of the latest strategy through a Monte Carlo Simulatro (provided by the author of the second book) which uses a random sampling and replacement approach. The parameters I’ve used are below, but it’s another way of looking at a strategy to test it’s future robustness.
Capital: 3,000
Risk per trade: 5
As you can see, even at these levels, the risk of ruin is only 4%, provided you can live with a 33.3% drawdown. Keeping the Risk per trade constant, it would be wiser to run a starting equity of closer to 5,000.
Regardless, it’s another way of seeing how it may perform in the future, and the results are very strong. Thank you once again.
1 user thanked author for this post.
10/13/2020 at 1:15 PM #147292Results from the PRT platform with the same test parameters, for comparison.
10/14/2020 at 3:35 AM #147361The test I did was with tbt. Didn’t check the difference with on/off. But I’ve lost my settings (own fault) for that equitycurve. That was without optimised sl/pt & ts.
In demo strategy, one trade exits on stoploss and positionsize went from 8 to 7. I thought in the live version it only can go from 8 to 0, maybe with exception of exits on stoploss?
10/16/2020 at 4:05 PM #147573new version with Paul’s TS and modification to the MaxPositionsAllowed code – thanks to @fifi743
Thanks for the great work. I ve spotted an error concerning the enter conditions : when you use CountOfPosition when you are short on market, the result is negative so you need to use ABS function. Otherwise the condition is always true and you can sellshort an unlimited number of contracts.
123IF Ctime and c1 and c1a AND C3 and c3a AND C5 and c5a and abs(CountOfPosition) <= MaxPositionsAllowed THENIF Ctime and c2 and c2a AND C4 and c4a AND C6 and c6a and abs(CountOfPosition) <= MaxPositionsAllowed THEN10/16/2020 at 10:36 PM #147611Sorry the correct code is :
12345678910111213// Conditions to enter long positionsIF Ctime and c1 and c1a AND C3 and c3a AND C5 and c5a and abs(round(CountOfPosition/positionsize)) < MaxPositionsAllowed THENBUY positionsize CONTRACT AT MARKETSET STOP %LOSS 1.3SET TARGET %PROFIT 2ENDIF// Conditions to enter short positionsIF Ctime and c2 and c2a AND C4 and c4a AND C6 and c6a and abs(round(CountOfPosition/positionsize)) < MaxPositionsAllowed THENSELLSHORT positionsize CONTRACT AT MARKETSET STOP %LOSS 1.1SET TARGET %PROFIT 1.4ENDIF1 user thanked author for this post.
10/17/2020 at 10:44 AM #147618I ve spotted an error concerning the enter conditions
Thanks Roger, you’re absolutely right, it won’t work the way it was. I went for a slightly different solution:
123456789101112131415Once MaxPositionsAllowed = 5*positionsize// Conditions to enter long positionsIF Ctime and c1 and c1a AND C3 and c3a AND C5 and c5a and COUNTOFLONGSHARES <= MaxPositionsAllowed THENBUY positionsize CONTRACT AT MARKETSET STOP %LOSS 1.3SET TARGET %PROFIT 2.1ENDIF// Conditions to enter short positionsIF Ctime and c2 and c2a AND C4 and c4a AND C6 and c6a and COUNTOFSHORTSHARES <= MaxPositionsAllowed THENSELLSHORT positionsize CONTRACT AT MARKETSET STOP %LOSS 1SET TARGET %PROFIT 1.4ENDIFThis uses a different definition of “Maxpositionsallowed” – not the total number of contracts, but the number of entries regardless of size. This way it will work with MM as the positionsize changes.
10/18/2020 at 1:29 PM #147665Here’s another variation using 1m, 5m, 15m with the alternative entry conditions (beginning the run when the 5m changes direction, then adding positions on each 1m dip). Goes without saying that it is curve fit to these few months, but could be worth forward testing on demo to see how it plays out.
5 users thanked author for this post.
10/18/2020 at 4:04 PM #147668Hi nonetheless
You add this line at the end of the algo and make a test?1234567Mrsi=RSI[14](close)if longonmarket and CurrentDayOfWeek=5 and close>positionprice and Mrsi crosses under 70 thensell at marketendifif shortonmarket and CurrentDayOfWeek=5 and close<positionprice and Mrsi crosses over 30 thenexitshort at marketendif1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on