Automated Trading on IG PRT
06/23/2022 at 10:49 AM #195937
I’m attempting to write automation programs on the fly via IG’s version of PRT. It appears that multiple timeframe condition setting is not possible.
can anyone confirm whether this is the case for IG’s PRT as I know there are other restrictions on using PRT via IG, for instance, the inability to set SMS messaging.
J06/23/2022 at 11:52 AM #19594506/24/2022 at 6:24 PM #19604706/24/2022 at 6:47 PM #196050
When you have coded all your conditions (on the fly) make a duplicate of the TS.
Then add MTF to the duplicated TS under the Creation by Programming tab.
Doing above, you still have your original code that you can go back to and add / change conditions using Simplified Creation.06/25/2022 at 9:18 AM #196059
I find that the multi time frame coding simply does not work using the version of PRT available via IG.
for instance, if I set three conditions on the 3 minute t/f and a fourth on 10 minute, the latter has no impact on the outcome using a backtest.
this is also true for screening and alarms. I set a combination of settings for a screener but when applied and used I get a list of matches none of which marry up with the conditions set.06/25/2022 at 9:29 AM #196060
if I set three conditions on the 3 minute t/f and a fourth on 10 minute,
Try running the TS on 1 min TF as then the 1 min TF will ‘synch‘ with both 3 min and 10 min.
Alternatively to run TS on 3 min TF, change 10 min to 9 min TF or 12 min TF.06/25/2022 at 10:00 AM #196062
3-4 weeks back a similar subject appeared about the combination of Strategy code and an Indicator – and how to work with TimeFrames. I looked at it and thought “oh well”. However, later I tried to use it myself and could not get it to work, just like John here. Then I tried to find back that topic and did not find it.
In other words :
It can well be so that John has ran into an issue which is real.
In my case I have conditions in the Strategy code which I tried to move to an indicator. The Strategy code works with different timeframes for the conditions and works fine. This should be picked up by the ONE indicator and I can’t get the conditions to match. Although I did not try it, I am pretty sure that if I’d make two (or even more) indicators of that, individually they will work.
I feel something like the indicator “requires” to inherit the TimeFrame of the code where it is called, and internally it won’t overrule. If that would be true, it is impossible that it can work.
For the chalkboard, here you see three different arrow-types. If you count out the triple arrows, there are two others and one of them I can’t get to work correctly. They work in different time frames. When the strategy code does not depend on them (but the Indicator code still plots them), then all works out fine for the intended trades.
Not sure whether this is helpful, but I guess it means that helping out implies doing it ourselves and not talk from theory only. IMO debugging this is not easy and time consuming.
John, assumed there are no real secrets in your code yet, could you Export the Strategy and next attach the .itf coming from that here ?
You must be logged in to access attached files.06/25/2022 at 5:05 PM #196094
Thanks for taking this up Peter.
Here’s just an example auto strategy which hopefully makes clear the issues i have in that not all conditions are being met for entries. As i mention this is also happening for screening and alerts.
I attach the itf file and a screenshot of the automated entries form a backtest showing that the moving average condition for both 30 min and 4 hour is not being met.
You must be logged in to access attached files.06/25/2022 at 6:09 PM #19609806/25/2022 at 6:48 PM #196103
What you say makes logical sense but if time frames have to be multiples of one another then why is there an issue using syncing conditions on the 10 minute, 30 minute and 4 hour time frames? I have attached the itf file relating to this along with a screen shot indicating that not all conditions are being met in a repsonse to Peter S.
John06/25/2022 at 7:44 PM #196110
John, I don’t see anything of you using different TimeFrames. You imply them (I think ??) by using longer averages which I can’t even match with anything. So how your screenshots match your .itf – it is beyond me. But also and again : I am not good in such interpretations hence guessing what people mean without telling really. And I know you try hard but …
I don’t see it.
Please investigate the TimeFrame command (Google it, together with “ProRealCode”. And from there change things or talk differently ?06/25/2022 at 7:46 PM #196113
I imported your trading system and did a backtest.
I don’t see multiple time frames in your example trading system.
I don’t see any particulars in the backtests.
Of course, the highest time frame will execute the fewest trades.
When you switch “normally” from one time frame to another time frame, all data will be recalculated because you actually zoom in or out on the graph.
So, the chart changes, becomes coarser or more detailed, the values of the prices change, and the values of any indicators used also change.06/25/2022 at 10:16 PM #19611806/25/2022 at 10:23 PM #196119