Announcement

Collapse
No announcement yet.

Entry/Exit on Same Bar

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

  • Entry/Exit on Same Bar

    I have built a strategy for a very fast scalping system on the Russell Emini Contract that sometimes requires testing on each tick to see if the price has met entry conditions and then if "isInTrade == true" to exit if a stop or target price is hit on the same bar. My backtesting seems to show that my code is only doing the tests once per bar. This means a lot of false trades where the high() and low() meet or exceed my entry/exit prices but when the actual price action would not have hit those targets once the condition was met. I have setComputeOnClose() set to false in my code and in the global options. I am using LIMIT and STOP orders for my filltypes. Is it possible to have the conditions tested for entry/exit on each tick even though I am using a 1 minute interval chart?

    Paul

  • #2
    Paul

    Is it possible to have the conditions tested for entry/exit on each tick even though I am using a 1 minute interval chart?
    That is not possible. In back testing only completed bars are analyzed. By default, back testing formulas only have access to the values of the various indicators and OHLC prices at the close of the bar.
    Alex

    Comment


    • #3
      Thanks Alex, That explains alot. I suppose I could go to a 1 tick bar chart and backtest that. Thank goodness EFS2 allows for calculation functions to operate on other than the current chart. That way I should be able to keep my entry/exit rules based on the 1 minute chart while I analyze each tick for entry and exit.

      Paul

      Comment


      • #4
        Paul
        You should be able to do that by calculating your functions on external intervals
        Alex

        Comment


        • #5
          pmonty,

          That's an excellent solution. Thanks!

          It should be in the backtesting documentation. I'm sure there are quite a few who trade the futures intraday who are concerned more with making entry/exit trading decisions based on signals not related to bar closings, especially those of us who are trading them with T and V charts.

          Comment


          • #6
            Originally posted by pmonty
            Thanks Alex, That explains alot. I suppose I could go to a 1 tick bar chart and backtest that. Thank goodness EFS2 allows for calculation functions to operate on other than the current chart. That way I should be able to keep my entry/exit rules based on the 1 minute chart while I analyze each tick for entry and exit.

            Paul
            I would love to see a template or skeleton of the code.

            I understand if you don't want to share the exact triggers.

            I am just interested in the implementation.

            THANKING YOU IN ADVANCE.

            Comment

            Working...
            X