NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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 01-06-2010, 10:19 AM   #1
davidt
Junior Member
 
Join Date: Dec 2008
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
Default machine ID

I want to make an indicator that will only work on one machine.

To do this I need to find the machine id on the computer. Is there a function that returns that?

Thanks
davidt is offline  
Reply With Quote
Old 01-06-2010, 10:22 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 977 times in 960 posts
Default

davidt, you can use Cbi.License.MachineId - if you need the License Key, you can use Cbi.License.Id
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 01-06-2010, 11:00 AM   #3
davidt
Junior Member
 
Join Date: Dec 2008
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
Default

so I could put some code in like this

if ( Cbi.License.MachineId != <my machine id>) {
return;
}

Thanks
davidt is offline  
Reply With Quote
Old 01-06-2010, 11:03 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 977 times in 960 posts
Default

Yes, correct this should compile well and return out if run on another machineID.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-23-2013, 04:03 PM   #5
Gumby
Junior Member
 
Join Date: Sep 2010
Posts: 20
Thanks: 0
Thanked 1 time in 1 post
Question MachineId2?

I noticed that Cbi.License.MachineId2 is also there. What could this be used for? Can a computer have two different IDs? If so, this could be helpful for something I'm trying to do.
Gumby is offline  
Reply With Quote
Old 04-23-2013, 05:18 PM   #6
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,218
Thanks: 24
Thanked 1,231 times in 1,002 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by Gumby View Post
I noticed that Cbi.License.MachineId2 is also there. What could this be used for? Can a computer have two different IDs? If so, this could be helpful for something I'm trying to do.
Query it to see its value. I am curious about it too, but am a bit tied up right now, so cannot write the code.
koganam is offline  
Reply With Quote
Old 04-23-2013, 11:10 PM   #7
Gumby
Junior Member
 
Join Date: Sep 2010
Posts: 20
Thanks: 0
Thanked 1 time in 1 post
Question

It's the same length as the ordinary machine ID - 32 characters - but the letters are all lower case and are only a-f, so it seems to be some kind of hexadecimal code. But what does it represent and is it unique to each computer? Hopefully Bertrand or someone else will chime in.
Gumby is offline  
Reply With Quote
Old 04-24-2013, 07:25 AM   #8
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 977 times in 960 posts
Default

The Cbi.License.MachineId2 would be used as backup if the generation of Cbi.License.MachineId1 fails.
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
machine ID not getting trough gator-trader Automated Trading 3 08-31-2009 03:59 AM
Machine ID has suddenly changed ? Mel Funktion Miscellaneous Support 1 07-16-2009 05:21 AM
Machine "ID" CommodityRFun Miscellaneous Support 5 06-29-2009 09:44 AM
Ninjascript access to license Id/machine Id? RichardTodd General Programming 1 09-17-2008 08:40 AM
Spontaneous Machine ID change? azmke Miscellaneous Support 2 04-21-2008 09:28 AM


All times are GMT -6. The time now is 09:45 AM.