Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-time frame strategy with periods of different size

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_JoshP
    replied
    pequemec,

    You can't use [0] the way it works out of the box because you are skipping bars with your time filter. You need to program logic that uses only the series at points you want for your calculations. Unfortunately this would require some more extensive programming to achieve. You may want to consider one of these 3rd party NinjaScript Consultants here: http://www.ninjatrader.com/webnew/pa...injaScript.htm

    Leave a comment:


  • pequemec
    replied
    Ok, How do I maintain the continuity of the indicator?
    Sorry but I'm not a programmer

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    I'm not sure I follow what you mean 'with gaps of 0's', but for sure it will disrupt indicator continuity the way you programmed it as it does not have enough data to initialize calcs properly at time filter start.

    Leave a comment:


  • pequemec
    replied
    Suppose we apply that logic in the indicator Bollinger. Syntax:

    protected override void OnBarUpdate()
    {
    //Filtro temporal
    if (ToTime(Time[0]) > 153000 && ToTime(Time[0]) <= 221500)
    miscierres.Set(Close[0]);
    else
    return;

    BandaSuperior.Set(SMA(miscierres, periodo)[0] + desvest * StdDev(miscierres, periodo)[0]);
    BandaMedia.Set(SMA(miscierres,periodo)[0]);
    BandaInferior.Set(SMA(miscierres, periodo)[0] - desvest * StdDev(miscierres, periodo)[0]);

    }


    What happens is that you fill the "gaps" of zeros. How do I fix?
    Attached Files

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    pequemec,

    How we have been outlining is how it works. It will work for what you have outlined. You need to use time filters. You can either get the indicator logic into the strategy directly like Austin mentioned or you can program the time filter into the indicator directly. Unfortunately there is no way around this. 7 works exactly the same way.

    Leave a comment:


  • pequemec
    replied
    Sorry, but for me this is not a good solution. Could you tell me as they have solved this in version7?. It's as simple as documenting the logic that I use to create a strategy multitimeframe with different sessions for each BarsInProgress.

    Leave a comment:


  • NinjaTrader_Austin
    replied
    pequemec, what you seek will require you to code the entire indicator into your strategy and then wrap the time filters around it. This will most likely not be an easy task. You can use the ToTime() function to quickly verify if the time is during some period like this:
    Code:
    if (ToTime(Time[0]) >= 93000 && ToTime(Time[0]) <= 160000)
    {
        // the time is between 9:30am and 4pm
        // you can set your indicator logic to only run during this time period
    }

    Leave a comment:


  • pequemec
    replied
    Josh,

    What type of filter would be? The filter of the type:

    if (ToTime (Time [0]) <= 153000) return;

    remove plot lines but do not alter the value of the indicator.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    pequemec,

    Indicators always run on the full information displayed on the chart. If you only want it to use a subset you need to program a time filter into the indicator itself (not the strategy) to be able to allow the strategy to trade on the full hours. It may require more adjusting of indicator logic to accommodate not setting certain bars.

    Leave a comment:


  • pequemec
    replied
    Thanks for your reply.

    A time filter is not the solution because the problem is not to establish a time period for the trades, is to establish a time period for the indicators.

    Is it possible in NinjaTrader7?

    If this is possible please indicate the detailed logic.

    Best regards.

    Leave a comment:


  • NinjaTrader_Austin
    replied
    Hi there, unfortunately this isn't possible with NinjaTrader 6.5 unless you create some sort of time filter that only lets your strategy trade during certain time periods.

    Leave a comment:


  • Multi-time frame strategy with periods of different size

    Hi,

    I appreciate any help and I'll try to explain in English:

    I'm programming a multi-time frame strategy, in 15min bars, for the ES instrument in RTH. I apply a filter in 3min bars, to specify the entries, but I need to take several bars outside RTH. I can not change session begins and session ends in the main chart without modify the parameters of the indicators used and discredit the system. How can I incorporate these bars outside RTH in my strategy?

    Best regards.

Latest Posts

Collapse

Topics Statistics Last Post
Started by bowling, Today, 06:16 AM
1 response
10 views
0 likes
Last Post NinjaTrader_ShawnB  
Started by systemtrader4, Today, 01:54 AM
1 response
15 views
0 likes
Last Post NinjaTrader_ShawnB  
Started by Futurestrader00, Today, 01:54 AM
1 response
25 views
0 likes
Last Post NinjaTrader_ShawnB  
Started by timmbbo, Today, 01:40 AM
2 responses
10 views
0 likes
Last Post NT-Roland  
Started by BGWTEX, Yesterday, 07:20 PM
0 responses
7 views
0 likes
Last Post BGWTEX
by BGWTEX
 
Working...
X