Announcement

Collapse
No announcement yet.

Backtesting Settings Suggestions

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

  • Backtesting Settings Suggestions

    Right now Backtesting only providesfor closing out trades "at the end of backtesting." So, regardless of the number of time intervals, let's say 5 days, in thebacktest, it will only close out trades at the end of day 5, not at the end of each day of the 5 days. I am a day trader, and never carry positions over night. So, I don not want my backtests to caryy positions over night, which results in the backtest accruing all the "windfall" gains/losses which result from overnoght "Gaps." I presently have to run the 5 day study, print out all the trades, and then go in and manually subtract out each and every positionopened on one day, and closed on another day, to get a true "day trader's" system simulation. You already have a ssettings checkbox on the Backtesting popup window for "close trades at end of backtest." Pleasse add another option to:"CLose trades at end of every day (or user specified interval). This would eliminate the manual hand calculator work (GASP!!--in the computer age) now required.
    thx. Tilmon

  • #2
    Hello Tilmon,

    To request new features and enhancements please submit them in eSignal through the Customer Support-->Make a Suggestion form. You can also send them directly to [email protected].

    In the mean time you can add some code to your back testing formulas that checks for the end of the day using the day() function.

    PHP Code:
    function main() {
        ....  
    // your code

        
    ....
        
    // for back testing only
        
    if (day(0) != day(1)) {
            if (
    Strategy.isLong()) Strategy.doSell("End of Day"Strategy.CLOSEStrategy.THISBAR);
            if (
    Strategy.isShort()) Strategy.doCover("End of Day"Strategy.CLOSEStrategy.THISBAR);
        }

        return;

    This detects the last bar of the day and exits the current position. You can also use a similar process to exit at a specific time of the day using the other time functions, hour(), minute() and second() instead of day().


    Originally posted by tilmon
    Right now Backtesting only providesfor closing out trades "at the end of backtesting." So, regardless of the number of time intervals, let's say 5 days, in thebacktest, it will only close out trades at the end of day 5, not at the end of each day of the 5 days. I am a day trader, and never carry positions over night. So, I don not want my backtests to caryy positions over night, which results in the backtest accruing all the "windfall" gains/losses which result from overnoght "Gaps." I presently have to run the 5 day study, print out all the trades, and then go in and manually subtract out each and every positionopened on one day, and closed on another day, to get a true "day trader's" system simulation. You already have a ssettings checkbox on the Backtesting popup window for "close trades at end of backtest." Pleasse add another option to:"CLose trades at end of every day (or user specified interval). This would eliminate the manual hand calculator work (GASP!!--in the computer age) now required.
    thx. Tilmon
    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