Multiple timeframe query

#1
I am trying to experiment with a multiple time frame trading system which
1)buys End of day on positive daily close . 2) Sells next day intraday at 9.30 ( to be optimized later)

following code gives only 1 trade on backtest
---------------------------------

TimeFrameSet( inDaily );
Buy=ROC(C,1)>0;
TimeFrameRestore();

Sell= TimeNum() == 093000 ;

--------------------------------

database has intraday data of 1 min
setting>periodicity = 1 min

Any clues.
 

trash

Well-Known Member
#2
Code:
SetOption( "AllowSameBarExit", False );

TimeFrameSet( inDaily );
Buycond = ROC( C, 1 ) > 0;
TimeFrameRestore();
Buycond = TimeFrameExpand( buycond, inDaily, expandPoint );

Buy = buycond;
Sell= TimeNum() >= 093000;
 
Last edited:
#4
afl needed for following condition.time frame 1 min intraday.

1.high and low between 9.15 to 9.45 to be recorded.

2. high and low of each half an hour is to be recorded.

3. buy when previous halfanhour high is crossed by current price.

4. sell when previous halfanhour loe is crossed by current price.
 

Similar threads