Announcement

Collapse
No announcement yet.

BtMovingAverage efs

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

  • BtMovingAverage efs

    Hi,
    what's wrong with the BtMovingAverage EFS in the BackTesting folder that it doesn't take gaps?

    I've rewritten the code with
    PHP Code:
    Strategy.doShort("Crossing Down"Strategy.LIMITStrategy.THISBAR,null,v-v%0.5); 
    instead of
    PHP Code:
    Strategy.doShort("Crossing Down"Strategy.MARKETStrategy.THISBAR); 
    (same for doLong)

    Anybody has a solution?

    Linus

  • #2
    Linus
    You may want to post the code.
    Alex

    Comment


    • #3
      Linus
      Did you try and plot the Limit price to see if it is actually hit?
      Alex

      Comment


      • #4
        I handle this differently...

        I check for the gaps in the attempted LIMIT orders and fill the price differently...

        For example, if the price gaps below my expected entry price, I fill the order at the OPEN of the bar. Otherwise, I fill it at the expected LIMIT price.

        Brad
        Brad Matheny
        eSignal Solution Provider since 2000

        Comment


        • #5
          Linus
          Here is an example of the efs not triggering a Buy because Limit price is not touched
          Alex

          Comment


          • #6
            Linus
            The workaround is what Brad suggested earlier ie to check if the Open is not above/below your Limit. At that point you need to decide if you simply SAR at the Open or close the trade at the Open and reinstate a position if the Limit is touched.
            Alex

            Comment

            Working...
            X