MultiTimeFrame simple conditions
Forums › ProRealTime English forum › ProOrder support › MultiTimeFrame simple conditions
- This topic has 32 replies, 5 voices, and was last updated 5 years ago by jebus89.
-
-
01/28/2019 at 1:25 PM #89797
Hi all,
I just got an idea. We made a very simple strategy like :
Close above SMA20 in a downward SMA20 curve, Price above SMA200 in a upward curve ( more or less “mean reversal” strategy)
Condition to entry Long1ConditionLong00001= close>average[20](close) and average[20](Close[1])>average[20](Close) and lowest[5](low) > average[200](Close) and average[200](Close[1])<average[200](Close)Then this condition we put it in multiple time Frames…
In means that when that condition in many other Chart, we entry the markets…
I am not at home already but here is more or less my psehudo code.
Strategy to be run in 5 min chart
MultiTimeFrame simple Strategy Pseudo code123456789101112131415161718192021222324252627282930313233ConditionLong00001= close>average[20](close) and average[20](Close[1])>average[20](Close) and lowest[5](low) > average[200](Close) and average[200](Close[1])<average[200](Close)timeframe(10 minutes,updateonclose)ConditionLong00002= close>average[20](close) and average[20](Close[1])>average[20](Close) and lowest[5](low) > average[200](Close) and average[200](Close[1])<average[200](Close)timeframe(15 minutes,updateonclose)ConditionLong00003= close>average[20](close) and average[20](Close[1])>average[20](Close) and lowest[5](low) > average[200](Close) and average[200](Close[1])<average[200](Close)timeframe(20 minutes,updateonclose)ConditionLong00004= close>average[20](close) and average[20](Close[1])>average[20](Close) and lowest[5](low) > average[200](Close) and average[200](Close[1])<average[200](Close)timeframe(30 minutes,updateonclose)ConditionLong00005= close>average[20](close) and average[20](Close[1])>average[20](Close) and lowest[5](low) > average[200](Close) and average[200](Close[1])<average[200](Close)timeframe(45 minutes,updateonclose)ConditionLong00006= close>average[20](close) and average[20](Close[1])>average[20](Close) and lowest[5](low) > average[200](Close) and average[200](Close[1])<average[200](Close)timeframe(60 minutes,updateonclose)ConditionLong00007= close>average[20](close) and average[20](Close[1])>average[20](Close) and lowest[5](low) > average[200](Close) and average[200](Close[1])<average[200](Close)timeframe(120 minutes,updateonclose)ConditionLong00008= close>average[20](close) and average[20](Close[1])>average[20](Close) and lowest[5](low) > average[200](Close) and average[200](Close[1])<average[200](Close)timeframe(240 minutes,updateonclose)ConditionLong00009= close>average[20](close) and average[20](Close[1])>average[20](Close) and lowest[5](low) > average[200](Close) and average[200](Close[1])<average[200](Close)timeframe(default)ConditionLong = ConditionLong00001 + ConditionLong00002 + ConditionLong00003 + ConditionLong00004 + ConditionLong00005 + ConditionLong00006 + ConditionLong00007 + ConditionLong00008 + ConditionLong00009If ConditionLong > 2 thenbuy at marketendif01/28/2019 at 1:27 PM #8979801/28/2019 at 2:06 PM #8980401/28/2019 at 2:38 PM #89809I didn’t know there’s a limit. Good to know!
01/28/2019 at 2:59 PM #8981101/28/2019 at 3:20 PM #89818Just remove a TIMEFRAME at a time until no erros is reported, let us know!
01/28/2019 at 3:22 PM #8982201/28/2019 at 3:23 PM #8982501/28/2019 at 3:25 PM #89826Just remove a TIMEFRAME at a time until no erros is reported, let us know!
Ha I dd that but forgot to keep a note, but anyway the Limit is 5 TF’s (+ default) as it says so on the error message??
01/28/2019 at 3:27 PM #89828AhAhAh…. fa kin soo pa!
I need to contact my optician!
01/28/2019 at 3:31 PM #89831fa kin soo pa!
I didn’t know you could speak Chinese!
2 users thanked author for this post.
01/28/2019 at 3:35 PM #8983301/28/2019 at 3:52 PM #89836The limit is 5 TF’s (+ default one), but…
- writing them with AND without UPDATEONCLOSE counts as 1
- writing multiple times the same TF in the strategy counts AS 1
This works finely:
12345678910111213141516171819202122232425262728293031TIMEFRAME(default)c01 = average[200]TIMEFRAME(128 hours) //TF 1c02 = average[200]TIMEFRAME(128 hours,updateonclose)c03 = average[200]TIMEFRAME(32 hours) //TF 2c04 = average[200]TIMEFRAME(32 hours,updateonclose)c05 = average[200]c06 = average[200]TIMEFRAME(128 hours,updateonclose) //TF 1c07 = average[200]c08 = average[200]c09 = average[200]TIMEFRAME(120 minutes) //TF 3c10 = average[200]TIMEFRAME(60 minutes,updateonclose) //TF 4c11 = average[200]TIMEFRAME(60 minutes)c12 = average[200]TIMEFRAME(2 minutes,updateonclose) //TF 5c13 = average[200]TIMEFRAME(2 minutes)c14 = average[200]c15 = average[200]buy AT -close limitTIMEFRAME(default)x=c01 +c02 +c03 +c04 +c05 +c06 +c07 +c08 +c09 +c10 +c11 +c12 +c13 +c14 +c15IF x THENENDIF01/28/2019 at 4:16 PM #8983801/28/2019 at 4:31 PM #89843Sorry , there’s must have been a misunderstanding. The limit is till 5 TF’s, what I meant was that you can write the TIMEFRAME keyword 10 or more times, with/without UPDATEONCLOSE and it will be valid, but if you write 6 different TF’s, no matter whether using default or updateonclose, you are beyond limits.
The limit is the number of DIFFERENT TF’s you want to use, not how many times you use the TIMEFRAME keyword, thus an answer to your last post is not a way to overcome the limit.
-
AuthorPosts
Find exclusive trading pro-tools on