NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 04-07-2010, 07:37 AM   #1
rtj4201
Senior Member
 
Join Date: Jan 2009
Posts: 333
Thanks: 0
Thanked 0 times in 0 posts
Default DoubleMA

I like the DoubleMA because it will color the trend.

I have a problem. When I apply the indicator to YM, the DMA will not plot correctly. See the attached.

ym.jpg
rtj4201 is offline  
Reply With Quote
Old 04-07-2010, 08:14 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

The rounding seems to be off for YM as it has a higher decimals number...you would need to check into the code generating the rounding factor to be applied or contact the original author for input.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-07-2010, 08:58 AM   #3
rtj4201
Senior Member
 
Join Date: Jan 2009
Posts: 333
Thanks: 0
Thanked 0 times in 0 posts
Default

Rollins, the creator, does not receive private messages. Any help?
rtj4201 is offline  
Reply With Quote
Old 04-07-2010, 10:01 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

Unfortunately you would then need to review the code and debug it for the YM instrument then. You could of course also a consultant to take a look and tweak it for you -

http://www.ninjatrader.com/webnew/pa...injaScript.htm
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-07-2010, 12:31 PM   #5
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

I took a quick look and added a fix which I believe works ok for YM and does not impact others, please try the attached.
Attached Files
File Type: zip DoubleMANT7YM.zip (16.0 KB, 19 views)
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-08-2010, 06:24 AM   #6
rtj4201
Senior Member
 
Join Date: Jan 2009
Posts: 333
Thanks: 0
Thanked 0 times in 0 posts
Default

Sorry to bug you again but I got an error code saying that the .cs was created in an NT version not compatable with mine. I use 6.5.1000.15.YM2.jpg
rtj4201 is offline  
Reply With Quote
Old 04-08-2010, 06:41 AM   #7
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

Correct, this was an NT 7 file - you can add the needed code snippet yourself to your 65 code as the decimals are set -

Code:
if (Instrument.MasterInstrument.Name == "YM")
				decimals = 1;
That should help you out.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-08-2010, 08:31 AM   #8
rtj4201
Senior Member
 
Join Date: Jan 2009
Posts: 333
Thanks: 0
Thanked 0 times in 0 posts
Default

Without the ability to import yours, I cannot view the script to see where to put the snipet. Can you give me a screenshot of where to put the snipet in 6.5?
rtj4201 is offline  
Reply With Quote
Old 04-08-2010, 08:47 AM   #9
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

Please try the attached for 6.5, should be quicker this way - should be the same as NT7 version resultwise.
Attached Files
File Type: zip DoubleMAYM65.zip (15.6 KB, 17 views)
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-08-2010, 08:55 AM   #10
rtj4201
Senior Member
 
Join Date: Jan 2009
Posts: 333
Thanks: 0
Thanked 0 times in 0 posts
Default

Got this error.

YM3.jpg
rtj4201 is offline  
Reply With Quote
Old 04-08-2010, 09:07 AM   #11
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

Then you will need to ensure you're present NinjaScript files are error free and that they compile well, please see here for tips to get to compilable state -

http://www.ninjatrader-support2.com/...ead.php?t=4678
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-08-2010, 09:30 AM   #12
rtj4201
Senior Member
 
Join Date: Jan 2009
Posts: 333
Thanks: 0
Thanked 0 times in 0 posts
Default

I opened an indicator to compile all indicators using F5. It appears to only complile the indicator that I edited? It did not run a compile on all indicators?

Something I am doing wrong?
rtj4201 is offline  
Reply With Quote
Old 04-08-2010, 10:30 AM   #13
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

When you open one script and hit F5 all would be compiled, this is a must as it will be all put into one assembly.

Were you able to import my file then afterwards?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-08-2010, 11:44 AM   #14
rtj4201
Senior Member
 
Join Date: Jan 2009
Posts: 333
Thanks: 0
Thanked 0 times in 0 posts
Default

I dont think all were being compiled. I got no error messages. I deleted DoubleMA. Tried to reinstall the original one from the forum. I am still getting the same error message below.

I use DMA for trading and am shutdown.
rtj4201 is offline  
Reply With Quote
Old 04-08-2010, 12:11 PM   #15
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

Ok, please try deleting the DoubleMA and MAV it would use, then open any indicator and press F5 to recompile all again, then restart NT fresh and reimport my file downloaded to your desktop, still the same issue at hand?
NinjaTrader_Bertrand is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ChannelThis and updated DoubleMA ctrlbrk Indicator Development 16 06-17-2010 10:18 PM
Error msg when applying DoubleMA indicator Taddypole Version 7 Beta General Questions & Bug Reports 2 04-04-2010 12:35 PM
Doublema trader1512 Miscellaneous Support 16 06-10-2009 05:51 AM


All times are GMT -6. The time now is 06:18 PM.