Announcement

Collapse
No announcement yet.

Entry and Exit points in backtesting

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

  • Entry and Exit points in backtesting

    Is there a way to use a previous bars open/high/low/close as an entry/exit point? If so I would appreciate any information on this Thanks.

  • #2
    athl
    You could try Strategy.LIMIT, Stratgey.THISBAR and as limit price set close(-1) (or high(-1) etc). You may need to put some additional checks to make sure the current bar actually touched that price.
    Alex

    Comment


    • #3
      athl
      Another way of doing it would be to create a 1 period MA of the value you want (Open, High, etc) and then displace that MA forward by 1 period thereby returning the prior bar's value on the current bar. In this case the entry price would still be Strategy.LIMIT, Strategy.THISBAR but the entry price would be that of the current value of the MA.
      This solution may actually allow for an easier check if that value is valid because all you need to do is verify that the MA is < High and > than Low.
      Alex

      Comment


      • #4
        Re: Reply to post 'Entry and Exit points in backtesting'

        Thank you, obviously I am a new user. I try that and see what results.

        ----- Original Message -----
        From: [email protected]
        Date: Wednesday, January 21, 2004 11:33 am
        Subject: Reply to post 'Entry and Exit points in backtesting'

        > Hello athl,
        >
        > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        >

        Comment

        Working...
        X