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