Happy new year everyone!
Here is another question for the experts:
Lets say I have a multtimeframe strategy and the 2 higher Timeframes give me signals independent from the lower TF. These higher signals shall be "stored" as the lower Timeframe shall only trade once the "higher" signal is still valid. So the conditions for the lower data stream have nothing to do with the ones from the higher data streams. How can I implement that in one strategy? Can I just "store" the higher TF signal in a condition and use a "while loop" so the signal does not vanish as we move on along the bars? Do you get my idea?
Best regards
Jonas
Multitimeframe strategy
Re: Multitimeframe strategy
When you declare and initialize your variables you need to reference the data set in which they are associated. Data 1 is the top chart, the chart in which you signal off. The other data sets / sub charts are associated with conditional statements that are used to generated signals for Data 1. Be careful with intrabar strategies using multiple data sets. Unless it has changed, which I don't believe it has. Data 1 can calculate on every tick, whereas Data2, etc will only calculate on OHLC so you will not have accurate backtests. If you reference prior bars (i.e. closed bars) for Data2, etc then no issue, but if you need to signal off open Data2, etc bars, then be careful.
Re: Multitimeframe strategy
"While" is for looping.
Maybe the use of switches is better.
Have a look at this
viewtopic.php?t=50410
But keep in mind that I am not an expert
Greetings and happy new year
Maybe the use of switches is better.
Have a look at this
viewtopic.php?t=50410
But keep in mind that I am not an expert
Greetings and happy new year
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times