Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

if i am in a "long" position and a short signal is activated

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

    #16
    Bertrand,

    How can I use your recommendation if I am going from long straight to short? I suppose to code just "EnterShort();" right? That was your initial recommendation. So, should I use the code that I wrote this morning and include the sample as per your post?

    If not, where would I place

    // Resets the stop loss to the original value when all positions are closed
    if (Position.MarketPosition == MarketPosition.Flat)
    {
    SetStopLoss(CalculationMode.Ticks, stoplossticks);
    }

    Technically speaking I am only momentarily flat but that is suppose to be beyond the human eye and beyond the code if I were using just "EnterShort();"

    Kay Wai
    Last edited by kaywai; 05-27-2011, 08:06 AM. Reason: Replied without thinking!

    Comment


      #17
      Hi Bertrand,

      Did you miss my reply below?

      Regards

      Kay Wai

      Comment


        #18
        Sorry Kay, didnt't see it since you edited the post after I closed the ticket down - there's a very brief flat state still in a reversal strategy, so the code snippet for the reset would trigger still, just keep it for example on top of OnBarUpdate().

        Comment


          #19
          got it. Thanks Bertrand!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          649 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          370 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          573 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          576 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X