Multiple Timeframe Strategy - futures io
futures io futures trading



Multiple Timeframe Strategy


Discussion in TradeStation

Updated
    1. trending_up 510 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 10 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Multiple Timeframe Strategy

(login for full post details)
  #1 (permalink)
Longview, TX
 
 
Posts: 6 since Dec 2016
Thanks: 2 given, 0 received

Does anyone know how to place data from a study/indicator that is on one timeframe into a strategy using a different timeframe in TradeStation? Say, for example, I wanted to use a moving average and an RSI in combination to produce entry and exit signals for a custom strategy. If I'm trading on a 5-mintue chart and I want a 5-min moving average and a 5-minute RSI, piece of cake. But, what if I want to trade a 5-minute chart with a 5-minute moving average and an hourly RSI? I've seen that this is possible on other platforms, but is it doable in TradeStation? Thanks in advance!

Reply With Quote

Journal Challenge February 2021 results (so far):
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(170 thanks from 31 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(116 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(31 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #2 (permalink)
CO/USA
 
Experience: Intermediate
Platform: TradeStation
Trading: Stocks, Futures
 
Posts: 37 since Jun 2020
Thanks: 28 given, 24 received

You should be able to add another data series to the chart (same symbol, but 60 minute timeframe), then call data2 in the strategy.

So you would have two MA and RSI values

MA1 = Average(close,9);
MA2 = Average(close of data2,9);
RSI1 = Average(close,14);
RSI2 = Average(close of data2,14);

Reply With Quote
 
(login for full post details)
  #3 (permalink)
 
 
Posts: 2,230 since Apr 2013
Thanks: 409 given, 1,470 received


SolaFide,

the information in this link might help you:


Regards,

ABCTG


SolaFide View Post
Does anyone know how to place data from a study/indicator that is on one timeframe into a strategy using a different timeframe in TradeStation? Say, for example, I wanted to use a moving average and an RSI in combination to produce entry and exit signals for a custom strategy. If I'm trading on a 5-mintue chart and I want a 5-min moving average and a 5-minute RSI, piece of cake. But, what if I want to trade a 5-minute chart with a 5-minute moving average and an hourly RSI? I've seen that this is possible on other platforms, but is it doable in TradeStation? Thanks in advance!


Follow me on Twitter Reply With Quote
 
(login for full post details)
  #4 (permalink)
Longview, TX
 
 
Posts: 6 since Dec 2016
Thanks: 2 given, 0 received

ShadowFox, thanks for the response. I tried inserting the code similar to what you suggested:

XMA1(0),
XMA2(0);
XMA1 = xaverage(close of data2, 8);
XMA2 = xaverage(close of data2, 20);

Strangely, adding ^^^this^^^ code does not generate any error or warning messages by TDE, but it does remove all of the buy/sell orders in the strategy. Said another way - my strategy was previously producing the desired entry/exit signals, but adding this code caused the strategy to not produce ANY entry or exit signals. I can't figure out why these four little lines would have any effect on my order generation?

Reply With Quote
 
(login for full post details)
  #5 (permalink)
CO/USA
 
Experience: Intermediate
Platform: TradeStation
Trading: Stocks, Futures
 
Posts: 37 since Jun 2020
Thanks: 28 given, 24 received

If you only added those 4 lines of code and did not change the logic of order fills at all, then that is a problem. Were XMA1 and XMA2 off data1 before and are you using those for your order entry settings? Its possible that there are no longer any valid trades based on the new logic. I like to add indicators with trade flags that should mimic my strategy and if I still generate signals in the indicator but not the strategy then something is definitely wrong. I hope that helps, but if not feel free to ping me with more details!

Reply With Quote
 
(login for full post details)
  #6 (permalink)
Longview, TX
 
 
Posts: 6 since Dec 2016
Thanks: 2 given, 0 received


ShadowFox View Post
If you only added those 4 lines of code and did not change the logic of order fills at all, then that is a problem. Were XMA1 and XMA2 off data1 before and are you using those for your order entry settings? Its possible that there are no longer any valid trades based on the new logic. I like to add indicators with trade flags that should mimic my strategy and if I still generate signals in the indicator but not the strategy then something is definitely wrong. I hope that helps, but if not feel free to ping me with more details!


I was planning to make my order entries conditional on the values of the data2 moving averages but never got that far. Once I added the four lines of code mentioned, I validated the strategy and went back to the chart to find all of my entries and exits gone. Of course I went back and forth several times trying to figure out the problem but no luck. I never tried running XMA1 and XMA2 off of data1 but I'm sure that wouldn't be a problem. Can I ask you something? Obviously, by default, everything on the chart analysis feeds off of data1 without you having to specifically call it. But if you specify that certain inputs should feed from data2 (in this case the XMA's), do you need to tell the other inputs to use data1? Sorry if I sound like a total rookie and thanks for the help so far. I watched a couple of videos by a guy who runs a company called Markplex - he has some good stuff on there btw - about using a price series provider to do what I'm attempting to do but its some serious programming.

Reply With Quote
 
(login for full post details)
  #7 (permalink)
 
 
Posts: 2,230 since Apr 2013
Thanks: 409 given, 1,470 received

SolaFide,

you do not have to tie the "other" code to data1. If you omit a specific data stream Tradestation will use Data1 by default.

How many data 2 bars do you have on the chart and what are you max bars back settings for the strategy? When you use multiple data streams all have to surpass the max bars back settings before the strategy will perform calculations. This could be a reason for not seeing any trades.

Regards,

ABCTG


SolaFide View Post
I was planning to make my order entries conditional on the values of the data2 moving averages but never got that far. Once I added the four lines of code mentioned, I validated the strategy and went back to the chart to find all of my entries and exits gone. Of course I went back and forth several times trying to figure out the problem but no luck. I never tried running XMA1 and XMA2 off of data1 but I'm sure that wouldn't be a problem. Can I ask you something? Obviously, by default, everything on the chart analysis feeds off of data1 without you having to specifically call it. But if you specify that certain inputs should feed from data2 (in this case the XMA's), do you need to tell the other inputs to use data1? Sorry if I sound like a total rookie and thanks for the help so far. I watched a couple of videos by a guy who runs a company called Markplex - he has some good stuff on there btw - about using a price series provider to do what I'm attempting to do but its some serious programming.


Follow me on Twitter Reply With Quote
 
(login for full post details)
  #8 (permalink)
Longview, TX
 
 
Posts: 6 since Dec 2016
Thanks: 2 given, 0 received


ABCTG View Post
SolaFide,

you do not have to tie the "other" code to data1. If you omit a specific data stream Tradestation will use Data1 by default.

How many data 2 bars do you have on the chart and what are you max bars back settings for the strategy? When you use multiple data streams all have to surpass the max bars back settings before the strategy will perform calculations. This could be a reason for not seeing any trades.

Regards,

ABCTG


ABCTG,
Regarding the data streams, that's what I assumed, but thank you for verifying.

On another note, thanks a million! It appears that the reason the trades signals weren't being generated was because the I had my max bars back ("maximum number of bars study will reference") set too high. I'm using 1-minute, look-inside-bar backtesting and wanted max bars back to be high as possible to get as accurate results as possible.

Now to figure out what a good max bars back setting is since I'm noticing that the higher I set it, the lower (and I'm assuming more realistic) my projected profit numbers are.

I don't know that I ever would have discovered that was the problem so thanks again!

Reply With Quote
 
(login for full post details)
  #9 (permalink)
 
 
Posts: 2,230 since Apr 2013
Thanks: 409 given, 1,470 received

SolaFide,

my pleasure. You might be misunderstanding what the max bars back feature does.
This is basically the number of bars your code skips prior to the current bar to ensure it has enough bars to perform internal calculations.
If you are using a simple moving average with a length of 10 you will require 10 bars to compute it. Consequently your max bars back needs
to be 9 at least (9 prior bars plus the current bar). Anything less would raise a run time error message. Anything above that would (in this particular
example) only result in an unnecessary large part of your data set being skipped.

The TS Wiki has a very helpful article that should clear all questions.

Regards,

ABCTG



SolaFide View Post
ABCTG,
Regarding the data streams, that's what I assumed, but thank you for verifying.

On another note, thanks a million! It appears that the reason the trades signals weren't being generated was because the I had my max bars back ("maximum number of bars study will reference") set too high. I'm using 1-minute, look-inside-bar backtesting and wanted max bars back to be high as possible to get as accurate results as possible.

Now to figure out what a good max bars back setting is since I'm noticing that the higher I set it, the lower (and I'm assuming more realistic) my projected profit numbers are.

I don't know that I ever would have discovered that was the problem so thanks again!


Follow me on Twitter Reply With Quote
 
(login for full post details)
  #10 (permalink)
Longview, TX
 
 
Posts: 6 since Dec 2016
Thanks: 2 given, 0 received



ABCTG View Post
SolaFide,

my pleasure. You might be misunderstanding what the max bars back feature does.
This is basically the number of bars your code skips prior to the current bar to ensure it has enough bars to perform internal calculations.
If you are using a simple moving average with a length of 10 you will require 10 bars to compute it. Consequently your max bars back needs
to be 9 at least (9 prior bars plus the current bar). Anything less would raise a run time error message. Anything above that would (in this particular
example) only result in an unnecessary large part of your data set being skipped.

The TS Wiki has a very helpful article that should clear all questions.

Regards,

ABCTG


ABTCG,
I yeah I think I was misunderstanding that then. The title of the field is misleading. When you say "max bars back" you are referring to Studies->Edit Strategies->Properties for All-> General -> Backtesing Resolution -> "maximum number of bars study will reference." Correct?
Best,
Alex

Reply With Quote
 
(login for full post details)
  #11 (permalink)
 
 
Posts: 2,230 since Apr 2013
Thanks: 409 given, 1,470 received

Alex,

correct. Yes, the name "maximum number of bars study will reference" can be a bit misleading.

Regards,

ABCTG


SolaFide View Post
ABTCG,
I yeah I think I was misunderstanding that then. The title of the field is misleading. When you say "max bars back" you are referring to Studies->Edit Strategies->Properties for All-> General -> Backtesing Resolution -> "maximum number of bars study will reference." Correct?
Best,
Alex


Follow me on Twitter Reply With Quote


futures io Trading Community Platforms and Indicators TradeStation > Multiple Timeframe Strategy


Last Updated on February 5, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1500 prizes from Topstep!

February
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts