Announcement

Collapse
No announcement yet.

Stop Loss + Trailing Stop Loss Efs

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

  • Stop Loss + Trailing Stop Loss Efs

    Hi guys.
    I've recently started on the 1m ES contract. Its too fast for me to put stop losses in.

    Basically i've tried to look for an EFS to auto stop loss upon entry and then some how have a trailing stop loss too. Im sure someone has already made one. Im also not a programmer so I cant possibly write this myself, unfortunately.

    Im using the esignal paper trading function and would also like it to work with this, as well as when I go with a broker.

    Any help would be appreciated.

    G

  • #2
    I don't think I understand?? You want a STOP and TRAILING STOP LOSS feature built into EFS for when you are in a trade?

    EFS has trouble knowing you are in a trade from real brokers unless you use utility applications to handle this type of interaction.

    You could build a stop loss/trailing system to run when you are in a trade. But being in the trade, getting into the trade and how the efs identifies you are in a trade are different things.

    I guess my question is "how exactly do you intend to use this EFS"???
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Hi. Sorry for the lat reply.

      Ok so I'll try explaining it a little better.

      Every time I get into a trade (Short or long) I would like my stop loss to be set at 1.5 points away from my entry position (Basically with every entry there is an auto stop loss order 1.5 points away). Now while I'm in the trade I would like a stop at 4 points, then raised to 5 points etc - ie a trailing stop loss - under the assumption the move is in my favour!

      So basically everytime I enter a trade I risk 1.5 points. And then I raise this initial stop loss to 4 points, then 5 points, etc...

      ATM I am using the esignal paper trade utility. If Im unable to use the efs with my broker I guess I really should be practising now on the paper trade to manually set it up. What you think?

      Anyway, I was hoping someone has already written something similar.

      Thanks very much for your reply. Your opinion will be appreciated!

      Comment


      • #4
        Let me address your needs separately..

        Your stop...

        You want a 1.5 pt stop initially on all entry orders - right?
        You then want the stop to move to 4+ pts as a trailing stop - right?

        what action changes the stop from a fixed 1.5 pts to a trailing stop?? is it a objective target or some other mechanism?

        All of this can be developed in EFS. It's easy once I understand what you want (well, sometimes it's easy).

        Your Broker and your EFS..

        You can connect your efs to a number of brokers right now with third party applications. These applications allow you to build out your efs files to handle very complex order placement and management features.

        General Help.

        I have to completely understand exactly what you want to be able to assist you. I have included a simple example below.


        PHP Code:

        var nStopPrice null;
        var 
        nEntryPrice null;

        var 
        StrategyisLong false;
        var 
        StrategyisShort false;

        var 
        StopLevel1target 6.0;
        var 
        StopLevel2target 12.0;

        var 
        StopStage 0;
        var 
        StopOffset 0;

        function 
        main() {

        //  Entry Triggers
          
        if ((buy_signal) && (!StrategyisLong))  {
            
        nEntryPrice close();
            
        StopOffset 1.5;
            
        nStopPrice nEntryPrice StopOffset ;
            
        StrategyisLong true;
            
        StrategyisShort false;
            
        StopStage 0;
          }
          if ((
        sell_signal) && (!StrategyisShort))  {
            
        nEntryPrice close();
            
        StopOffset 1.5;
            
        nStopPrice nEntryPrice StopOffset ;
            
        StrategyisLong false;
            
        StrategyisShort true;
            
        StopStage 0;
          }

        // Stop Adjustment Code
          
        if (StrategyisLong) {
             if ( (
        close() >= (nEntryPrice+StopLevel1target )) &&
                  (
        StopStage == 0) ) {
                  
        //  Stage 1 Stop Level
                      
        StopOffset 4.0;
                      
        StopStage 1;
             }
             if ( (
        close() >= (nEntryPrice+StopLevel2target )) &&
                  (
        StopStage == 1) ) {
                  
        //  Stage 2 Stop Level
                      
        StopOffset 6.0;
                      
        StopStage 2;
             }

             if ((
        close()-StopOffset ) >= nStopPrice) ) {
        //       Adjust trailing stop if needed
                    
        nStopPrice = ((close()-StopOffset );
              }
          }  
        //  end if long

          
        if (StrategyisShort) {
             if ( (
        close() <= (nEntryPrice-StopLevel1target )) &&
                  (
        StopStage == 0) ) {
                  
        //  Stage 1 Stop Level
                      
        StopOffset 4.0;
                      
        StopStage 1;
             }
             if ( (
        close() <= (nEntryPrice-StopLevel2target )) &&
                  (
        StopStage == 1) ) {
                  
        //  Stage 2 Stop Level
                      
        StopOffset 6.0;
                      
        StopStage 2;
             }

             if ((
        close()+StopOffset ) <= nStopPrice) ) {
        //       Adjust trailing stop if needed
                    
        nStopPrice = ((close()+StopOffset );
              }
          }  
        //  end if short


        //  Stop Exit Code
              
        if ( (StrategyisLong) && (close() < nStopPrice) {
                 ..  
        get out of long trade on stop exit
              }
              if ( (
        StrategyisShort) && (close() > nStopPrice) {
                 ..  
        get out of short trade on stop exit
              }



        Brad Matheny
        eSignal Solution Provider since 2000

        Comment

        Working...
        X