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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        169 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        327 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        252 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        353 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        181 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X