Jump to content

How to use Indicators in Strategies


tkiela

Recommended Posts

Hello folks,

 

hopefully this is the right section. I got the t2u.liberator.dll from here: http://indo-investasi.com/showthread.php/19205-REQ-john-maddog-doe-or-zeraw31-pls-educate-t2u-systems/page3

 

Working with the indicators in a chart works like a charm.

 

But how can I call these indicators from another indicator? I allready added the DLL as a reference.

 

Then I try to call it via NinjaTrader.Indicator.Indicator.METHODNAME.

But at this point, I will get a compiling error. There is no definition for this method.

 

In example:

base.Liberator_Momentum(5, 5, MA_1271Type2.EMA, 5, true, "a"); Throws me this error.

 

So, how can I call these indicators? Do I need the cs-files from the dll? Where do I have to put these?

 

Thanks in advance!

Link to comment
Share on other sites

Hello folks,

 

hopefully this is the right section. I got the t2u.liberator.dll from here: http://indo-investasi.com/showthread.php/19205-REQ-john-maddog-doe-or-zeraw31-pls-educate-t2u-systems/page3

 

Working with the indicators in a chart works like a charm.

 

But how can I call these indicators from another indicator? I allready added the DLL as a reference.

 

Then I try to call it via NinjaTrader.Indicator.Indicator.METHODNAME.

But at this point, I will get a compiling error. There is no definition for this method.

 

In example:

base.Liberator_Momentum(5, 5, MA_1271Type2.EMA, 5, true, "a"); Throws me this error.

 

So, how can I call these indicators? Do I need the cs-files from the dll? Where do I have to put these?

 

Thanks in advance!

 

First, DLL's typically have "base", "this", etc. in them, but if you are coding a strategy (cs) you don't need to add this. You typically call something specific from the DLL, like a dataseries (for example).

 

I typically add a variable like this: private DllName VariableName;

Then in "initialize" I will define the variable (make sure you insert inputs in correct order): VariableName = Liberator_Momentum(5, 5, MA_1271Type2.EMA, 5, true, "a");

Then I will call the dataseries I want, for example: Values[0].Set(VariableName.DataseriesName[0]);

 

Assuming the dll has exposed them for you to call.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...