I am in desperate need of some help here. i dont want to think that it is impossible.
basically, i cam trying to get the Daily CCI value as it evolves during the intraday chart. my attempt is below. So i came up with the idea that i can build the daily cci values using run time values from intraday. i can build it using CCIa formula TimeFrameSet( inDaily ); // switch to 5 minute frame Typical=(C+H+L)/3; TimeFrameRestore(); realtimecci=CCIa( Typical, 14 ); here i did not expand the Typical to 5 minute bars and so the array has the daily bars values. As long as i can update the last bar with the intraday =(C+H+L)/3 i will keep getting realtime CCI daily values as the bar progresses for backtesting. Hope this explains why i am looking for the HLC values as a number as i need to use it as a number --- In [email protected], "murthysuresh" <mo...@...> wrote: > > In the case you have shown, the valuewhen returns an array. i want the actual > low value as a number. > > The background behind this is that i am trying to plot the daily CCI value as > the bar progresses during the day while backtesting. For a true backtesting > of the strategy, i need to know the values of the indicators as the bar > progresses over time. there is not way that i can get it automaticlaly with > ab. > > Accoring to AB support > If you want to calculate "what daily CCI would be on each of the intraday > bars" - then you can't use TimeFrame functions for that, as they return EOD > values of the OHLC arrays (of course daily Open is known since the start of > the day). So you would need to calculate such indiators in some form of a > FOR loop (or perhaps 2 nested loops). Unfortunatelly I don't have any > ready-to-use example of such code I could share and writing such fomrula on > demand from scratch exceeds the range of free support we are able to offer > (see: http://www.amibroker.com/freesupport.html). > > > > after breaking my head over it for more than weeks, here is my almost > completed code except for a small bit. > > use CCIa to do the cci formula and pass in a array with daily prices. so i > get the daily price from timeframeset and do not expand it so that i will > have the daily price arrays. > my idea is to change the last value of the daily array with the current HLC > values from daily bar. > > So i came up with the idea that i can build the daily cci values using run > time values from intraday. i can build it using > CCIa formula > > TimeFrameSet( inDaily ); // switch to 5 minute frame > Typical=(C+H+L)/3; > > TimeFrameRestore(); > > realtimecci=CCIa( Typical, 14 ); > here i did not expand the Typical to 5 minute bars and so the array has the > daily bars values. > > As long as i can update the last bar with the intraday =(C+H+L)/3 i will keep > getting realtime CCI daily values as the bar progresses for backtesting. > > Hope this explains why i am looking for the HLC values as a number as i need > to use it as a number > > > > > > > > > --- In [email protected], "brian_z111" <brian_z111@> wrote: > > > > Hi Seede, > > > > Does this help. > > > > (I think you can substitute the High or Low, or any required bar specific > > value, for TimeNum()) > > > > //AA Settings should be on an intraday timeframe e.g. 5 min > > //Run the scan then use X_ATC_IntradayHLL to report on the data > > //and export it to a spreadsheet for graphing > > > > Buy = Sell = 0; > > > > Sym = Name(); > > > > DL = TimeFrameGetPrice( "L",inDaily,0); > > BSL = BarsSince(L == DL); > > ILT = ValueWhen(BSL == 0, TimeNum()/10000,1); > > > > I uded it at the Zboard and the full code is downloadable via file links > > there. > > > > http://zboard.wordpress.com/2009/03/02/342/ > > > > --- In [email protected], "murthysuresh" <money@> wrote: > > > > > > An additional question. the highestoftheday returns a array. i want to > > > get the specific value of the highestoftheday. i tried lastvalue but it > > > was returning the values incorectly. > > > appreciate any additional help. > > > Seede > > > > > > --- In [email protected], "murthysuresh" <money@> wrote: > > > > > > > > thanks a lot. u are a genius. > > > > --- In [email protected], Rajiv Arya <rajivarya87@> wrote: > > > > > > > > > > > > > > > newday= day()!=ref(day(),-1); > > > > > > > > > > highestoftheday=highestsince(newday,H,1); > > > > > > > > > > > > > > > > > > > > Rajiv > > > > > > > > > > > > > > > > > > > > To: [email protected] > > > > > From: money@ > > > > > Date: Thu, 21 May 2009 12:48:34 +0000 > > > > > Subject: [amibroker] Re: find today's dailybar high and low from > > > > > intraday bar > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > As per the docs below , it will give the last bar of the range in the > > > > > AA window. I am looking for the highest high of the day from the > > > > > intraday bars as the bar progreses. > > > > > > > > > > http://www.amibroker.com/guide/afl/afl_view.php?name=SELECTEDVALUE > > > > > > > > > > --- In [email protected], "jorgen_wallgren" > > > > > <jorgen.wallgren@> wrote: > > > > > > > > > > > > I am relatively new at this, but shouldn't this give you what you > > > > > > want: > > > > > > > > > > > > H0 = SelectedValue(TimeFrameGetPrice("H", inDaily, 0)); > > > > > > L0 = SelectedValue(TimeFrameGetPrice("L", inDaily, 0)); > > > > > > > > > > > > Regards, > > > > > > > > > > > > Jorgen > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _________________________________________________________________ > > > > > Insert movie times and more without leaving Hotmail®. > > > > > http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009 > > > > > > > > > > > > > > >
