Announcement

Collapse
No announcement yet.

New backtest

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

  • New backtest

    I am new to writing efs script and need some help.

    I am wanting to write a backtest for high of day breaks for the period between 9:42 to 11:15am Eastern

    With a .13 confirmation to enter

    A .50 stop loss from entry

    And a target of 1.25 over entry.

    Can someone help me or point me in the right direction.

    Thanks

    Adam

  • #2
    ATS

    have a look at this efs and see if it will do it is based on one of alexis efs, you can edit the times and entry / exit points in the edit studies you can also adjust the maximum trades per day with the "Trades_Per_Day" and there is a add Trailing stop switch in edit studies .

    have a look and see what you think.

    Attached Files

    Comment


    • #3
      Thanks and a little help

      I ran the backtest and it works, but I need to learn how to set some numbers. How do I set it where it closes my positions at the end of the day. All daytrades. And how do I get it to buy or sell everytime the stock makes a new high or low?

      I appreciate your help

      Adam

      Comment


      • #4
        ATS

        the defaults in the edit studies are pre set to close all trades at the end of the day, below are some screen shots of the edit studies and what they do,

        Start = The start time for the breakout
        End = The end time for the breakout
        Open Trade = the time you want to start trading the breakout
        Close Trade = the time you want to close open trades at the end of day.
        Margin = confirmation to enter ( this should be set in the tic intervals of the underlining or else the back test result will be invalid.
        StopLoss = Your stoploss from entry,
        PTLevel = Your profit target from entry
        Trailing_Stop = in case you want to use a trailing stop, Off means no trailing stop ,
        Trades_per_Day = the max number of trades you want the system to trade before it stops for the current day. if you want it to do unlimited trades set this to 100 ,








        The below image shows the Trades_per_Day set at 5

        Comment


        • #5
          ATS

          "And how do I get it to buy or sell every time the stock makes a new high or low?"

          i am not sure what you are after , the below formula is a Break Out strategy for a given time period , it sounds like you are trying to do a donchian breakout strategy which is completely different,

          Comment


          • #6
            Thanks

            You cleared up my current question. I am just learning EFS formulas, but things are coming together.

            I am trying to test high/low breakouts in the morning session only. I am playing with different time frames to avoid the first reversal.

            How can I get the backtest to place the trade indications on the chart?

            Thank you so much

            Adam

            Comment


            • #7
              Hello Adam,

              You could use drawTextRelative() or drawShapeRelative(). Place these calls within the same code block where you do your Strategy calls for doLong and doShort.
              Jason K.
              Project Manager
              eSignal - an Interactive Data company

              EFS KnowledgeBase
              JavaScript for EFS Video Series
              EFS Beginner Tutorial Series
              EFS Glossary
              Custom EFS Development Policy

              New User Orientation

              Comment

              Working...
              X