Hi Brian, Let me explain further.
What Im looking to do is trade high volume breakouts. So the entry is just a mix of HHV, %increase, UpBar, Increase in volume, and sufficient liquidity. So if previous bar criteria meets the above, i buy on the next bar open. I have backtested this using Daily bars. Though the strategy is profitable, on the majority of occassions, a considerable chunk of the move happens in that first bar (between the initial breakout maybe and the close ie. in the first few hours) So what Im trying to do here is, instead of waiting for the close, and entering tomorrow, I want to buy AS SOON AS the current bar (daily) meets the requirements for %change, liquidity, volume, HHV, etc. ie. Mid-bar. So ideally I would want to auto-run an exploration every 30-60seconds, for example, and each time the scan catches a stock in which todays bar, treating the LAST price as the close, meets my criteria, then I enter right then and there, or as soon as practicable. Hope that makes it clearer. Thanks. Nizar. --- In [email protected], "brian_z111" <brian_z...@...> wrote: > > >snip< you can only access H and L bars dailybars from intraday. You cannot > >access any of the daily indicators intraday in your backtesting.>snip< > > I think it can be done (subject to the actual problem because some case > studies might exceed my capabilities). > I didn't post any example code because I am in the middle of some theoretical > work on PowerFactor (will post to the Zboard if it works out) and also > because, in your prev posts you didn't stipulate which indicator you wanted > to use to get in and out using RT bars (possibly you can't say because it > will reveal too much about your system ... which is understandable). > > Example: > > EOD strategy = Buy on Close and Sell on Close the next day (1 bar); > > In RT the same strategy can be applied by: > > RT EOD trade equivalent = Buy on Close (last intraday bar) and Sell on Close > (entry bar + 78 bars); > > Isn't it the same thing, expressed in different timeframes (without tricky > timeframe compression ... well tricky for me anyway). > > I always consider that macrobars e.g. weekly, are an approximation of the > corresponding microbars e.g. daily. > > > > > --- In [email protected], "murthysuresh" <money@> wrote: > > > > let me know when you find a way to do it. check my earlier posts on the > > same issue. > > you can only access H and L bars dailybars from intraday. You cannot access > > any of the daily indicators intraday in your backtesting. > > > > > > --- In [email protected], "nizar.mahri@" <nizar.mahri@> wrote: > > > > > > Hi, > > > > > > I currently have my system set up as below. > > > The way its set up is as an EOD system. > > > > > > Now I want to modify it to have intraday entries. > > > So as soon as todays bar meets the system entry criteria (in terms of > > > price% change, volume, and liquidity) then enter immediately (ie. don't > > > wait for the close). > > > > > > How would i do that? > > > > > > Thanks. > > > > > > Nizar. > > > > > > settradedelays( 1, 1, 1, 1 ); > > > > > > LBP = Param("ATR Look Back", 10, 5, 50, 1);; > > > Multi = Param("ATR Multiple", 2, 1, 5, 0.1);; > > > Pr = Close; > > > AT = ATR(LBP); > > > > > > Entry1 = Indicator1; > > > Entry2 = Indicator2; > > > Entry3 = Indicator3; > > > Entry4 = Indicator4; > > > Entry5 = Indicator5; > > > > > > Buy = Entry1 && Entry2 && Entry3 && Entry4 && Entry5; > > > BuyPrice = Open; > > > trailARRAY = Null; > > > trailstop = 0; > > > Longtriggerbar = 0; > > > > > > for( i = 1; i < BarCount; i++ ) > > > { > > > > > > if( trailstop == 0 AND Buy[ i ] ) > > > { > > > trailstop = Pr[ i ] - Multi * AT[i]; > > > Longtriggerbar = i; > > > } > > > else Buy[ i ] = 0; // remove excess buy signals > > > > > > if( trailstop > 0 AND Low[ i ] < trailstop and i != Longtriggerbar) > > > { > > > Sell[ i ] = 1; > > > SellPrice[ i ] = trailstop; > > > trailstop = 0; > > > } > > > > > > if( trailstop > 0 ) > > > { > > > trailstop = Max( Pr[ i ] - Multi * AT [i], trailstop ); > > > trailARRAY[ i ] = trailstop; > > > } > > > > > > } > > > > > > > > > Plot( Close,"Price",colorBlack,styleBar); > > > Plot( trailARRAY,"trailing stop level", colorRed ); > > > > > > // Rank trades according to ATR if insufficient capital > > > > > > PositionScore = 100-ATR(10); > > > > > > // Divide capital into 4 positions > > > // Plot equity chart > > > > > > NumPos = 4; > > > SetOption("MaxOpenPositions",NumPos); > > > PositionSize = -100/NumPos; > > > > > > Plot(C,"C",colorBlack,styleCandle); > > > e = Equity(); > > > Plot(e,"Equity",colorGreen,styleLine | styleOwnScale); > > > > > >
