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

[amibroker] Re: anybody try to launch broker thro c#



PureBytes Links

Trading Reference Links

TJ: with the limited c# knowledge that i have, one  needs to have a 
type lib for using c# or use a work around like the sample that i am 
playing with. 
so if it is not too much trouble, i would appreciate the type lib 
released with the final versions. 

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@xxx> 
wrote:
>
> Hello,
> 
> You should always use late binding because only that
> backward/forward compatibility is easily maintained
> and there is no need to recompile tools that use OLE
> each time new version of AB arrives.
> That is also the reason why I strongly discourage people
> from using type lib (early binding).
> Speed is not an issue as OLE in AB is used solely for
> large-scale (infrequent) control.
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "murthysuresh" <money@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, January 14, 2009 3:29 PM
> Subject: [amibroker] Re: anybody try to launch broker thro c#
> 
> 
> >i do believe that the early binding type lib that exists is for 
the 
> > earlier version of AB. that is why i am using the late binding.
> > Not sure why TJ chooses not to update the type lib with the new 
> > versions that he churns out.
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "tuzo_wilson" <j.tuzo.wilson@> 
> > wrote:
> >>
> >> --- In amibroker@xxxxxxxxxxxxxxx, "murthysuresh" <money@> wrote:
> >> >
> >> > i seem to get compile errors and obviously am doing something 
> > wrong.
> >> 
> >> If you want to continue the approach you started then you will 
have 
> > to
> >> use the System.Reflection namespace to use late binding.  For 
> > example:
> >> 
> >>              Type brokerType =
> >> Type.GetTypeFromProgID("Broker.Application");
> >>          object brokerObject = Activator.CreateInstance
(brokerType);
> >> 
> >>          object analysis = brokerType.InvokeMember("Analysis",
> >>                  BindingFlags.GetProperty,
> >>                  null,
> >>                  brokerObject,
> >>                  null);
> >> 
> >>          object retVal = brokerType.InvokeMember("Backtest",
> >>                  BindingFlags.InvokeMethod,
> >>                  null,
> >>                  analysis,
> >>                  new object[] { 0 });
> >> 
> >> 
> >> If you have the ability to use VB.Net you can take advantage of 
its
> >> built in late binding.  In VB, the same functionality as above 
would
> >> look like:
> >> 
> >>          Dim broker = CreateObject("Broker.Application")
> >> 
> >>          Dim analysis = broker.Analysis
> >>          analysis.Backtest(0)
> >> 
> >> 
> >> There is also an early binding type library in the members zone 
> > that you
> >> could use.  I haven't used it -- just curious if anyone is using 
it?
> >> 
> >> 
> >> Tuzo
> >>
> > 
> > 
> > 
> > ------------------------------------
> > 
> > **** IMPORTANT ****
> > This group is for the discussion between users only.
> > This is *NOT* technical support channel.
> > 
> > *********************
> > TO GET TECHNICAL 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
> > 
> > 
> >
>



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

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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/