Get value of Third-party indicators - NinjaTrader | futures io social day trading
futures io futures trading


Get value of Third-party indicators
Updated: Views / Replies:1,145 / 2
Created: by thesarath Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Get value of Third-party indicators

  #1 (permalink)
Trading Apprentice
Cochin
 
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 8 since Dec 2014
Thanks: 1 given, 0 received

Get value of Third-party indicators

How can I get the value of Third-party indicator?

I could get SMA's value with the below code

 
Code
var val = SMA(14)[0];
but i cannot get KPMWAP's value with the below code

 
Code
var val = KPMWAP(3)[0];
Its showing the below error

'NinjaTrader.Indicator.KPMWAP' is a 'type' but is used like a 'variable'

Should KPMWAP be instantiated?

Reply With Quote
 
  #2 (permalink)
Elite Member
Washington DC
 
Futures Experience: Beginner
Platform: NinjaTrader7
Favorite Futures: ES
 
Posts: 71 since Oct 2010
Thanks: 98 given, 76 received


thesarath View Post
How can I get the value of Third-party indicator?

I could get SMA's value with the below code

 
Code
var val = SMA(14)[0];
but i cannot get KPMWAP's value with the below code

 
Code
var val = KPMWAP(3)[0];
Its showing the below error

'NinjaTrader.Indicator.KPMWAP' is a 'type' but is used like a 'variable'

Should KPMWAP be instantiated?

One assumption is that the vendor has coded the indicator so you are able to reference it. Here are the other things to check:

1. Open a Ninjascript in Ninja to edit the code, right click, go to references, make sure the DLL is referenced--if its not, add the reference (there are other threads that describe this). Restart Ninja if it was already there
2. Go to bin\Custom and make sure there is a CS file with the same name as your DLL. Add the CS if it wasn't there and restart and compile
3. Open the CS file
4. In the CS file, find the name of the indicator that you are trying to reference. If you can't find it, you are out of luck. Even if you can find it, does not mean you are in the clear yet
5. You want the part that looks like "public INDICATOR_NAME (Color variable1, bool variable2, int variable 3, etc.) { return INDICATOR_NAME(variable1, variable2, variable3) }"--replace everything in quotes with the specific variables and names for your indicator
6. Now, in the indicator you are trying to use to reference the vendors indicator, you will need to reference it using everything in step 5. Some vendors leave it blank, so you will have to reference the indicator like this: IndicatorName().
7. Assuming you make it to step 6, you will have to use Ninja intellisense to finish reference the public portion of the DLL, which sometimes is not public, so you could do all this work and it could be for nothing. Enter the reference for the indicator (i.e. IndicatorReference(variable1, variable2, variable 3)) and then put a period after it and Ninja should bring up a list of public variables for that indicator. If it doesn't then you can try one more thing
8. Go to the vendor indicator and in the parameters area, see if a plot is at the bottom where you can change the color and dash styles. Get the name of the plot and try referencing it in step 7. If that doesn't work, go to the vendor and ask them to make the variables public so you can reference them externally

Reply With Quote
The following user says Thank You to Jack22 for this post:
 
  #3 (permalink)
Trading Apprentice
Cochin
 
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 8 since Dec 2014
Thanks: 1 given, 0 received



Jack22 View Post
One assumption is that the vendor has coded the indicator so you are able to reference it. Here are the other things to check:

1. Open a Ninjascript in Ninja to edit the code, right click, go to references, make sure the DLL is referenced--if its not, add the reference (there are other threads that describe this). Restart Ninja if it was already there
2. Go to bin\Custom and make sure there is a CS file with the same name as your DLL. Add the CS if it wasn't there and restart and compile
3. Open the CS file
4. In the CS file, find the name of the indicator that you are trying to reference. If you can't find it, you are out of luck. Even if you can find it, does not mean you are in the clear yet
5. You want the part that looks like "public INDICATOR_NAME (Color variable1, bool variable2, int variable 3, etc.) { return INDICATOR_NAME(variable1, variable2, variable3) }"--replace everything in quotes with the specific variables and names for your indicator
6. Now, in the indicator you are trying to use to reference the vendors indicator, you will need to reference it using everything in step 5. Some vendors leave it blank, so you will have to reference the indicator like this: IndicatorName().
7. Assuming you make it to step 6, you will have to use Ninja intellisense to finish reference the public portion of the DLL, which sometimes is not public, so you could do all this work and it could be for nothing. Enter the reference for the indicator (i.e. IndicatorReference(variable1, variable2, variable 3)) and then put a period after it and Ninja should bring up a list of public variables for that indicator. If it doesn't then you can try one more thing
8. Go to the vendor indicator and in the parameters area, see if a plot is at the bottom where you can change the color and dash styles. Get the name of the plot and try referencing it in step 7. If that doesn't work, go to the vendor and ask them to make the variables public so you can reference them externally

Thanks Jack for your valuable reply.
1. I actually cannot add reference because, the user can add dll in custom directory and I think user will not add reference to each new dll each time.
2. I use Reflection to get the DataSeries (for SMA any other Ninja's indicator, I can get DataSeries)

 
Code
Type type = base.GetType();
MethodInfo mi = type.GetMethod("SMA", new Type[] { Type.GetType("System.Int32") });
DataSeries dataSeries  = new DataSeries((IndicatorBase)mi.Invoke(this, new object[] { 14 }));
but I cannot get the DataSeries for Third-party indicators with the below code(Note that GetTypeFromAllAssemblies() is a method which loop through all assemblies and return as Type)

 
Code
Type type = this.GetTypeFromAllAssemblies("NinjaTrader.Indicator.KPMWAP");
MethodInfo mi = type.GetMethod("KPMWAP", new Type[] { Type.GetType("System.Int32") });
DataSeries dataSeries  = new DataSeries((IndicatorBase)mi.Invoke(this, new object[] { 3 }))
What is the possible way to get DataSeries for Third-party indicators?

Reply With Quote

Reply



futures io > > > > Get value of Third-party indicators

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the best third party add on for NinjaTrader niftypine NinjaTrader 6 August 10th, 2016 02:43 AM
How to Use Third Party Vendor Indicators in Strategy? Michael Krall NinjaTrader 11 February 17th, 2014 05:43 PM
Backtesting 3rd party indicator? LightWeight NinjaTrader 4 January 2nd, 2014 08:41 PM
PaRTY ON..Le MaGNiFiQuE! Quick Summary News and Current Events 0 November 3rd, 2011 03:40 PM
Beta20 3rd party indicators issue Doppio NinjaTrader Programming 6 August 18th, 2010 08:37 AM


All times are GMT -4. The time now is 02:21 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-12 in 0.09 seconds with 19 queries on phoenix via your IP 54.163.209.109