Weekly Daily Time Frame Back Testing

Hi Everyone,

I am looking to model a trading system which uses a Weekly time frame to Enter and a Daily time frame to Exit.

Presently my system looks for a setup of certain conditions and if the next day’s price exceeds the previous Close a Buy occurs. The precursory part (i.e., the setup conditions) of the Buy script use appropriate Weekly Time Frame override. I assume that even though the Weekly Bar is not yet finished the trade pre-triggers even if the Weekly Bar is partly formed.

To force the Back Tester to only pre-trigger at the close of the Week I used the following as one of the pre-trigger conditions.


With an OFFSET of One Daily Bar the Close price of Friday should equate to WEEK() (which should be the same price).

However, I do not think my trick is working.

Is there another way to trick the Back Tester into only looking for Weekly Buys at the Friday close?

Cheer, Lester

Hi Lester,

You could try using the DAYOFWEEK() function, so adding ‘and DAYOFWEEK()==6’ will only trigger on Fridays.

Hi Darren,
Thank you very much. I knew there must be a way Optuma could handle this.

Cheer, Lester