Discussion re Auto-System – HLHB Trend Catcher – DAX mtf
Forums › ProRealTime English forum › ProOrder support › Discussion re Auto-System – HLHB Trend Catcher – DAX mtf
- This topic has 64 replies, 5 voices, and was last updated 3 years ago by GraHal.
-
-
10/10/2019 at 11:59 AM #109806
Just add those two lines at the end of the strategy.
When backtest is finished you will see those two variables plotted on your price chart.
10/10/2019 at 8:16 PM #109869Simplemente agregue esas dos líneas al final de la estrategia.
Cuando finalice el backtest, verá esas dos variables trazadas en su gráfico de precios.
Hi, thanks for your help. Look what gives me the error when putting it in automatic trading (demo) and it also does not give me the results that it gives you in the backtesting. can you help me please?
10/10/2019 at 8:20 PM #109876GRAPH and GRAPHONPRICE can only be used when backtesting your strategy for debugging purposes, not when running it with ProOrder.
You have to remove the lines with GRAPH and GRAPHONPRICE or, my preferred choice, start the lines where they are with a double slash “//” which is used for comments, this making ProOrder ignore them.
1 user thanked author for this post.
10/10/2019 at 9:13 PM #10987910/10/2019 at 9:51 PM #109881josef1604 – We are all happy that you have learnt something but please do not feel the need to quote every post that you are replying too – especially if it then quotes in the incorrect language for the forum that you are posting in.
Quotes are only needed if you are replying to a specific part of someone else’s post or if the conversation is between several people and you want to make it clear who exactly you are replying to.
1 user thanked author for this post.
01/10/2020 at 9:47 PM #11640404/25/2020 at 5:06 PM #12804304/25/2020 at 6:56 PM #128057Hours are set according to the lines 83-107 (see attached pic).
The system is base on Utc+1 DST (so, now it’s UTC+2). Computing the difference is easy, since yoy have to add just 6 to any of the lines and set it to 1 to disable trading at that hour 0 to enable it.
If the first trading hour is now OpenH9 (09:00 am) then you’ll have to set it to 1 and clear OpenH15. If the last trading hour is OpenH19, then you’ll have to leave it as it is now, since it’s within your range, then clear OpenH1 (19 + 6 = 25, which is 01:00 am).
So, if in EU we trade from 09:00 to 19:00 (eleven trading hours), you will trade from 15:00 to 25:00 (that is 01:00) which is still eleven trading hours.
08/17/2020 at 3:56 PM #141865Hello, I understand the code below is to avoid entering again if a trade is existed before next hour begins, however it’ll be great if you can explain in simple terms how does it work as I’m new to programming and cannot follow it.
12345678910111213141516171819202122232425TIMEFRAME (1 hour, updateonclose) //h1IF Not OnMarket THENBarCount = 0ELSEBarCount = BarCount + 1ENDIFTIMEFRAME (default) //1 minONCE TradeON = 1IF IntraDayBarIndex = 0 THENTradeON = 1ENDIFTradeBar = BarCountIF Not OnMarket AND TradeBar <> TradeBar[1] THENTradeON = 1ENDIF//************************************************************************// LONG trades//************************************************************************ax = a1 AND a2 AND a3IF ax AND Not OnMarket AND TradeON AND LongCond THENSET TARGET pPROFIT TPlongSET STOP pLOSS SLlongBUY nLots CONTRACT AT MARKETTradeON = 0ENDIF08/17/2020 at 4:54 PM #141868Actually line 12 could be removed and in line 13, TRADEBAR could be (almost) safely replaced by BARCOUNT.
At the inception of MTF I was not sure that BARCOUNT (the counter of 1-hour bars) could have been accessed correctly from a lower TF (say 1 or 5-minute), so I added TRADEBAR which was defined in the lower TF to be sure.
But it seems BARCOUNT, which is the current number of the 1h bar, can be accessed from both TF’s, still indexing it for prior bars has different meanings:
- in 1-hour TF BARCOUNT[1] refers to the number of the previous hour
- in 1-minute TF BARCOUNT[1] refers to the number of the hour retained in the previous 1-minute bar
As I don’t like this behaviour, because I think BARCOUNT[1] shouldn’t return two different values depending on which TF it is referred to, but the value retained in the TF where it is defined, I keep using this code in all my strategies.
If you GRAPH BARCOUNT in the 1-hour TF it will show different data than when GRAPHed in the 1-minute TF.
1 user thanked author for this post.
08/17/2020 at 5:29 PM #14186910/11/2020 at 9:55 AM #14702810/11/2020 at 11:21 AM #147036No, I am not running it.
I code 2-3 strategies per week, so with a limit of 25 I can only keep them running for a few weeks.
I have an additional demo account to my daughter’s name, but after a couple of years IG decided to disable access to PRT, so I can’t run too many.
1 user thanked author for this post.
10/11/2020 at 3:53 PM #14706310/11/2020 at 4:13 PM #147064Sorry, I can’t remember.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on