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

Bar pattern recognition

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

    Bar pattern recognition

    I have experience developing with C# however I dont have any experience with Ninjascript. I would like to know what the best way to achieve the following code would be:

    Using volume/tick/unirenko bars:
    1. Price gets to within 5 ticks distance of a S/R level which I have defined on my chart.
    2. Shape of the candle has a wick of certain tick and body of certain size. (Pinbar type)
    3. When these two conditions are met, sound an audio alert with popup, and change the colour of the candle or something like that.

    I am happy to figure out ninjascript, or develop in C# on my own. Before re-inventing the wheel though, has something similar been done already?

    Many thanks.

    #2
    Originally posted by Grantx View Post
    I have experience developing with C# however I dont have any experience with Ninjascript. I would like to know what the best way to achieve the following code would be:

    Using volume/tick/unirenko bars:
    1. Price gets to within 5 ticks distance of a S/R level which I have defined on my chart.
    2. Shape of the candle has a wick of certain tick and body of certain size. (Pinbar type)
    3. When these two conditions are met, sound an audio alert with popup, and change the colour of the candle or something like that.

    I am happy to figure out ninjascript, or develop in C# on my own. Before re-inventing the wheel though, has something similar been done already?

    Many thanks.
    Grantx,

    Yes, there are several similar bar pattern indicators around (i.e. PinBar, InsideBar, etc.) that you can easily modify for you purpose. Just scroll through NT7 and NT8 indicators under downloads area.



    or just do a general search in Ninja Forum or download area.

    Cheers!

    Comment


      #3
      Excellent thank you so much for that download. I had a quick look at the code and I dont see any error handling. Is this normal or are errors caught and handled by ninjatrader?

      Comment


        #4
        Originally posted by Grantx View Post
        Excellent thank you so much for that download. I had a quick look at the code and I dont see any error handling. Is this normal or are errors caught and handled by ninjatrader?
        I have not looked at this indicator, but if there are errors your code will not compile in NinjaTrader. Usually, it will list your errors in a generic way with line numbers at the bottom that should not be hard to handle for someone experienced with C#.

        Comment


          #5
          Hello Grantx,

          I wanted to further mention that any run time errors are generally caught by a try and catch and will stop the script and log the error in the Log tab of the Control Center.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Thanks for clarifying Chelsea.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Christopher_R, Today, 12:29 AM
            0 responses
            9 views
            0 likes
            Last Post Christopher_R  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            166 responses
            2,235 views
            0 likes
            Last Post sidlercom80  
            Started by thread, Yesterday, 11:58 PM
            0 responses
            3 views
            0 likes
            Last Post thread
            by thread
             
            Started by jclose, Yesterday, 09:37 PM
            0 responses
            8 views
            0 likes
            Last Post jclose
            by jclose
             
            Started by WeyldFalcon, 08-07-2020, 06:13 AM
            10 responses
            1,415 views
            0 likes
            Last Post Traderontheroad  
            Working...
            X