Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Stumped.. Debug Suggestions?

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

    Stumped.. Debug Suggestions?

    This code block works if compiled v6.5 run in v6.5.

    Written as a new indicator, and compiled in v7 run in v7, only the else line works....

    the crossover lines never execute.

    trigger and trend are DataSeries that hold the values i have computed and set into the plots.

    if (CrossAbove(trigger, trend,1))
    {
    PlaySound(
    @"C:\Program Files\NinjaTrader 7\sounds\Attention_Cross.wav");
    }
    elseif (CrossBelow(trigger, trend,1))
    {
    PlaySound(
    @"C:\Program Files\NinjaTrader 7\sounds\Attention_Cross.wav");
    }
    else
    {
    PlaySound(
    @"C:\Program Files\NinjaTrader 7\sounds\A_Bar_Has_Closed.wav");
    }

    Any suggestions?

    #2
    If I change Attention_Cross.wav to Alert1.wav it works.

    I have checked spelling, location etc.... there is no reason I can see that it won't play.

    Is there a maximum file size that can be used here?

    Alert1 is 146KB

    Attention_Cross is 845KB... its longer so it will wake me up. It runs 27 seconds.

    Any ideas?

    Comment


      #3
      Hello Crassius,

      Check the log tab of control center when you run the indicator. If there are any issues playing a particular sound file, it should be noted here.
      Ryan M.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Austiner87, Today, 05:02 PM
      0 responses
      3 views
      0 likes
      Last Post Austiner87  
      Started by tonynt, 05-21-2019, 06:27 AM
      10 responses
      530 views
      1 like
      Last Post fiendtrades  
      Started by awwenzovs, Today, 08:03 AM
      2 responses
      14 views
      0 likes
      Last Post NinjaTrader_Eduardo  
      Started by Ashkam, 04-29-2024, 09:28 AM
      4 responses
      44 views
      0 likes
      Last Post Ashkam
      by Ashkam
       
      Started by nightstalker, Yesterday, 02:05 PM
      1 response
      30 views
      0 likes
      Last Post NinjaTrader_Eduardo  
      Working...
      X