![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Dec 2008
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 977 times in 960 posts
|
davidt, you can use Cbi.License.MachineId - if you need the License Key, you can use Cbi.License.Id
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2008
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
|
so I could put some code in like this
if ( Cbi.License.MachineId != <my machine id>) { return; } Thanks |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 977 times in 960 posts
|
Yes, correct this should compile well and return out if run on another machineID.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Sep 2010
Posts: 20
Thanks: 0
Thanked 1 time in 1 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.
|
|
|
|
|
|
#6 | |
|
Senior Member
|
Quote:
|
|
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Sep 2010
Posts: 20
Thanks: 0
Thanked 1 time in 1 post
|
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.
|
|
|
|
|
|
#8 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 977 times in 960 posts
|
The Cbi.License.MachineId2 would be used as backup if the generation of Cbi.License.MachineId1 fails.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |