I think you want to run in daily mode.  You have your entry/exits set 
to 1 bar delay.  That way when you run on the weekend, it will use 
data up through Friday and give you trades to enter on Monday.

If you are running in weekly timeframe, then a 1-bar delay would be a 
1-week delay, which I do not believe is what you want.

--- In [email protected], "tchan95014" <[EMAIL PROTECTED]> wrote:
>
> I am experimenting with a very simple rotation system as below.
> 
> My goal is to develop it into a weekly only system. I run it once a
> week, it runs on weekly data and does the stock rotation, if
> necessary, on a weekly basis at the most.
> 
> I expect the system to generate trades on the same day of the week,
> and not on other weekdays. For example, if I set it to run on 
weekend,
> any new trades are always executed on Monday (buys and sells) and 
not
> other weekdays.
> 
> It would be best to allow for trade executions on any weekdays, but
> Friday run, Monday execution is good enough.
> 
> However, when I started from the simplest one I can get, I got 
stumped.
> 
> With a simple system like this, comparing the results with
> TimeFrameSet( inWeekly ) ON or OFF, I got completely different
> results, as you can see I do not even use any of the OHLC series to
> rank the system.
> 
> Also the trades do not seem to be always executed on the same 
weekday
> at all, even with the settradedealy(), I was not able to explain 
it. 
> 
> I then ran the Explore to find the Rank and Rank1 gives completely
> different results when both TimeFrameXXXX are used at the same time.
> 
> Ultimately, if someone can provide a framework for a weekly only
> rotation system as I described above, very much appreciated.
> 
> Please help...
> 
> 
> Thanks
> 
> Thomas
> 
> //------------------------------------------------------------------
----------
> EnableRotationalTrading();
> SetTradeDelays( 1, 1, 1, 1 );
> 
> //------------------------------------------------------------------
----------
> SetOption("WorstRankHeld",           30);
> SetOption("MaxOpenPositions",        10);
> SetOption("Initialequity",           50000);
> SetOption("MinShares",               1);
> SetOption("CommissionMode",          1);         // % per trade
> SetOption("CommissionAmount",        0.5);       // 0.5% per trade 
to
> account for slippage
> SetOption("AllowPositionShrinking",  True);
> 
> //------------------------------------------------------------------
----------
> WeeklyClose = TimeFrameGetPrice("C", inWeekly, -1);   // Use only 
LAST
> week's data to test
> 
> Rank = Nz(ROC(WeeklyClose, 4));
> 
> 
> TimeFrameSet( inWeekly);              // <---- Add / remove causes 
hugh difference
> 
> Rank1 = Nz(ROC(C, 4));
> 
> //------------------------------------------------------------------
----------
> PositionSize = -10;
> PositionScore = 100 + Rank;
> 
> //
> --------------------------------------------------------------------
------------
> // Explore
> //
> --------------------------------------------------------------------
------------
> Filter = C > 0;
> 
> AddColumn(WeeklyClose, "Weekly Close", 1.4, colorBlack);
> AddColumn(Ref(WeeklyClose, -1), "Weekly Close(-1)", 1.4, 
colorBlack);
> AddColumn(Close, "Close", 1.4, colorBlack);
> AddColumn(Ref(Close, -1), "Close(-1)", 1.4, colorBlack);
> AddColumn(Rank, "Rank", 1.4, IIf(Rank > 0, colorBlack, colorRed));
> AddColumn(Rank1, "Rank1", 1.4, IIf(Rank > 0, colorBlack, colorRed));
>


Reply via email to