Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

jjeffm

Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by jjeffm


  1. On 6/5/2008 at 2:43 PM, swansjr said:

    I'm no expert, but your exit strategy in EasyLanguage for TS might go somethting like this:

     

     

     

    Input:

     

    InitalStopValue(20);

     

     

     

    Variables:

     

    MyStop(0),

     

    Target1(false),

     

    Target2(false),

     

    Target3(false);

     

     

     

    // Place Your Buy Condition Here

     

     

     

    { Entry Code }

     

     

     

     

     

    // Exit strategy for long trades

     

     

     

    If (MarketPosition = 1 ) Then

     

    Begin

     

     

     

    If ( OpenpositionProfit < 25 ) Then

     

    MyStop = InitalStopValue;

     

     

     

    If ( OpenPositionProfit >= 25 ) And ( Target1 = false ) Then

     

    Begin

     

    MyStop = EntryPrice;

     

    Target1 = true;

     

    End;

     

     

     

    If ( OpenPositionProfit >= 40 ) And ( Target2 = false ) Then

     

    Begin

     

    MyStop = EntryPrice + 5;

     

    Target2 = true;

     

    End;

     

     

     

    If ( OpenPositionProfit >= 50 ) And ( Target3 = false ) Then

     

    Begin

     

    MyStop = EntryPrice + 8;

     

    Target3 = true;

     

    End;

     

     

     

    If ( OpenPositionProfit >= 75 ) Then

     

    Begin

     

    Sell("20pt Target") next bar at EntryPrice+20 limit;

     

    MyStop = EntryPrice + 10;

     

    End;

     

     

     

     

     

    // Sell on MyStop

     

     

     

    Sell("Stop") next bar at MyStop stop;

     

     

     

    End;

     

     

     

    // Reset target flags once position is closed

     

     

     

    If ( MarketPosition = 0 ) Then

     

    Begin

     

    Target1 = false;

     

    Target2 = false;

     

    Target3 = false;

     

    End;

     

    Is there a way to add an order line to the stops for a visual reference?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.