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

Alarm indicator

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

    Alarm indicator

    Hello everyone.
    I have been tearing my hair our attempting to work out a sounding alarm to activate when two indicators cross at the same time or within a nominated + or - difference.
    The two individual indicators are the DM, and the Z20090712Laguerre ECO.
    Is there someone out in the community that would be willing to take up what is for me a painful challenge, but is probably a really simple task for the person who knows how to do it?
    Please help me save what little hair I have left. Really appreciate any help.
    Thanks from Australia.

    #2
    CrossAbove and CrossBelow

    Hi,

    You could use CrossAbove and CrossBelow methods to check if the indcators cross a reference level and Alert or PlaySound to produce the sounding alarm.

    Example

    if (CrossBelow(DM(14),referenceLevel1,allowedInterval ) && CrossBelow(SMA(14),referenceLevel2,allowedInterval ))
    {
    PlaySound(@"C:\mySound.wav");

    }

    You should change SMA for Laguerre indicator (I don´t have it) and you need a sound record to play.

    CrossAbove is the same.

    I hope it helps

    Comment


      #3
      Thank you very much. I will give it a go.
      Appreciate your input.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      27 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 02-22-2024, 01:11 AM
      5 responses
      32 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 04-23-2024, 09:53 PM
      2 responses
      49 views
      0 likes
      Last Post wzgy0920  
      Started by Kensonprib, 04-28-2021, 10:11 AM
      5 responses
      193 views
      0 likes
      Last Post Hasadafa  
      Started by GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,235 views
      0 likes
      Last Post xiinteractive  
      Working...
      X