[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Can I launch any AB instance with its set of chart windows and a database ?



PureBytes Links

Trading Reference Links

To prevent collisions in static var names and allow you to run 
multiple indicators simultaneously you must make the static var 
unique by adding a prefix that is unique in each indicator. This is 
what I started doing and it works fine. This is pretty safe since you 
won't have the same indicator with the same release running at the 
same time. If you want to use the same indicator for different 
symbols you will have to add something to the prefix to make them 
different. That could be the symbol name if your indicator is 
handling multiple symbols. Anyway this will give you an idea how to 
make the static vars unique.

_N(SectionName = "Trader Trends"); // indicator file name
_N(Ver = "Ver1_0"); //  indicator version number
_SECTION_BEGIN(SectionName);  // name of the indicator

// NOTE: VarPfx is used to make the static variables unique to 
prevent bizarre results if you use multiple versions of the trading 
program simultaneously. 
VarPfx = SectionName + Ver;  // static var prefix

// this is how you use it
staticvarset(VarPfx + "yourVarName", ...);

One thing to watch for. If you run trace more than one program can 
dump trace data to the same file. That gets very confusing. Either 
make sure only one is tracing or give each a unique prefix rather 
than just using #. 

Another thing. If you ever try to auto trade realize that only the 
indicators that are visible will be active. The indicators on other 
sheets you have will not be updated until you make them visible. SO 
you can't use an indicator in the background to drive auto trading. 
All the indicators you want to drive trading must be on the active 
sheet.

Barry

--- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxx> wrote:
>
> Yes ... but it may be safer to run two installations instad if two 
> instances. If you use static variables, two instances will both see 
the same 
> static variables and ... gets messy unless you have created unique 
names
> 
> ----- Original Message ----- 
> From: "svatso" <svatopluk.solc@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, September 03, 2008 8:07 AM
> Subject: [amibroker] Can I launch any AB instance with its set of 
chart 
> windows and a database ?
> 
> 
> > Is there any way to run distinct AB instance with its individual 
set
> > of chart windows and its specific database ?
> >
> > I am trading EOD and intraday as well but trading styles and AB
> > databases with chart windows are different.
> >
> > I don't need to run both instances simultaneously but it would be 
fine
> > if possible.
> >
> > Thank for help.
> >
> > Svatopluk
> >
> >
> >
> > ------------------------------------
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> > Yahoo! Groups Links
> >
> >
> >
>



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/