Trading Articles
Article Categories
Article Tools
Using internal indicators within a custom indicator
Updated August 14, 2020
trending_up
952 views
thumb_up
3 thanks given
group
3 followers
forum
4 posts
attach_file
0 attachments
Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
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
(If you already have an account, login at the top of the page)
Using internal indicators within a custom indicator
(login for full post details)
#1 (permalink )
La Grange, CA USA
Experience: Intermediate
Platform: Ninjatrader, MetaTrader
Broker: NinjaTrader Brokerage
Trading: MES, MNQ, M2K, MYM
Posts: 23 since Jun 2020
Thanks: 14 given,
6
received
I am having an issue creating a new custom indicator based upon the Wiseman stock indicators from NinjaTrader 8.
I can create a strategy using the Wiseman Alligator and unlock the code and compile with it working.
If I transfer this code over to a new custom indicator and add this line which works fine in the Strategy version, it errors with: 'WisemanAlligator' cannot be used like a method.
The line that works with the strategy but not in the indicator:
WisemanAlligator1 = WisemanAlligator(Close, 13, 8, 5, 8, 5, 3);
NinjaTrader's Help Page... (doesn't work for me):
https://ninjatrader.com/support/helpGuides/nt8/?indicators.htm (Goto Wiseman Alligator)
The example: (doesn't work for me):
// Prints the current value of the teeth for the Wiseman Alligator
double value = WisemanAlligator(13, 8, 5, 8, 5, 3).Teeth[0];
Print("The current Wiseman Alligator teeth value is " + value.ToString());
Any Ideas?
Best Threads (Most Thanked) in the last 7 days on futures io
(login for full post details)
#2 (permalink )
Market Wizard
Montreal, Quebec
Experience: Advanced
Platform: NinjaTrader 8
Broker: Kinetick
Trading: ES
Posts: 1,559 since Apr 2012
Thanks: 706 given,
3,737
received
jalley
I am having an issue creating a new custom indicator based upon the Wiseman stock indicators from
NinjaTrader 8.
I can create a strategy using the Wiseman Alligator and unlock the code and compile with it working.
If I transfer this code over to a new custom indicator and add this line which works fine in the Strategy version, it errors with: 'WisemanAlligator' cannot be used like a method.
The line that works with the strategy but not in the indicator:
WisemanAlligator1 = WisemanAlligator(Close, 13, 8, 5, 8, 5, 3);
NinjaTrader's Help Page... (doesn't work for me):
https://ninjatrader.com/support/helpGuides/nt8/?indicators.htm (Goto Wiseman Alligator)
The example: (doesn't work for me):
// Prints the current value of the teeth for the Wiseman Alligator
double value = WisemanAlligator(13, 8, 5, 8, 5, 3).Teeth[0];
Print("The current Wiseman Alligator teeth value is " + value.ToString());
Any Ideas?
Mmmm. Just a very quick thought (and I have not looked into this at all) - but NinjaTrader have obfuscated the Wiseman suite of indicators. This could be the problem, but as I said this is just a quick guess.
--------------------------------------------------------
- Trade what you see. Invest in what you believe -
--------------------------------------------------------
(login for full post details)
#3 (permalink )
Site Moderator
Posts: 3,675 since Jun 2009
Thanks: 3,790 given,
4,507
received
JonnyBoy
Mmmm. Just a very quick thought (and I have not looked into this at all) - but
NinjaTrader have obfuscated the Wiseman suite of indicators. This could be the problem, but as I said this is just a quick guess.
Obfuscation is not related: it's not because an indicator file is obfuscated that it can't export its dataseries value.
@jalley : I did a quick test and I don't see any problem using this code:
Code
public class FooBar : Indicator {
WisemanAlligator myIndy ;
protected override void OnStateChange () {
if ( State == State . SetDefaults ) {
Description = @ "" ;
Name = "FooBar" ;
Calculate = Calculate . OnBarClose ;
IsOverlay = false ;
DisplayInDataBox = true ;
DrawOnPricePanel = true ;
DrawHorizontalGridLines = true ;
DrawVerticalGridLines = true ;
PaintPriceMarkers = true ;
ScaleJustification = NinjaTrader . Gui . Chart . ScaleJustification . Right ;
IsSuspendedWhileInactive = true ;
}
else if ( State == State . Configure ) {
myIndy = WisemanAlligator ( 13 , 8 , 5 , 8 , 5 , 3 );
}
}
protected override void OnBarUpdate () {
Print( myIndy . Teeth [ 0 ]);
}
}
Success requires no deodorant! (Sun Tzu)
The following 2 users say Thank You to sam028 for this post:
(login for full post details)
#4 (permalink )
La Grange, CA USA
Experience: Intermediate
Platform: Ninjatrader, MetaTrader
Broker: NinjaTrader Brokerage
Trading: MES, MNQ, M2K, MYM
Posts: 23 since Jun 2020
Thanks: 14 given,
6
received
I found that the issue is that it will compile fine in NinjaEditor but not in Visual Studio after playing more with it. Wonder what's missing in Visual Studio to cause this.
(login for full post details)
#5 (permalink )
Site Moderator
Posts: 3,675 since Jun 2009
Thanks: 3,790 given,
4,507
received
jalley
I found that the issue is that it will compile fine in NinjaEditor but not in Visual Studio after playing more with it. Wonder what's missing in Visual Studio to cause this.
You can debug NinjaScript with Visual Studio but you can't compile with it.
Success requires no deodorant! (Sun Tzu)
The following user says Thank You to sam028 for this post:
Last Updated on August 14, 2020
Right now
Ongoing
Right now
April
Register to Attend
Elite only