Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to submit Stop-Limit Order

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

    How to submit Stop-Limit Order

    I would like to submit a Stop-Limit order after clicking a custom button on the chart, if the following condition(see below) is true . Submitting orders in strategies is fairly straight forward; however, I'm trying to do this with an Indicator. I've seen a few indicators that can do this. I'm a newbie with NinjaScript.


    1. Button is clicked

    2. After button is clicked check if the following condition is True. Submit Stop-Limit order if condition is True.

    if ((High[2] > High[0])
    && (High[2] > High[1])
    && (High[2] > High[3])
    && (High[2] > High[4])

    )

    {

    Enter Code to submit Stop-Limit Order
    }

    I also need tutorial or sample code that adds button to chart. Any assistance i can get will be greatly appreciated.

    Thanks.
    Last edited by cryfgg; 08-05-2024, 09:36 AM.

    #2
    Hello cryfgg,

    Thank you for your post.

    We have an existing sample script that demonstrates submitting orders via a button click.

    The sample script can be downloaded at the link below, the .zip file contains both an indicator version and a strategy version:



    Please let us know if you have any further questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    51 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X