multi time-frame questions -- this is different - NinjaTrader Programming | futures io social day trading
futures io futures trading


multi time-frame questions -- this is different
Updated: Views / Replies:821 / 4
Created: by balance Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

multi time-frame questions -- this is different

  #1 (permalink)
Elite Member
Taiwan
 
Futures Experience: Intermediate
Platform: TOS, Matlab
Broker/Data: IB, ToS
Favorite Futures: HSI, TF, CL
 
Posts: 15 since Aug 2011
Thanks: 5 given, 7 received

multi time-frame questions -- this is different

Guarantee this is a different type of multi time frame question.

I have a strategy relying on three time frames, e.g., hourly, 10 min, and 2 min charts on the same instrument.
The logic is similar, do some computation, then consult the parent and child for their 'view of the world'. Make trade decision, then move on.

since the logic is fairly complex, using the standard multi timeframe approach will make my hair grey. In addition, I'd like each to have its own position, so I came up with a new way of running the SAME strategy multiple instances, each with its own time frame.
The class will have some static members for cross strategy communication, so that each can read others' 'view of the world'.
So it's quite possible Hourly is going long while 10-min is going short and 2-min is going long. Of course I can further optimize it so that when 2-min is going short, then all upper layers will go short or revers if currently long, etc. etc. But that's not the point here.

Since we have hourly, or even day, weekly, I have to do my own tick count because per tick is too expensive, and OnBarClose is not an option. This is also fine.

The question then is, assuming the strategy will run every 20 ticks, and the 10-min one is responsible for trades and the other two are only acting as 'consultants'. How can I make sure the 10-min instance is invoked last, on each OnBarUpdate event handling?

A general question is, when multiple strategies are running on a NT system, is there a fixed sequence of how each event is handled? or They could be run in parallel or un-deterministic sequence. If it's the former, then how to set the sequence?
If it's random/or parallel then I have a serious problem since ideally I'd prefer the 10-min be run last so that whey it's asking others for information, it's up to date. You don't want the 10-min making trade decision based on 2-min's 20-tick ago data.

Of course if I want al three to run trades, then I have no choice but to leave to it per tick, then the problem is I have to worry about if the system can take the load.

Any suggestion as to solve or improve on this?

Thanks.

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Northern Germany
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: FDAX, CL
 
vvhg's Avatar
 
Posts: 1,583 since Mar 2011
Thanks: 1,016 given, 2,807 received



balance View Post
Guarantee this is a different type of multi time frame question.

I have a strategy relying on three time frames, e.g., hourly, 10 min, and 2 min charts on the same instrument.
The logic is similar, do some computation, then consult the parent and child for their 'view of the world'. Make trade decision, then move on.

since the logic is fairly complex, using the standard multi timeframe approach will make my hair grey. In addition, I'd like each to have its own position, so I came up with a new way of running the SAME strategy multiple instances, each with its own time frame.
The class will have some static members for cross strategy communication, so that each can read others' 'view of the world'.
So it's quite possible Hourly is going long while 10-min is going short and 2-min is going long. Of course I can further optimize it so that when 2-min is going short, then all upper layers will go short or revers if currently long, etc. etc. But that's not the point here.

Since we have hourly, or even day, weekly, I have to do my own tick count because per tick is too expensive, and OnBarClose is not an option. This is also fine.

The question then is, assuming the strategy will run every 20 ticks, and the 10-min one is responsible for trades and the other two are only acting as 'consultants'. How can I make sure the 10-min instance is invoked last, on each OnBarUpdate event handling?

A general question is, when multiple strategies are running on a NT system, is there a fixed sequence of how each event is handled? or They could be run in parallel or un-deterministic sequence. If it's the former, then how to set the sequence?
If it's random/or parallel then I have a serious problem since ideally I'd prefer the 10-min be run last so that whey it's asking others for information, it's up to date. You don't want the 10-min making trade decision based on 2-min's 20-tick ago data.

Of course if I want al three to run trades, then I have no choice but to leave to it per tick, then the problem is I have to worry about if the system can take the load.

Any suggestion as to solve or improve on this?

Thanks.

I think the only way to make sure they are called in the correct sequence would be to call them yourself. But with that approach you would be at the starting point where you could run one multi timeframe strategy. The other thing would be to instantiate the two "consultants" from within the strategy and then put the code there in a method that you call instead of in OnBarUpdate ( I never got this part right though) or you make the strategy instances available to each other and then call the methods you need (this is rather easy).

vvhg

Hic Rhodos, hic salta.

Last edited by vvhg; January 11th, 2013 at 10:03 AM.
Reply With Quote
 
  #4 (permalink)
Elite Member
Taiwan
 
Futures Experience: Intermediate
Platform: TOS, Matlab
Broker/Data: IB, ToS
Favorite Futures: HSI, TF, CL
 
Posts: 15 since Aug 2011
Thanks: 5 given, 7 received


vvhg View Post
I think the only way to make sure they are called in the correct sequence would be to call them yourself. But with that approach you would be at the starting point where you could run one multi timeframe strategy. The other thing would be to instantiate the two "consultants" from within the strategy and then put the code there in a method that you call instead of in OnBarUpdate ( I never got this part right though) or you make the strategy instances available to each other and then call the methods you need (this is rather easy).

vvhg

Thanks for the note.
Being relative new to NT programming, I didn't even know you can instantiate another strategies from within a strategy.
In this case, if I am 10-min, how do you specify the hour being the instance created?

And can we assume the hour instance will still have its DataSeries aligned with its own timeframe?

Thanks!

Reply With Quote
 
  #5 (permalink)
Elite Member
Northern Germany
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: FDAX, CL
 
vvhg's Avatar
 
Posts: 1,583 since Mar 2011
Thanks: 1,016 given, 2,807 received


balance View Post
Thanks for the note.
Being relative new to NT programming, I didn't even know you can instantiate another strategies from within a strategy.
In this case, if I am 10-min, how do you specify the hour being the instance created?

And can we assume the hour instance will still have its DataSeries aligned with its own timeframe?

Thanks!

Well, that's the tricky part. I know it can be done but I am missing one piece, so I can't do it. But you can achieve the same with running a strategy that has a pointer to itself, that way you can call and access(depending on protection level of course) its methods and variables. So you have a strategy with the poiter, add and enable it in NT UI and then you can do whatever you want with it, like call a method every time the calling strategy has counted n number of ticks...

vvhg

Hic Rhodos, hic salta.
Reply With Quote

Reply



futures io > > > > > multi time-frame questions -- this is different

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubleshooting multi time frame strategy jperales NinjaTrader Programming 4 October 9th, 2014 03:21 PM
Multi Time Frame Strategy Cancellation jthom NinjaTrader Programming 2 October 9th, 2014 12:00 PM
ADX Multi Time Frame bellair NinjaTrader 9 November 10th, 2011 11:14 AM
visual multi-time frame scoring system. benbrooke Traders Hideout 1 October 4th, 2009 06:49 PM
Multi Volume/Time Frame Trading wh The Elite Circle 7 September 15th, 2009 05:55 PM


All times are GMT -4. The time now is 02:38 AM.

Copyright © 2017 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
Page generated 2017-12-17 in 0.09 seconds with 19 queries on phoenix via your IP 54.82.56.95