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/21/2020 at 11:46 AM #147986
Nasdaq has a minimum position of 1.
No, 0.5 ist also possible. Maybe 0.5 is the smallest unit
1 user thanked author for this post.
10/21/2020 at 1:24 PM #147993It used positionprice[1] and when there’s no market position and opened a new one it went off the rails.
I ran some quick tests and using positionprice[0] definitely works better with the sensitivity settings and is more consistent with Roberto’s mod.
Strangely though, with ts2sensitivity = 0, I’m seeing better performance using positionprice[1] … which doesn’t really make sense. I’ll do some more tests with other algos.
1 user thanked author for this post.
10/21/2020 at 1:34 PM #147994If I set custom trading hours in PRT that matches the exchange, for Nasdaq UTC-4. I just set the regular trading hours (9:30-16:00) in the script?
Not sure how custom trading hours works tbh. I always run PRT on my computer time and then adjust the algos accordingly as different indices are optimal at different times.
10/21/2020 at 1:38 PM #147995Bear in mind that positionprice[1] is NOT the average price before the last position accumulated, but the value that positionprice retained the previous bar. They may, or may not, be the same. They will different anytime a new position is added, otherwise they will be the same.
It’s not equivalent to Dclose and Dclose(1) which will always differ.
1 user thanked author for this post.
10/21/2020 at 1:42 PM #147996I keep seeing that he makes many entries in a row without closing the first ones. For that you have to have a large capital. I have also tried reducing the 0.4lotti, but it keeps coming in with 1lotti. Can you help me please? is there something that escapes me?
This was designed to run with cumulativeorders=true so yes it will make more entries. If you don’t want that, you can change cumulativeorders=false or you can set MaxPositionsAllowed = 1*positionsize
In demo mode the min position on US Tech 100 is 1, when running live min position is 0.5
1 user thanked author for this post.
10/21/2020 at 1:53 PM #147997thnx for looking into it.
If using positionprice[1] and sensitivity 0 or 1, you find in the detailed rapport a lot of very short trades of mainly 3 bars with a no cumulative orders algo.
mmm it seems with your algo, using positionprice[0], you still have a lot off trades of 0 bars, but that must be a bug in the detailed rapport because of cumulative orders. Was mentioned somewhere?
positionprice[1] works not (always) as it is supposed to, visible when using graphonprice newsl with sensitivity 0 or 1
10/22/2020 at 9:09 AM #148054Thank you first. I knew about FLASE Y TRUE and it works well. But I have observed that if we put MaxPositionsAllowed = 1 * positionize it makes 2, if we put MaxPositionsAllowed = 2 * positionize it makes 3 at most … that is, it always makes one more as I see in the tests.
Thanks for the work you do nonetheless
10/22/2020 at 12:43 PM #148082You can change
12COUNTOFLONGSHARES <= MaxPositionsAllowedCOUNTOFSHORTSHARES <= MaxPositionsAllowedto
12COUNTOFLONGSHARES < MaxPositionsAllowedCOUNTOFSHORTSHARES < MaxPositionsAllowed1 user thanked author for this post.
10/22/2020 at 4:43 PM #148103variation on the 1m version for forward testing.
9 users thanked author for this post.
10/22/2020 at 10:27 PM #148132Thanks @nonetheless I have learned something new. Thank you very much
Now to try in demo the last version that you have uploaded today. Do you have it on real?
10/22/2020 at 11:04 PM #148137Nonetheless, take a look at the entry conditions in v7.5. There should be SL and TP for the first position as well, not only for the additional, right?
12345678// Conditions to enter long positionsIF not longonmarket and Ctime and c1 and c1a AND C3a and c3b and c3c AND C5a and c5b THENBUY positionsize CONTRACT AT MARKETelsif longonmarket and Ctime and c1 and c1a and c3 and c3a and c5 and COUNTOFLONGSHARES < MaxPositionsAllowed thenBUY positionsize CONTRACT AT MARKETSET STOP %LOSS 1.4SET TARGET %PROFIT 1.5ENDIF10/23/2020 at 10:45 AM #148194Hmm, I had assumed that the stop and target would apply to everything within that IF … ENDIF, but adding it again at line 4 does give a different result
12345678910// Conditions to enter long positionsIF not longonmarket and Ctime and c1 and c1a and c1b AND C3a and c3b and c3c AND C5a and c5b THENBUY positionsize CONTRACT AT MARKETSET STOP %LOSS slSET TARGET %PROFIT tpelsif longonmarket and Ctime and c1 and c1a and c3 and c3a and c5 and COUNTOFLONGSHARES < MaxPositionsAllowed thenBUY positionsize CONTRACT AT MARKETSET STOP %LOSS slSET TARGET %PROFIT tpENDIFunfortunately though the result was slightly worse. I’m not sure which is technically correct but I think I’ll keep it the way it is for now. It seems to behave as expected in trading.
1 user thanked author for this post.
10/24/2020 at 2:35 PM #148324I added a default macd with no optimisation as an additional confirmation. Less max profit but less drawdown and higher Avg profit/loss ratio.
Only tested for 100k, i just cant get it to work on premium 200k. What instrument is it? dow jones industrial average? not working. If someone can advice me that’d be helpful.
10/24/2020 at 3:45 PM #148335200k, the mod uses an addition that for each cumulative position, the trigger to activate the trailingstop get’s lower. Not sure If I leave it in or if this strategy is suited for that addition.
123456789101112131415161718192021222324if countoflongshares=0 or countofshortshares=0 thentrailingpercentlong = 0.35 // %trailingpercentshort = 0.38 // %endifif countoflongshares>0.2 thentrailingpercentlong = max(0.1,trailingpercentlong-(countoflongshares*0.02))endifif countofshortshares>0.2 thentrailingpercentshort = max(0.1,trailingpercentshort-(countofshortshares*0.02))endifonce accelerator = 0.03 // 1 = default; always > 0 (i.e. 0.5-3)once accelerator2 = 0.1 // 1 = default; always > 0 (i.e. 0.5-3)once ts2sensitivity = 0 // [0]close;[1]high/low;[2]low;high//====================once steppercentlong = (trailingpercentlong/10)*acceleratoronce steppercentshort = (trailingpercentshort/10)*accelerator2if onmarket thentrailingstartlong = positionprice[0]*(trailingpercentlong/100)trailingstartshort = positionprice[0]*(trailingpercentshort/100)trailingsteplong = positionprice[0]*(steppercentlong/100)trailingstepshort = positionprice[0]*(steppercentshort/100)endif10/25/2020 at 11:30 AM #148392 -
AuthorPosts
Find exclusive trading pro-tools on