Announcement

Collapse
No announcement yet.

Create Backtesting study

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

  • Create Backtesting study

    The last time I tried to create a back testing study I really messed it up and Alex came to my rescue.

    I'd like some help in creating another one and hopefully it won't be too difficult.

    Attached is a CCI study that I'd like to base it upon.

    Simply put (is thats possible) when the CCI is above the 0 line I want to be long and when its below the 0 line I want to be short.

    All this is based upon the close of the bar and always in the market (during trading hours).

    Also, if possible I'd like to have a start time (entry) and ending time (exit).

    If you load the CCI study onto a 125 tic charts you will see what I am trying to do.

    Thanks.

    Bruce
    Attached Files

  • #2
    Bruce
    The attached efs should do what you asked.
    It will trade between hours set by the user through Edit Studies (defaults are 930-1600). If Long or Short it will paint the bars in lime or red and at the End hour it will close the trade.
    in the sample image below it is loaded on a 24hr ES H4 3 minute chart and set to trade only between 1000 and 1500 hours.
    Alex

    Attached Files

    Comment


    • #3
      It worked perfectly on ES.

      I'm mostly trading the Bund (GB) and its starts at 2300 and ends at 0945.

      I can't seem to figure out the start time...I tried 2300 but no good.

      The closest I can get it is 0005.

      Any suggestions.

      Bruce

      Comment


      • #4
        Bruce
        It is possible that with the midnight overlap you may need to adjust the formula. Also make sure that there is at least one bar after the End time otherwise the strategy will not close the trades at the end of the day.
        Alex

        Comment

        Working...
        X