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

No stratergy alert panel? Than --> Strategy to indicator error

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

    No stratergy alert panel? Than --> Strategy to indicator error

    Hi,

    I'm running into a problem
    First I made a strategy called TEST which shows arrows and gives an alert message + sends an e-mail. The strategy works.
    Now i want to apply the strategy to several underlying stocks and place them in the market analyser which I Cannot do because it only accepts Indicators and no strategy's.

    When i want to create a new indicator and copy the code from the strategy into it i encounter the problems.
    first. when i saved the script and open a new chart, i cannot find the indicator anywhere in the indicator panel. Why does it not find the indicator that i made, did i named it wrong or copied the script wrongly?
    Second Is there a possibility to place a strategy in the market analyser, OR is there an other panel or easy overviews were i can get all the signals and messages in one overview?

    Regards,

    Bas

    #2
    There will be some additional modifications that need to be made when converting a strategy to an indicator.

    The market analyzer will display Plot values. I see you are using arrows to generate signals. With the indicator version you would need to set a plot value that would indicate your signal state.

    For example you might choose to have an Up arrow be represented with a 1, a down arrow represented by a -1 and no arrow as 0.

    Begin by going to tools -> new NinjaScript -> Indicator -> after unlocking the script you can then paste in logic snippets from your strategy. Do not copy the entire file over but instead focus on OnBarUpdate() logic.

    Then you will want to remove any sort of order logic from the script so that it can compile as an indicator.

    For learning Indicator creation: http://www.ninjatrader.com/support/h...indicators.htm

    Let me know if I can further assist.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Hi Lance,

      Unfortunately I did not succeed.
      What I did was the following:
      Tools --> edit Ninjascript (open my strategy with the code) --> copied the code that I wanted
      Than I selected Tools --> New Ninjascript --> Indicator --> Next and type in the name that I want to call my indicator --> Generate --> Paste the code as can be seen in the attached Image to this post --> Hit save.
      Reload a new chart -->select indicator which is no were to be found in the drop-down list. But it can be seen if I go to Tools --> Edit Ninjascript (than i see the file)
      Attached Files

      Comment


        #4
        When you say you saved the script did you press the compile button? Right click chart -> Compile
        There will be a chime sound that plays if there are no errors.

        After doing this does it show in your indicator list?
        LanceNinjaTrader Customer Service

        Comment


          #5
          Hi Lance,

          Now I tried to compile it because I did not do it last time.
          Still there is one error message that I could not resolve by my self as can be seen in the image
          Translation:
          The Namespace NinjaTrader.Stratergy Already contains a definition for BasADX (which is a stratergy I made for the ADX indicator)

          Regards,

          Bas
          Attached Files

          Comment


            #6
            Hello Inter20,

            Thank you for your response.

            I would like to schedule a remote session with you to look into this matter on your PC. Please send a note to support[at]ninjatrader[dot]com with 'ATTN: Patrick - 992133' in the subject line and the ID and Password from the NinjaTrader Remote Support application after running the application on your PC: http://www.ninjatrader.com/remotesupport

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Brevo, Today, 01:45 AM
            0 responses
            6 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            3 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            242 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            384 views
            1 like
            Last Post Gavini
            by Gavini
             
            Started by oviejo, Today, 12:28 AM
            0 responses
            6 views
            0 likes
            Last Post oviejo
            by oviejo
             
            Working...
            X