Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetStopLoss

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

    SetStopLoss

    Hi

    is there a simple wait to say "set a stop loss 2 ticks below the low[0]"

    i'm trying the setstoploss action but this is only a calculationmode tick, price or currency

    if i use exitlongstop it is cancel at the end of the bar and i need to use the live until cancelled with the iorder and the canceloder(), so complicated for me...

    why it is not possible to say SetStopLoss("buy", StopLoss, true)
    with:
    "buy" to tie to the entrylong order
    private int StopLoss=Low[0]-1*TickSize;
    true for the simulated

    if i write this script it is not working... and it would be easier...

    Thomas

    #2
    Originally posted by Thomas79 View Post
    Hi

    is there a simple wait to say "set a stop loss 2 ticks below the low[0]"

    i'm trying the setstoploss action but this is only a calculationmode tick, price or currency

    if i use exitlongstop it is cancel at the end of the bar and i need to use the live until cancelled with the iorder and the canceloder(), so complicated for me...

    why it is not possible to say SetStopLoss("buy", StopLoss, true)
    with:
    "buy" to tie to the entrylong order
    private int StopLoss=Low[0]-1*TickSize;
    true for the simulated

    if i write this script it is not working... and it would be easier...

    Thomas
    Code:
    SetStopLoss("strSignalName", CalculationMode.Price, Low[0] - 2 * TickSize, true);

    Comment


      #3
      Thx a lot Koganam... it is working now !

      but just a question,

      what is the difference between setstoploss and exitlongstoplimit ?

      Thomas

      Comment


        #4
        Originally posted by Thomas79 View Post
        Thx a lot Koganam... it is working now !

        but just a question,

        what is the difference between setstoploss and exitlongstoplimit ?

        Thomas
        • SetStopLoss() is submitted as a market order.
        • SetStopLoss() price value is inherited. That is why it must be reset when the position goes flat.
        • ExitStopLongLimit() is submitted against a filled existing position; SetStopLoss() is set up before the order to enter a position.

        Those are the major differences that I can think of. There a probably a few others.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X