[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Timed frame



PureBytes Links

Trading Reference Links

Hi Steph,

>About backtest and timed frame 
>you're right: there will be no "bug" if the begin of the data loaded 
>is always the same. 
>BUT if you test your system always with the last 300 bars, the 
>beginning of the data will be different and --------> "bug"
This is not true. Cum(1) gives the same result regardless of your
scan range.

>it is the reason why I ask for a stable time frame based on weekly 
>data from monday to wednesday where the close is the last close, the 
>high is the highest, the open the first open and the low the lowest.
>
>the
>weekbeg = dayofweek() < ref( dayofweek(), -1 );
>gives "1" but.... on monday 

If you want Friday (or last trading day in a week) try this:
weekbeg = dayofweek() < ref( dayofweek(), -1 );
weekend = ref( weekbeg, 1 );


Best regards,
Tomasz Janeczko
amibroker.com