I continue to investigate concerning the way to be flat at the end of the day.
If I run the MACD system on a one minute chart, the flat position appends at 19:59, as scheduled. If I run the system on a fifteen minute chart, I have no flat position on the last bar of the day. It was working with the same AFL code, one month ago under the AB v:5.00 . I took screen capture of fifteen minute chart and trade list. I searched for parameters that could modify the result. I found nothing. If somebody could run the code in relation to his market hours ( under v: 5.09), I would appreciate the feedback. Regards --- In [email protected], "reinsley" <[EMAIL PROTECTED]> wrote: > > Hello, > > Since I upgraded AB 5.00 to 5.09, I'am unable to run an intraday system. > The systems were running well before. It's the same for all my trading > systems. The trade list of AA backtester was showing the right hours > with the right plotting arrow. > They are supposed to run intraday and they became overnight now. > I must say I used exactly the same syntax for markethours and > marketclose into all my trading systems. > > I'am bogged on that issue for three days now. > Do I forget a parameter related to backtester ? > Does this code not good for the new version ? > > > //TS MACD ID > //Trading system reversal MACD cross signal > > _SECTION_BEGIN("TS MACD IntraDay"); > > TransmitOrder = False; // Set to True to really trade > //TimeFrameSet( in1Minute ); // switch to 1 minute frame > PositionSize = MarginDeposit = 1;// Do not reinvest Profits in backtest > SetChartOptions(1,chartShowArrows|chartShowDates); > MarketHours = TimeNum()>=080000 AND TimeNum()<195900; > MarketClose= TimeNum()>=195900 AND TimeNum()<=240000; > > Buy = Cross(MACD(), Signal()) AND MarketHours; > Sell = Cross(Signal(), MACD()) OR MarketClose; > Short = Cross(Signal(), MACD()) AND MarketHours; > Cover = Cross(MACD(), Signal()) OR MarketClose; > > /////////////////Plot////////////////////// > Plot(C,"close",6,128); > _N(Title = "TS MACD IntraDay - "+StrFormat("{{NAME}} - {{INTERVAL}} > {{DATE}} Open %g, Hi %g, Lo %g, Cl %g {{VALUES}}", O, H, L ,C )); > > shape = IIf(Buy , ExRem(Buy,Sell) * shapeUpArrow, ExRem(Sell,Buy) * > shapeDownArrow ); > PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, > High ) ); > shape2 = IIf(Cover , ExRem(Cover,Short)* shapeHollowUpArrow, > ExRem(Short,Cover) * shapeHollowDownArrow); > PlotShapes( shape2, IIf( Cover, colorGreen, colorRed ), 0, IIf( Cover, > Low, High ) ); > > > GraphXSpace = 15; /* create empty space of 15% top and bottom of chart */ > _SECTION_END(); > > > > > > Any help will be appreciated > > Regards >
