[beta-testing] multi timeframe support for automatic trading, ideas are welcome!
Forums › ProRealTime English forum › ProOrder support › [beta-testing] multi timeframe support for automatic trading, ideas are welcome!
- This topic has 287 replies, 47 voices, and was last updated 4 years ago by Brianoshea.
Tagged: mtf, multitimeframe
-
-
07/05/2018 at 8:47 AM #75261
Thanks for clarifying that Nicolas. I was wondering why I did not have MTF yet and I did not realise that it is in beta testing only on PRT end of day or free trial accounts opened directly with PRT.
I have just opened a new account (needed yet another email address!) so that I can now test out this long awaited feature.
07/05/2018 at 11:08 AM #75282My first thoughts on MTF – fantastic so far!
Only being able to test it on an end of day account at the moment is a little bit limiting but we can get an idea of how powerful this will be and the opportunities it opens up.
The use of the GRAPH function is going to be very important in our ability to understand and develop ideas so it is a pity that you have to have at least one BUY or SELL instruction within the code to be able to run it otherwise you get this message.
So you then have to put a BUY or SELL in to get it to work and then you find the strategy runs out of money so you have to increase the start capital, but it is still not enough so then you have to try to create a basic strategy that does not run out of money – all a bit of a faff really.
I think it would be better to do away with the demand for at least one BUY and SELL and just let the strategy run if there is a GRAPH instruction in it. So what if it does not open a trade?
The perfect solution is the use of TIMEFRAME in indicator creation in ProBuilder but just doing away with the need for a BUY or SELL so that we can graph easily would do for now.
07/05/2018 at 11:30 AM #75286The correct use of DEFAULT or UPDATEONCLOSE is going to critical within our strategies. I made this simple test and graphed the results to compare with UPDATEONCLOSE and DEFAULT.
1234567891011//12 month averagetimeframe(monthly, default)ma1 = average[12,1]//52 week averagetimeframe(weekly, default)ma2 = average[52,1]//300 day averagetimeframe(default)ma3 = average[300,1]With DEFAULT:
and with UPDATEONCLOSE:
If you were using the MA’s being stacked in the correct order as a filter then UPDATEONCLOSE would have you kept off the market in the latter part of each month.
07/05/2018 at 11:32 AM #7529007/05/2018 at 11:41 AM #75292About GRAPH indicators and no orders, you just have to set a fake condition to avoid any order to be launched at market, just like the way I did in the example of the blog article:
1234567891011121314151617181920212223242526defparam cumulateorders=false//daily SMAtimeframe(daily)smad20 = average[20]timeframe(15 minutes,updateonclose)bollup = BollingerUp[20](close)bolldn = BollingerDown[20](close)//5 minutes SMAtimeframe(default)sma20 = average[20]sma50 = average[50]//dummy order conditionif sma20=-100 thenbuy at marketendifgraph close as "price"graph smad20 coloured(0,0,255)graph bollup coloured(100,100,100)graph bolldn coloured(100,100,100)graph sma20 coloured(0,255,0)graph sma50 coloured(255,0,0)Obviously, the sma20 variable will never be equal to -100 🙂
You are absolutely right about the mode selection (UpdateOnClose or default), that’s why I warned people in the same article.
If the feature is in Beta testing with the software version, it smells good to get it with associated brokers within some weeks. Beta testing period with a wide range of codes is necessary before pushing it into real live trading. In the meantime, everyone is free to open a free EOD account with ProRealTime software and benefit of the new multi-timeframe support for automatic trading. So what are you waiting for? 😉
07/05/2018 at 11:46 AM #7529507/05/2018 at 11:56 AM #75298Do PRT plan on bringing MTF to ProBuilder for indicators?
I know they are working on indicators on Renko/Kagi/Point&Figure/etc. first and for the version 11 (with sooooooooo many new features and redesigned of the platform that everyone will be amazed!, I think I will able to show you things by September).
MTF for ProBuilder should come with v11.1 , as for the last news I get.
07/05/2018 at 12:08 PM #75303If I include the calculations within a strategy that returns a result do the variable names have to be different for each time frame?
I ask because I cut and pasted an indicator code into each time frame and then returned the result as a different variable name for each time frame and the code won’t run – it just goes to an error message asking to send a report.
07/05/2018 at 12:16 PM #75306Yes, the rules for variables naming is the same as before. You are programming in different timeframe, but the program is still a single one.
About your error message, seems like a bug. Difficult to help more without knowing the code itself! 🙂
07/05/2018 at 12:28 PM #75307I modified the code so that the variables for each time frame have different names by simply adding a ‘2’ to the end of them but it still errors out.
It is the standard error band code on each time frame and then I wanted to graph the results.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657P = 21SDEG = 1MF=2timeframe(weekly)AR = closeN = barindexLR = Average[SDEG](linearregression[P](AR))bv1 = summation[P](N*AR) - (P*Average[P](N)*Average[P](AR))bv2 = summation[P](square(N)) - (P*square(Average[P](N)))CalcB = bv1 / bv2CalcA = Average[P](AR) - (CalcB*Average[P](N))sev1 = Summation[P](square(AR)) - (CalcA*Summation[P](AR)) - (CalcB*Summation[P](N*AR))sev3 = P - 2SE = sqrt(sev1 / sev3)UB = LR + (SE * MF)BB = LR - (SE * MF)topline = UB - LRbottomline = LR - BBgap = topline + bottomlinecloselineW = ((close - bb) / gap) * 100timeframe(default)AR2 = closeN2 = barindexLR2 = Average[SDEG](linearregression[P](AR2))bv12 = summation[P](N2*AR2) - (P*Average[P](N2)*Average[P](AR2))bv22 = summation[P](square(N2)) - (P*square(Average[P](N2)))CalcB2 = bv12 / bv22CalcA2 = Average[P](AR2) - (CalcB2*Average[P](N2))sev12 = Summation[P](square(AR2)) - (CalcA2*Summation[P](AR2)) - (CalcB2*Summation[P](N2*AR2))sev32 = P - 2SE2 = sqrt(sev12 / sev32)UB2 = LR2 + (SE2 * MF)BB2 = LR2 - (SE2 * MF)topline2 = UB2 - LR2bottomline2 = LR2 - BB2gap2 = topline2 + bottomline2closelineD = ((close - bb2) / gap2) * 100if average[20] = -100 thenbuy at marketendifgraph closegraph closelinew coloured(0,128,0)graph closelined coloured(0,0,255)07/05/2018 at 12:40 PM #7530807/05/2018 at 12:47 PM #7530907/05/2018 at 1:26 PM #75318My very small contribution ….
MTF heikin strategy12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758defparam cumulateorders=false//timeframe(60days)If barindex=0 Thenmclose = Totalpricemopen = Open//xhigh = High//xlow = LowElsemclose = Totalpricemopen = (mopen[1]+mclose[1])/2//xhigh = Max(Max(High, xopen), xclose)//xlow = Min(Min(Low, xopen), xclose)Endiftimeframe(3days)If barindex=0 Thenwclose = Totalpricewopen = Open//xhigh = High//xlow = LowElsewclose = Totalpricewopen = (wopen[1]+wclose[1])/2//xhigh = Max(Max(High, xopen), xclose)//xlow = Min(Min(Low, xopen), xclose)Endif//timeframe(default)If barindex=0 Thenxclose = Totalpricexopen = Open//xhigh = High//xlow = LowElsexclose = Totalpricexopen = (xopen[1]+xclose[1])/2//xhigh = Max(Max(High, xopen), xclose)//xlow = Min(Min(Low, xopen), xclose)Endif//if xclose crosses over xopen and mclose>mopen thenbuy at marketendifif xclose crosses under xopen thensellshort at marketendifgraph xclose as "price"graph mclose coloured(148,0,211) as "Montly"graph mopen coloured(0,0,255)graph wclose coloured(255,255,0)graph wopen coloured(255,127,0)graph xclose coloured(0,255,0)graph xopen coloured(255,0,0)Cristiano
07/05/2018 at 1:33 PM #7532307/05/2018 at 1:58 PM #75330What is your default timeframe please? and what instrument?
DJI and Daily.
-
AuthorPosts
Find exclusive trading pro-tools on