PDA

View Full Version : Simulation or Real Mode


soyjesus
01-15-2010, 01:33 AM
Is there any way to know if my strategies are working in "Simulation Mode" or in "Real Mode"? I need a parameter or variable which has this information (or Account, at least).

Thanks.

NinjaTrader_Bertrand
01-15-2010, 02:47 AM
This depends on the account you choose to start them on (Sim101 being the simulation only one).

Although not supported, you could use the AccountName string to check in the code.

soyjesus
01-15-2010, 05:50 AM
Ok, Bertrand. Could you send me a simple example of how can I access to AccountName string, please?

NinjaTrader_Bertrand
01-15-2010, 05:53 AM
You could try something like this - if (AccountName == "Sim101") ....

soyjesus
01-15-2010, 08:19 AM
Ok, thank you Bertrand. It's a good solution.
Regards and have a nice weekend!