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 jaybedreamin, Today, 05:56 PM
0 responses
3 views
0 likes
Last Post jaybedreamin  
Started by DJ888, 04-16-2024, 06:09 PM
6 responses
18 views
0 likes
Last Post DJ888
by DJ888
 
Started by Jon17, Today, 04:33 PM
0 responses
1 view
0 likes
Last Post Jon17
by Jon17
 
Started by Javierw.ok, Today, 04:12 PM
0 responses
6 views
0 likes
Last Post Javierw.ok  
Started by timmbbo, Today, 08:59 AM
2 responses
10 views
0 likes
Last Post bltdavid  
Working...
X