• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Whats wrong with my strategy? (Limit Orders)

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

    Whats wrong with my strategy? (Limit Orders)

    This is Long
    EnterLongLimit(DefaultQuantity, (GetCurrentBid(Default input) + (Buy_Limit * TickSize)) , "");
    This is Short
    EnterShortLimit(DefaultQuantity, (GetCurrentAsk(Default input) + (Sell_Limit * TickSize)) , "");

    The default number for Buy_Limit is -10
    The default number for Sell_Limit is 10

    I keep getting errors

    #2
    Hello rickyblah12,

    What are the errors that you are seeing?

    The only item I can see is that normally you would subtract the long value rather than using the negative value like this, but as long as that is calculating to a price lower than the close it should be able to work.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello rickyblah12,



      The only item I can see is that normally you would subtract the long value rather than using the negative value like this, but as long as that is calculating to a price lower than the close it should be able to work.
      what do you mean...can you show me how it would look so I can see

      Comment


        #4
        Hello rickyblah12,

        You would just use a negative symbol instead of a plus symbol to subtract the positive value, you are using a negative value which should accomplish the same task. I only noted that because it is different than what we usually see however if you are certain that is calculating a valid price it shouldn't matter.

        What errors are you getting? Without that detail we are just guessing at what may be wrong, the error should contain a specific reason and can let us know if it relates to the code you have shown.



        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello rickyblah12,

          You would just use a negative symbol instead of a plus symbol to subtract the positive value, you are using a negative value which should accomplish the same task. I only noted that because it is different than what we usually see however if you are certain that is calculating a valid price it shouldn't matter.
          how can i do that on the strategy builder?

          Comment


            #6
            these are the errors

            Comment


              #7
              Hello rickyblah12,

              Thank you for providing the error.

              When using the managed approach I would not expect an oco to be reused. Can you attach a sample strategy that demonstrates this happening so that I can review this? If you have logic which is generating an error about OCO I would want to collect the syntax and steps used to see that so we can understand why.

              If the strategy builder is what is generated the prices that would be fine you don't need to change anything but I would still want to see what you made to explore the error.

              I look forward to being of further assistance.
              JesseNinjaTrader Customer Service

              Comment


                #8
                I used the strategy builder...how can I stop this from happening then?

                Comment


                  #9
                  Hello rickyblah12,

                  I understand and I am trying to help, however I would still need a sample of the strategy to continue. Can you attach the strategy for review?

                  You can attach the strategy file from the folder Documents\NinjaTrader 8\bin\Custom\Strategies

                  Please let me know if I may be of additional assistance.

                  JesseNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by RandanAL, Today, 09:05 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post RandanAL  
                  Started by cstern71, 09-02-2019, 10:30 AM
                  4 responses
                  59 views
                  0 likes
                  Last Post Lancer
                  by Lancer
                   
                  Started by Hanstanz, Today, 04:44 AM
                  0 responses
                  10 views
                  0 likes
                  Last Post Hanstanz  
                  Started by juniortut, Today, 04:38 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post juniortut  
                  Started by rojiinko, Today, 03:58 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post rojiinko  
                  Working...
                  X