Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculation Mode

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

    Calculation Mode

    Is there a way to set stops without using Calculation mode when using the wizard? I am not good enough with the programming side of things yet and I need to be able to set my stops to a price (actually a vaiable)that can be updated.

    #2
    Hello,

    Here is one way to do it. Let me know if you wanted something else.

    Go to your stop and targets section of your wizard and change the calculation to price as indicated in the screen shot. Then select the variable you want in the value field.
    Attached Files
    Last edited by NinjaTrader_Ben; 10-03-2008, 10:20 AM.
    DenNinjaTrader Customer Service

    Comment


      #3
      Still not working for me, although now I am sure it something I am doing wrong. Is there a way to output the current value of a variable so I can troubleshoot?

      Comment


        #4
        Hello,

        Yes, you can output by going to the Strategy Action section>Add>Misc>Print to output window.

        Open the output window by going to Tools>Output window.

        Now every time your strategy script is executed and your condition is met, it will output whatever message you have entered.
        DenNinjaTrader Customer Service

        Comment


          #5
          That appears to be only text though. What is the syntax to output a variable?

          Comment


            #6
            You will need to dive out of the Strategy Wizard and into the NinjaScript Editor to do this.

            Code:
            Print(variable.ToString());
            Remember that once the NinjaScript leaves the Strategy Wizard you cannot bring it back into it.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Well, I unlocked the code, made the change, tried to compile, and now I am getting an error "More than one protection modifier".

              Comment


                #8
                Stainless2000,

                Please attach your strategy and inform me as to which line in the code is the one causing the compile error. Thanks.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Actually, it no longer matters. I cannot use the wizard at all. I get that same error even when creating a new strategy that is blank.

                  I had to delete the strategy manually from the directory. Everything is fine now.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by bjgjkhjuhgtybg, Today, 04:38 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post bjgjkhjuhgtybg  
                  Started by varun12343, Today, 03:09 AM
                  1 response
                  8 views
                  0 likes
                  Last Post NinjaTrader_Marco  
                  Started by Lance El Camino, Yesterday, 04:14 PM
                  2 responses
                  24 views
                  0 likes
                  Last Post NT-Roland  
                  Started by MatthewLesko, Yesterday, 11:13 PM
                  1 response
                  14 views
                  0 likes
                  Last Post NT-Roland  
                  Started by kevinenergy, Today, 01:44 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post kevinenergy  
                  Working...
                  X