NinjaTrader Support Forum  

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

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 08-08-2012, 06:51 PM   #1
rcsingleton
Senior Member
 
Join Date: Jan 2008
Posts: 127
Thanks: 8
Thanked 1 time in 1 post
Send a message via Skype™ to rcsingleton
Question Looking for PeriodType on a Custom Datatype

Hello,

I purchased a custom datatype, called the BWTPrecisionRenko. When I open a chart and choose "DataSeries", I can choose the type, "BWTPrecisionRenko" with no problem. I also have to choose a brick size and a reversal percentage.

I want to use the Add() statement, in a strategy to test a multi brick size strategy.

I want to run the strategy against a BWTPrecisionRenko - 3 Tick, 125% datatype, as the primary and use the Add() to add the secondary object BWTPrecisionRenko - 9 tick, 125%.

My problem is that in the ..\Ninjatrader 7\bin\Custom directory all I see is the dll, "BWTPrecisionRenko.dll".

So I can't look in it to see what the proper periodType is. I've tried Custom0 - Custom9, Final1 - Final4, and BWTPrecisionRenko as a PeriodType. NT is not taking it.

Is there any way to find out what the proper syntax for the Add() statement is? What periodType does NT see the BWTPrecisionRenko datatype as?
Attached Images
File Type: png BWTPrecisionRenko.PNG (63.9 KB, 5 views)
rcsingleton is offline  
Reply With Quote
Old 08-08-2012, 07:07 PM   #2
Radical
Senior Member
 
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
Default

In the Custom directory, can you find the period type in question in the file "@BarsTypes.cs"?
Radical is offline  
Reply With Quote
Old 08-08-2012, 07:28 PM   #3
rcsingleton
Senior Member
 
Join Date: Jan 2008
Posts: 127
Thanks: 8
Thanked 1 time in 1 post
Send a message via Skype™ to rcsingleton
Default

Radical. Thanks for the response, but I don't see anything about that custom datatype in @BarsTypes.cs.
rcsingleton is offline  
Reply With Quote
Old 08-08-2012, 08:06 PM   #4
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,770
Thanks: 158
Thanked 562 times in 553 posts
Default

Unfortunately the Add() method will not support custom bar types.
NinjaTrader_Matthew is offline  
Reply With Quote
Old 08-08-2012, 08:22 PM   #5
rcsingleton
Senior Member
 
Join Date: Jan 2008
Posts: 127
Thanks: 8
Thanked 1 time in 1 post
Send a message via Skype™ to rcsingleton
Default

I've used Add() on custom bar types, in the past. The difference was I had access to the customBarType.cs file, so I could look in it and see what periodType was coded.

I'm currently using the Add() method with other custom bar types.
rcsingleton is offline  
Reply With Quote
Old 08-08-2012, 08:27 PM   #6
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,770
Thanks: 158
Thanked 562 times in 553 posts
Default

Yes, it is possible but we have not designed it to look for these bar types. We'll leave this thread open in hopes another community member can help you.
NinjaTrader_Matthew is offline  
Reply With Quote
Old 08-08-2012, 09:14 PM   #7
rcsingleton
Senior Member
 
Join Date: Jan 2008
Posts: 127
Thanks: 8
Thanked 1 time in 1 post
Send a message via Skype™ to rcsingleton
Default

That sounds like a good idea for the wishlist. Considering the number of 3rd party developers you support. I'm sure more than a few of them are creating custom datatypes.

What about supporting these datatypes by having NT automatically look for, and display the periodType that's being used by the custom datatype?
rcsingleton is offline  
Reply With Quote
Old 09-06-2012, 08:11 AM   #8
e-man
Senior Member
 
Join Date: Dec 2008
Location: http://coroin.com
Posts: 156
Thanks: 8
Thanked 7 times in 7 posts
Default

to take it up a notch, i suggest you enable developers to add custom barstypes the way you allow developers to add new indicators.

as was mentioned above, you can add custom bars type with the Add() method provided you know which PeriodType the developer used.

there is a thread over at BMT (unofficial) to track which values are used:
http://www.bigmiketrading.com/ninjat...eriodtype.html

cheers,
-e
e-man is offline  
Reply With Quote
Old 09-06-2012, 08:46 AM   #9
rcsingleton
Senior Member
 
Join Date: Jan 2008
Posts: 127
Thanks: 8
Thanked 1 time in 1 post
Send a message via Skype™ to rcsingleton
Default

I agree with e-man.

In the world of day trading, the standard datatypes, (minute, ticks, volume, range, etc.) are not really that useful.

My strategies were not generating consistent profits using them. But when I switched to some custom datatypes, things changed for the better. $$$$

So, supporting developers effort to create custom datatypes is a great idea.
rcsingleton is offline  
Reply With Quote
Old 09-06-2012, 09:12 AM   #10
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello rcsingleton,
You can build custom bar types in NinjaTrader though we do not officially provide support for it. Please refer to the @BarsType.cs file in the folder <My Documents>\NinjaTrader 7\bin\Custom\Type\ to get more idea on it.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 09-06-2012, 10:49 AM   #11
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,770
Thanks: 158
Thanked 562 times in 553 posts
Default

Thank you for providing your feedback as we continually strive to improve upon NinjaTrader's features. Your suggestion has been placed into our system with ID# 1969.
NinjaTrader_Matthew is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Matthew for this post:
Old 09-11-2012, 03:53 PM   #12
rickr
Junior Member
 
Join Date: Sep 2006
Location: , ,
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
Default Removal of Data Series>Period>Type

How do I remove some custom data series period types . . .

I have gone to MyDocs>NT7>bin>custom>type and do not find them listed . . . I am trying to install a new bar type and am not able to do it . . . so I am assuming that all of the "Custom0-Custom9" slots are filled and my new period type is being rejected . . .

also, how would I open this file . . . @BarsType.cs . . . ?

I am not a geek so I need a simple solution to my problem ! ! !

thx, rick
rickr is offline  
Reply With Quote
Old 09-11-2012, 03:59 PM   #13
e-man
Senior Member
 
Join Date: Dec 2008
Location: http://coroin.com
Posts: 156
Thanks: 8
Thanked 7 times in 7 posts
Default

Custom0-Custom9 and Final0-Final4 are the available values.

if you don't already have a favorite text editor, notepad++ is free and will color-code the c# in a .cs file.

if you do a search on that directory for "PeriodType.Custom" or "PeriodType.Final" that could bring you to the references for the custom barstype you currently have installed.

cheers,
-e

edit: should be Final4 not Final9
Last edited by e-man; 09-16-2012 at 01:27 PM. Reason: edit: should be Final4 not Final9
e-man is offline  
Reply With Quote
The following user says thank you to e-man for this post:
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
Custom PeriodType Mike Winfrey Indicator Development 12 01-28-2013 08:19 AM
Can I use datetime datatype as input parameter? hometradingblog Indicator Development 4 07-26-2012 05:54 PM
How to get Last price on Bid datatype chart Pirat Strategy Development 4 12-20-2011 05:30 AM
Bug with TimeSpan datatype indicator properties ScoobyStoo Indicator Development 4 07-07-2011 04:17 AM
PeriodType tonynt Strategy Analyzer 3 05-16-2011 03:29 AM


All times are GMT -6. The time now is 02:15 AM.