Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stoploss - double

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

    #16
    Bertrand, thanks again for your sample. Referring to the stops I want to ask why the stop1 doesn´t change referring to the variable.It moves one time but then doesn´t move anymore with the variable (=Donchian).

    .........
    else if (Position.MarketPosition == MarketPosition.Short)
    { if (GetCurrentBid(0) < Position.AvgPrice - 60 * TickSize && step1)

    { SetStopLoss("SG1", CalculationMode.Price, stop1, false);
    SetStopLoss("SG2", CalculationMode.Price, Position.AvgPrice, false);
    SetStopLoss("SG3", CalculationMode.Price, Position.AvgPrice, false);
    step1 = false; }

    if (GetCurrentBid(0) < Position.AvgPrice - 90 * TickSize && step1 == false)

    { //SetStopLoss("S1", CalculationMode.Price, stop1, false);
    SetStopLoss("SG2", CalculationMode.Price, stop2, false);
    SetStopLoss("SG3", CalculationMode.Price, stop3, false); }

    also with
    {SetStopLoss("S1", CalculationMode.Price, stop1, false);
    SetStopLoss("SG2", CalculationMode.Price, stop2, false);
    SetStopLoss("SG3", CalculationMode.Price, stop3, false); }

    stop1 is fixed at first stop and doesn´t move further. Why?

    Thanks
    Tony
    Last edited by tonynt; 07-29-2011, 07:15 AM. Reason: clearify

    Comment


      #17
      Tony, in the code you just posted, there is no code for a donchian stop. I would guess that your conditions for changing the stop simply aren't true. Please print out these variables to make sure they have the expected value, and then you can start moving the stops. Also, I would highly recommend you figuring this out with just one position (and stop) and then when that works 100% fine, you can add in the other positions and stops.
      AustinNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by rhyminkevin, Today, 04:58 PM
      3 responses
      47 views
      0 likes
      Last Post Anfedport  
      Started by iceman2018, Today, 05:07 PM
      0 responses
      5 views
      0 likes
      Last Post iceman2018  
      Started by lightsun47, Today, 03:51 PM
      0 responses
      7 views
      0 likes
      Last Post lightsun47  
      Started by 00nevest, Today, 02:27 PM
      1 response
      14 views
      0 likes
      Last Post 00nevest  
      Started by futtrader, 04-21-2024, 01:50 AM
      4 responses
      50 views
      0 likes
      Last Post futtrader  
      Working...
      X