Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limit as input

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

    Limit as input

    I'm running a strategy now with the basic market entry, I'm wondering if its possible to have a input option to change the order from market to limit? and if so would it be possible to have an input entry for number of ticks off the limit example input limit, input 5 ticks. so if my strategy was entering long it would put an order out to be buying at $11.45 if the bid was $11.50
    Thanks

    #2
    pistolpete,

    You could create a bool parameter and then code two branches for your code.

    Code:
    if (someBool == true)
    {
         EnterLongLimit(...);
    }
    else if (someBool == false)
    {
         EnterLong();
    }
    Same applies for your tick offset. You would just create an int parameter to do that.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I want it as input not just in the code.
      Is it possible to have input limit - yes/no?

      Comment


        #4
        pistolpete,

        You make the parameter as a user input and then you use it in your code. Please see the SMA indicator for an example of how to make an int input. Making a bool one is done exactly the same way, but just as a bool instead of an int.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        648 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        574 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X