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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    597 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    343 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    556 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    555 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X