frequency of execution of system
Forums › ProRealTime English forum › ProOrder support › frequency of execution of system
- This topic has 7 replies, 3 voices, and was last updated 5 years ago by
ibalis.
-
-
04/27/2020 at 5:12 PM #128467
Apologies for the question which will seem straight-forward, but I am a new user so I am trying to figure out the basics.
I am using a 24 hour MACD strategy for auto trading, and I would like to make it more frequent. i.e. if it has decided to sell at 2pm it currently waits until 12am to execute the order. I was thinking that if for example I am using a 24 hour MACD with parameters [12, 26, 9] this should be very similar to a 12 hour MACD of [24, 52, 18] i.e. at 00:00 every night both strategies should be both either long or short. I tried that and it seems it doesn’t work like that, i.e. there are occasions that the 12hour strategy is long and the 24hour is betting short at 00:00 (which is whenn both strategies are executed). What am I missing?
Bonus question: how can I change the time that the strategy is executed? The default time seems to be 00:00 for 24 hr strategies.
Many thanks in advance,
Yanis
04/27/2020 at 5:32 PM #128473Hi Yanis, I think you’ll get a lot more help if you were to post the code so people can see what’s going on. Click the button above that says Insert PRT Code. The instrument and time frame also helpful.
1 user thanked author for this post.
04/27/2020 at 5:43 PM #128477Bonus question: how can I change the time that the strategy is executed? The default time seems to be 00:00 for 24 hr strategies.
Simply run your strategy on a different time frame. You can use MTF to for example get the daily MACD levels and then trade on a 1 second time frame using them if you want to.
For the other question we would need the code to help you as our crystal ball is in for servicing at the moment. 🙂
1 user thanked author for this post.
04/27/2020 at 7:33 PM #128492Thank you both!
It seems that the calculation timeframe can be different to the execution timeframe which is very interesting. Can you please explain to me how I could implemented this?
I am using a very simple MACD strategy as per below.
On a theoretical note though, shouldn’t the 24hr MACD strategy with parameters [a,b,c] produce exactly the same decisions with the 12 hr MACD strategy with parameters [2a, 2b, 2c] every 24 hours?
Many thanks!
123456789101112131415161718192021222324252627282930313233343536373839// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Conditions to enter long positionsa = 10b = 34c = 18Amount = 4indicator1 = MACD[a,b,c](close)c1 = (indicator1 >= 0)IF c1 THENBUY Amount PERPOINT AT MARKETENDIF// Conditions to exit long positionsindicator2 = MACD[a,b,c](close)c2 = (indicator2 <= 0)IF c2 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator3 = MACD[a,b,c](close)c3 = (indicator3 <= 0)IF c3 THENSELLSHORT Amount PERPOINT AT MARKETENDIF// Conditions to exit short positionsindicator4 = MACD[a,b,c](close)c4 = (indicator4 >= 0)IF c4 THENEXITSHORT AT MARKETENDIF04/27/2020 at 7:51 PM #128494On a theoretical note though, shouldn’t the 24hr MACD strategy with parameters [a,b,c] produce exactly the same decisions with the 12 hr MACD strategy with parameters [2a, 2b, 2c] every 24 hours?
The simple answer to this is no. The proof can be seen with this simple dummy strategy that plots all the different MACD’s. Run it on a 12 hour chart.
See here for how the TIMEFRAME instruction works:
1234567891011121314timeframe (daily,updateonclose)DailyUPOC = MACD[10,34,18](close)timeframe (daily,default)DailyDefault = MACD[10,34,18](close)timeframe (12 hours)HR12MACD = MACD[20,68,36](close)buy at -close limitgraph DailyUPOCgraph DailyDefaultgraph HR12MACD1 user thanked author for this post.
04/27/2020 at 8:52 PM #12850504/27/2020 at 9:29 PM #128510Are you Greek?
No – I’m unfortuntely British but I live on a sailing boat and arrived in Greece in 2007. Since then apart from a handful of years in Turkey and Cyprus I have been in Greece. I did wonder if you would ask when I saw the name Yanis. Are you a British Greek or a Greek Greek in Britain!?
1 user thanked author for this post.
05/01/2020 at 8:28 PM #129310 -
AuthorPosts
Find exclusive trading pro-tools on