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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    35 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    12 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    18 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X