I want to run my code in different time frames in one single analysis. That means I set the periodicity to the lowest timeframe (that i want to use) and then loop through every time frame in my code to generate arrays and trades. So for example for Stock AAAA I want to trade on 1, 2, 3, 4, 5 minutes so i set periodicity to 1 minute in analysis settings and then loop through the time frames in my code as shown below. Also I want to be able to place trades in different timeframes and these I want them to be treated separately from one another. For example For Stock AAAA I may have a Long position starting at 10AM on 5 minutes timeframe and then another Long trade that opens at 10:03AM in 3 Minute timeframe an then a Short trade opening at 10:15 in 1 minute timeframe. I want these 3 trades howing up as 3 indicidual trades in the trade list. So in summary Stock + timeframe combination can have a Long or short trade open simultaneously. All this from one single analysis window.
for (tfCounter=1; tfCounter<=5;tfCounter++)
Timeframeset(tfCounter * in1minute);
// my code
I want the tradelist to look something like below. Notice the custom column timeframe.
When i open the trades (show current trade arrows) it will open in base periodicity and then I have to manually switch to the respective time frame.
How can i achieve this. All i need is some inspiration.