Bruce, thanks so much for the detailed reply. I knew how to get the file into the Include folder, I just wasn't sure which code I was supposed to add the "#include <DateRange.afl>" line to. I should have known it would go right into the Price code.
Thanks again, appreciate it. Grant --- In [email protected], "Bruce" <bru...@...> wrote: > > Grant - > > No problem, and all questions are valid. I'll try to do better about > including a specific directions and an example in the future. > > Because many have their own favorite indicators or price charts that they > use, "utility" functionality like this is best done as an #include file. If > you have multiple panes in a chart, it can normally be included in multiple > panes if you your want to be able to select the parameters from any one of > them. > > SO, as a specific example, you would first determine what your standard > include path is. From the menus, you would select Tools / Preferences and > then the AFL tab. The grey text box with the first "Pick" button labeled > "Standard include path" is it. > > You would copy DateRange.afl into that directory. BTW, it is normally > "C:\Program Files\Amibroker\Formulas\Include". > > Now, let's say that you normally use the built-in chart from the Basic Charts > folder called "Price (all in one)". You would edit the AFL by that name. > There are several ways to do this. One straightforward way is to display the > charts tab by selecting the View menu and checking Charts. Then, right click > on Price (all in one) under the Basic Charts folder and select Edit. This > will bring up the Formula Editor. > > At the top of the code window add the following line - > > #include <DateRange.afl> > > Then, select File / Save, and close the editor. > > Now, when you insert the indicator on a chart, you will see the Date Range > selection in Parameters when you right click on the chart and select > parameters, OR click on the chart and use CTRL-R. > > -- BruceR > > > --- In [email protected], "NormH" <norm1@> wrote: > > > > Sorry for being such a dunce, but how exactly does one implement the > > DateRange.afl? I assume that the code is first placed in the Include > > folder? And then it's called by adding an #include statement in the code? > > But in WHICH code am I supposed to add the #include statement? > > > > Thanks, > > > > Grant > > > > > > --- In [email protected], "Bruce" <brucer@> wrote: > > > > > > Tradinghumble - > > > > > > Allow me to offer a couple of comments - > > > > > > * First, glad you found the DateRange.afl on AmibrokerU.com useful. > > > As Keith said, source AFL's are there to be added to, modified, etc. > > > For example, you might want to add shorter display ranges for intra-day > > > charts. > > > > > > * IMO, the power of Amibroker is the ability to make use of its many > > > "capabilities and hooks" to customize it. That being said, the question > > > is when to draw the line, and to suggest and wait for Tomasz to add a > > > facility - particularly when the way in which we might try to simulate > > > it would have limitations. PLUS, Tomasz always seems to find better > > > ways to integrate enhancement requests. > > > > > > * With a minor restructure, but a few limitations, I could add code > > > to DateRange.afl to set the chart ranges at start-up to the last known > > > period set thru DateRange. I might still do this, but it is probably > > > more applicable as a general example of how to do special things at > > > first execution of a chart. > > > * I believe what you are pointing out is a valid, useful enhancement > > > request. IMO, this should be posted to the feedback center. It seems > > > like a layout should remember the last range. It already remembers the > > > periodicity when saved, so the range is a logical step. > > > > > > -- BruceR > > > > > > > > > --- In [email protected], "tradinghumble" <sharp2be@> wrote: > > > > > > > > --- In [email protected], "booker_1324" booker_1324@ wrote: > > > > > > > > > > tradinghunble, no I am not overlooking those software packages. I > > > have used QT and consider it more of a toy for that very reason. It's > > > been a while since I have used Stockcharts and Bigcharts and even then > > > it was only to check the closing prices. The others that you mentioned > > > are either limited or come up short of the power of Amibroker. I still > > > do not know why you would want to display a set number of bars. Maybe I > > > am missing something. Could you enlighten me as to the advantage of > > > using a set number of bars? > > > > > > > > > > --- In [email protected], "tradinghumble" <sharp2be@> wrote: > > > > > > > > > > > > --- In [email protected], "booker_1324" <booker_1324@> > > > wrote: > > > > > > > > > > > > > > I use 3 different software packages and none of them have a set > > > number of bars for the chart. All have buttons to expand or contract the > > > number of bars and I really do not understand why it should be any other > > > way. You must have cut your eye teeth on one that does and have an > > > adjustment to make. Old habits are hard to break. > > > > > > > > > > > > > > > > > > > > > --- In [email protected], "tradinghumble" <sharp2be@> > > > wrote: > > > > > > > > > > > > > > > > Every charting software out there has some way to say I want > > > to display bars from xx/xx/xx to xx/xx/xx or say last 3 months, 6 > > > months, 2 years, etc... on a chart-by-chart basis... I always wondered > > > why this is not available in Amibroker. > > > > > > > > > > > > > > > > Am I missing something here? Most people don't need it ? I > > > find it very annoying to have a layout with multiple charts, different > > > time frames and having to readjust every chart to my favorite number of > > > bars everytime I open Amibroker (as it will load the number of bars > > > defined in Parameters)... > > > > > > > > > > > > > > > > Has anyone here found a workaround for this? Thanks in advance > > > > > > > > > > > > > > > > > > > > > > > > > > > Booker - you may be overlooking a few software packages out there > > > including some well know names such as Tradestation and QuoteTracker (as > > > an example), Ninja Trader would be yet another example... if you want to > > > also have a few web-based charting packages please look at > > > www.stockcharts.com, www.prophet.net or even the oldest of them all > > > www.bigcharts.com ... hope this helps you. > > > > > > > > > > > > > > > > > > > Booker, one of the reasons I'm like the functionality of limiting the > > > number of bars but also "persisting/remembering" when I re-open the > > > charting software is simply consistency. Couple of examples: > > > > > > > > When you build a layout with a daily, weekly and sometime intraday > > > charts I like for example to have the daily charts set at 6 months, > > > weekly at 2 years and 15-minute at 4 days... when I close Amibroker all > > > the charts will be displaying the "same" number of bars (as set in the > > > preference dialog)... not to mention that everytime I switch to a > > > different layout it will also happen... > > > > > > > > here is another example -- say you want to setup a layout with about > > > 10-20 small daily charts which will help getting a picture of these > > > instructions "at a glance" -- I normally want to look at them OHLC, 1 > > > year chart... guess what, when I restart Amibroker they will all be back > > > to the "parameters setting".. and when I switch to my "intraday > > > monitoring" layout it will all be reset as well... > > > > > > > > The functionality I just described is present in QT, Tradestation, > > > NinjaTrader and (I am 80% sure) Metastock... > > > > > > > > Finally I love to say I really enjoy Amibroker and is by far one of > > > the most powerful TA chart out there at the moment... however, the > > > functionality I just describe is "essential" to trades who look at > > > multiple instruments/timeframes at once, otherwise it would not be > > > present in other packages... > > > > > > > > Hope this helps and please don't take as a criticism to AB... > > > > > > > > > >
