Jump to content

Add license to own indicator


ranchito

Recommended Posts

Hi.

I created a flag and want to add a license.

use the machine id

They know some tutorial on how to do this?

 

thanks

 

It really depends on what you are trying to do. If you are trying to do some sort of server validation, that is going to be a lot more involved, but here is something to get you started if it is hard coding machine ID's

 

private bool ValidMachine = false;
protected override void OnStartUp()
{
   ValidMachine = false;
   if (NinjaTrader.Cbi.License.MachineID == "MACHINEIDGOESHERE")
       ValidMachine = true;
}

 

Here's another idea on hard coding a list of valid machine IDs: http://m.ninjatrader.com/support/forum/showthread.php?p=277780

Link to comment
Share on other sites

It really depends on what you are trying to do. If you are trying to do some sort of server validation, that is going to be a lot more involved, but here is something to get you started if it is hard coding machine ID's

 

private bool ValidMachine = false;
protected override void OnStartUp()
{
   ValidMachine = false;
   if (NinjaTrader.Cbi.License.MachineID == "MACHINEIDGOESHERE")
       ValidMachine = true;
}

 

Here's another idea on hard coding a list of valid machine IDs: http://m.ninjatrader.com/support/forum/showthread.php?p=277780

 

simply put this code in the indicator?

because I have tried and I could not achieve it.

 

Thank you

Link to comment
Share on other sites

thank you very much, no matter it easy.

should paste this code into the formula of any indicator?

From already thank you very much

 

You should be able to use that code in any of the indicators you have developed. Again, extremely easy to bypass, so it will be virtually useless if you are distributing your indicator to anyone other than yourself.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...