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

Creating a Simple Binary Indicator

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

    Creating a Simple Binary Indicator

    Hi I'm very new to NT, just downloaded it.

    Currently I am using Probuider of IG Markets (a programing language that very similar to BASIC). I have a custom binary indicator in Probuider.

    Can anyone help to convert it NT code?

    Thanks in advance!

    Below is the code:


    MA=Average[20](barrange)
    Cn=barrange<=1.62*MA[1]
    Count=summation[10](Cn)=10 OR summation[10](High>Low)<8

    IF Count=1 THEN
    Binary=0
    ELSIF Stochastic[5,3](close)>70 OR Stochastic[5,3](close)<30 THEN
    Binary=1
    ELSE
    Binary=Binary
    ENDIF

    RETURN Binary

    #2
    darvas,

    Hopefully a community member can help you.

    Should you have limited time or programming abilities, please consider the use of a NinjaScript consultant. Please find a link below.



    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Hi Adam,

      Thanks for the prompt reply.
      Will consider your suggestion to find a suitable consultant.

      One more question,
      In fact, I'd successfully created a simple custom indicator and compiled it without any error.

      The problem now is, I am unable to load this new indicator while opening a chart.
      This custom indicator didn't show in the indicator list.

      Please help.

      Thanks again.

      Comment


        #4
        darvas,

        Please follow the instructions below to see where the errors are coming from after compiling the indicator. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader compiles all indicators and strategies- not just one.
        • Open NinjaTrader
        • From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
        • Select an indicator and double click on it.
        • A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
        • At the bottom of the window a new section will appear where you can find the error locations.
        • From there you have the option to remove the indicator or debug it.

        If you are unsure as to what the error is indicating, please send me a screenshot of the error with the name and description fields clearly readable.

        To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Hi Adam,

          Compiling - NO error.

          The problem is,
          Now load a chart but I can't find this custom indicator in the list. So can't attach it in my chart.

          Comment


            #6
            darvas,

            Please navigate to My Documents / NinjaTrader 7 / bin / custom / indicator

            This is where indicators should be located. All indicators with an @ symbol before them are system indicators. Please try to find your indicator there. Its possible it no longer exists.

            Please let me know if you find it.
            Adam P.NinjaTrader Customer Service

            Comment


              #7
              Able to find it, pls see the attachment.
              The name of the indicator is CL1

              But I am unable to use it to attach into my chart.
              Attached Files

              Comment


                #8
                darvas,

                Could you post this indicator .cs file here? Alternatively you could send an email to support at ninjatrader dot com with ATTN : Adam in the message body and I can work with you over email instead.

                I look forward to helping you resolve your issue.
                Adam P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by andrewtrades, Today, 04:57 PM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by chbruno, Today, 04:10 PM
                0 responses
                3 views
                0 likes
                Last Post chbruno
                by chbruno
                 
                Started by josh18955, 03-25-2023, 11:16 AM
                6 responses
                436 views
                0 likes
                Last Post Delerium  
                Started by FAQtrader, Today, 03:35 PM
                0 responses
                6 views
                0 likes
                Last Post FAQtrader  
                Started by rocketman7, Today, 09:41 AM
                5 responses
                19 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X