MA Hull based conditions
Forums › ProRealTime English forum › ProBuilder support › MA Hull based conditions
- This topic has 6 replies, 5 voices, and was last updated 5 years ago by Vonasi.
Tagged: hull
-
-
04/09/2019 at 2:26 PM #95840
Hello
I am attempting to write an ALGO utilising the Hull MA as an exit for longs and shorts.
By using the display cursor option I can see that the price value is greater or lesser than the Hull MA value and would therefore expect my positions to be closed when the “close position” is executed by the ALGO, but this is not the case and the ALGO continues to run despite the values on the respective closing bars being greater/lesser than the Hull MA.
123456789101112// Conditions to exit long positionsindicator90 = Average[16](close)c90 = (close <= indicator90)// Conditions to exit short positionsindicator90 = Average[16](close)c91 = (close >= indicator90)IF c91 THENEXITSHORT AT MARKETENDIFAppreciate if you could advise where I am going wrong/ a fix to this particular problem
Regards
04/09/2019 at 2:28 PM #95841To write code, please use the <> “insert PRT code” button to make code easier to read. Thank you.
04/09/2019 at 2:33 PM #95844The one above is not a HULL moving average, but an SMA.
Maybe this is the issue.
04/09/2019 at 2:41 PM #9584804/10/2019 at 6:45 AM #95899Depending of the Hull MA code you are using, you might find discrepancies between the one from the platform and your program: https://www.prorealcode.com/topic/faux-calcul-hma-proorder/
Hull Moving Average instruction will be added in version 11.
04/16/2019 at 4:22 PM #96610you might find discrepancies between the one from the platform and your program
So is the PRT provided Hull MA a waste of space?
Attached shows that a trade was opened (red arrow) by the condition shown but the 200 period Hull MA (red arrow) was nowhere near the trade that opened??
Any thoughts please?
04/16/2019 at 7:47 PM #96628GraHal – you might be Beta testing something that no one else even knew existed. Until you posted that image with AVERAGE[200,8] I wasn’t aware that we had an average type of 8. From testing it appears that PRT have sneaked in two new average types without telling anyone (except maybe you?). It appears that they are only available in strategy codes and not indicator codes at the moment.
I think the discussion earlier on this thread was about the difference between our self calculated HULL average and the HULL average that can be added as a standard PRT indicator by selecting ‘Hull’ as type when adding a moving average indicator. This is possibly a rounding issue that PRT need to investigate.
Nicolas will hopefully be having a phone call with PRT about these new average types tomorrow and get more info for us.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on