[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/19/2018 at 10:49 AM #76302
Yeah, I got the same message, I was using a strategy on 30-minute chart with my code dealing with 1-hour and 1-minute TFs!
I had to switch to 1-minute (all TIMEFRAMES referenced within the code MUST be multiple of the one on the chart, so the chart TF has to be equal or less than the smallest one in the code).
2 users thanked author for this post.
07/19/2018 at 11:32 AM #76306thanks! that was it!
07/19/2018 at 12:36 PM #76315So far MTF is working out just great.
Here is the results of a very simple long only strategy with entries and exits based purely on RSI across four time frames and with a simple bull market/bear market filter on the daily timeframe. It is traded on the DJI 5 minute chart. I like the fact that it has been consistently profitable in both trending and the recent volatile choppy markets.
Has anyone else got any good examples of MTF working well ?
07/19/2018 at 12:51 PM #76319nice work! i am working on a TF model – but still working haha
07/19/2018 at 1:04 PM #76320entries and exits based purely on RSI across four time frames and with a simple bull market/bear market filter on the daily timeframe. It is traded on the DJI 5 minute chart.
You big tease … let’s see what you’ve got! 🙂 🙂
07/19/2018 at 1:11 PM #76321I just tried to code something using a default chart time frame of 10 minutes with 15 minute, 30 minute, 1 hour and daily time frames and I got this error:
I’m guessing it is because 10 does not divide into fifteen. I’m not sure that I understand why we are limited to time frames that can be divided into each other but it will be something that we have to be aware of when coming up with our strategy ideas.
07/19/2018 at 1:14 PM #76324You big tease … let’s see what you’ve got!
You show me yours and I might show you mine. Anyhow it is all in the strategy description – you just need to use the right numbers and fill in the bits of code in between them to get the same strategy.
07/19/2018 at 1:41 PM #7632615 is not a multiple of 10, try 5 instead, so 5-15-30….
07/19/2018 at 1:50 PM #7632715 is not a multiple of 10, try 5 instead, so 5-15-30….
Yes I understand the maths! I just don’t understand the logic behind the reason.
07/19/2018 at 2:44 PM #76332u dont have to understand… 😀 its new and not perfect 😀 but i had the same problem first so thats why i changed like roberto said. better than nothing and better than without timeframe 🙂
07/19/2018 at 6:58 PM #76344Not been following progress or read anything re Multi-TF as I kinda thought the coding would be complex! 🙂
Anyway jumped straight in … seems intuitive and easier / more straightforward code to get a decent result with Multi than single TF?
Attached is only 12 lines of code that even I can understand! 🙂
07/19/2018 at 8:59 PM #76348Attached is only 12 lines of code that even I can understand!
Now you are teasing….
07/20/2018 at 7:58 AM #76374Just a question. I have an IG account (real account), but i can switch on demo account and run Prorealtime on demo. I did it and tried to run a MTF code but it did not work…
Do you know how i can have access to MTF backtest ? Is it working in France ?07/20/2018 at 10:14 AM #76380tried to run a MTF code but it did not work…
If you post your code on here then I would run it for you to see what I get and if I can see any issues in the code.
Seems to me the easiest / quickest way to find out if it’s your code or your Platform?
07/22/2018 at 3:13 PM #76468I did not have the opportunity to test this code as i do not have access to MTF with IG now.
But, this is a piece of code i would try to improve when I can.
It is only buy at the moment. You can make it run on EURUSD M1 to test it.. maybe it will be very bad i do not know.
The idea in the future would be to improve the MM and the exit method (Entry in M1 but manage a breakeven in M1 + exit in M5 or M15…).12345678910111213141516171819202122232425262728293031323334353637// DéfinitionDEFPARAM CumulateOrders = FalseDEFPARAM FLATBEFORE = 090000DEFPARAM FLATAFTER = 120000TIMEFRAME(5 minutes)haclose=(open+close+low+high)/4haopen=(haopen[1]+haclose[1])/2sto = Stochastic[5,3](close)bull5=(haclose>haopen) and (sto>sto[1]) and (sto<80)TIMEFRAME(15 minutes)haclose=(open+close+low+high)/4haopen=(haopen[1]+haclose[1])/2sto = Stochastic[5,3](close)bull15=(haclose>haopen) and (sto>sto[1]) and (sto<80)TIMEFRAME(default)haclose=(open+close+low+high)/4haopen=(haopen[1]+haclose[1])/2sto = Stochastic[5,3](close)Average=Average[3]Signal= (haclose>haopen) and (sto>sto[1]) and (sto<80) and sto CROSSES OVER average)if bull5 and bull15 and signal thenbuy at marketendif// Close positionTIMEFRAME(default)sto = Stochastic[5,3](close)IF sto CROSSES OVER 80 THENSELL AT MARKETENDIF// StopsSET STOP pLOSS 15 -
AuthorPosts
Find exclusive trading pro-tools on