Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

adding new time frame to strategy

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

  • NinjaTrader_Joydeep
    replied
    Hello jordis,
    To assist you further can you please send a toy NinjaScript code* replicating the behavior to support[AT]ninjatrader[DOT]com

    Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

    I look forward to assisting you further.

    *The "toy" just means something that is a stripped down version that isn't necessarily the whole logic. It makes things easier to rout out.

    Leave a comment:


  • jordis
    replied
    hi,

    the output window shows no errors or any messages at all

    i checked the output window both while compiling and while backtesting the strategy.


    no messages in output window, no messages in log



    thanks for your help

    Leave a comment:


  • NinjaTrader_Joydeep
    replied
    Hello jordis,
    Welcome to the forum and I am happy to assist you.

    If you open the output window (tools>output window) and then test the strategy then are you getting any error messages in the output window.

    I look forward to assisting you further.

    Leave a comment:


  • jordis
    started a topic adding new time frame to strategy

    adding new time frame to strategy

    Problem:
    I'm trying to reference multiple time frames in a strategy. What I would like to do is trade in a 5 minute time frame, but I would like to check a daily time frame to see if a condition is met by an indicator, and if so I want to cease trading (ie. if the market is doing something that has proven to make my 5 minute strategy ineffective, I would like to stop trading until normalcy returns).

    My issue is that my code stops running the instant I add the line for the new period

    Code:
      protected override void Initialize() 
      { 
    Add(PeriodType.Day, 1);
     }
    Without this line, the strategy runs, but as soon as this is added it stops working. I have not even tried to call this later in the code yet. All I've tried to do is add this line of code to the initialization and it still kills my script. I have tried changing the period to minute, day, etc and it makes no difference.

    Synopsis:
    I am running back tests off of imported data. The strategy will run in both 5 minute or daily time frame separately just fine. As soon as code is added for new time period it all stops working.

    Can someone give me any idea what I might be missing that is causing this to kill my script?

    Thanks in advance

Latest Posts

Collapse

Topics Statistics Last Post
Started by derivtrader, Today, 12:04 PM
0 responses
1 view
0 likes
Last Post derivtrader  
Started by samy3448, Today, 10:55 AM
2 responses
8 views
0 likes
Last Post NinjaTrader_ChrisL  
Started by rickyblah12, Yesterday, 01:33 PM
3 responses
20 views
0 likes
Last Post NinjaTrader_BrandonH  
Started by jeliner, Today, 08:51 AM
1 response
45 views
0 likes
Last Post NinjaTrader_PatrickG  
Started by dastaan, Today, 06:24 AM
4 responses
27 views
0 likes
Last Post NinjaTrader_Kate  
Working...
X