If you are looking at option 3. the best way (from my opinion) is to copy the 
elements of the array minus the out of hours bars. In this way, You are 
creating your own DayNightCompress function. and You also need to create your 
own DayNightExpand function. The beauty of this is that you can apply your MACD 
or any indicator you like - very reusable. The coding is straight forward, the 
resultant array is a shorter array of course, just like the TimeframeCompress 
produces shorter arrays.
If running in afl loops is too slow, then consider a dll. a dll function would 
have almost no speed penalty (ie, the extra time it takes to do that 
compressing in relation to the TimeframeCompress is neglible, and you would 
combine the DayNightCompress and TimeFrameCompress functionality together). 
Ditto with the exapnd function.
If you think its a good concept but dont like the idea of coding C++, Let me 
know, I could write one for you. 

--- In [email protected], Dennis Brown <se...@...> wrote:
>
> Paul,
> 
> Thanks for the ideas.
> 
> Multiple instances is not a good option for me since the instances would have 
> to interact quickly, and it adds a level of complexity that would make 
> ongoing maintenance of the system more difficult for me.
> 
> Switching charts from 24 hour to day would be a great solution, except that 
> all running charts on a sheet have this setting common to them.  If it was 
> unique to each chart tab, then I could do it easily.
> 
> Writing my own custom indicator might work, but would be slow.  I would have 
> to generate a new timeframe, compress out the night data in a loop, do the 
> MACD-H, decompress the data (put the night holes back in), then expand end 
> back to the 1 minute timeframe.  The only way for me to know for sure it 
> would run fast enough and work without messing up the timestamps and is to 
> code it and see.  A lot of work if it does not do the job.
> 
> I would appreciate any other insights about the gotchas I might encounter in 
> doing the last option.
> 
> Best regards,
> 
> Dennis
> 
> On May 17, 2010, at 9:27 PM, paultsho wrote:
> 
> > the most obvious solution is to have 2 instances of AB, one for RTH and one 
> > for 24 hours. the other option is to toggle the 24 hours/ Day trading only 
> > mode in the display, but you cant have RTH and 24 hours in the same chart 
> > though. The 3rd option is write custom MACD indicators that filters out out 
> > of hours trading, and during this time, display no change (horizontal line).
> > cheers
> > paul.
> > 
> > --- In [email protected], Dennis Brown <see3d@> wrote:
> >> 
> >> Hello,
> >> 
> >> I realized today that I need to combine indicators for my realtime trading 
> >> strategy in an unusual way.  
> >> I am looking for advice for an approach that might work.
> >> 
> >> I am only charting in realtime indicator mode on one ticker symbol (ES 
> >> futures).
> >> 
> >> My database is 1 minute timeframe and 24 hours per day for about 18 months.
> >> 
> >> My geometry indicators require this database setup spanning several days.
> >> 
> >> However, I also need to generate an indicator for a MACD Histogram that is 
> >> based on regular trading hours (RTH) in 30+ minute timeframes.  This needs 
> >> to span a few weeks of history for the calculation to be accurate.
> >> 
> >> Of course speed is critical in that I am already bugged by the performance 
> >> popup complaining that I am over 1000 quite often.  I limit myself to 2000 
> >> setup bars and 5000 useful bars for realtime trading.  I could stand to 
> >> use more, but it runs too slow if I increase.
> >> 
> >> I had been running this MACD-H indicator on 24 hour/day data, but found 
> >> that it works much better in RTH only.
> >> 
> >> I suppose if it were possible to have two charts running on the same 
> >> database, but with different market hour settings, I could pass the MACD-H 
> >> indicator data to the main chart through a static array.  I don't think 
> >> that is possible though.
> >> 
> >> Thanks in advance,
> >> 
> >> Dennis
> >> 
> > 
> > 
> > 
> > 
> > ------------------------------------
> > 
> > **** IMPORTANT PLEASE READ ****
> > This group is for the discussion between users only.
> > This is *NOT* technical support channel.
> > 
> > TO GET TECHNICAL SUPPORT send an e-mail directly to 
> > SUPPORT {at} amibroker.com
> > 
> > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> > http://www.amibroker.com/feedback/
> > (submissions sent via other channels won't be considered)
> > 
> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> > 
> > Yahoo! Groups Links
> > 
> > 
> >
>


Reply via email to