|How a strategy can understrand if it is running live?
|Page 1 of 1|
|Author:||Dr. Anton Fokin [ Thu Apr 10, 2008 1:40 pm ]|
|Post subject:||How a strategy can understrand if it is running live?|
You can use Strategy.Mode property to understand if your strategy code is running in live, paper trading or simulation mode. This way you can turn off certain functionality (for example heavy debugging) if you are running in the simulation mode.
public override void OnBar(Bar bar)
if (Mode != StrategyMode.Simulation)
Console.WriteLine("Close = " + bar.Close);
|Page 1 of 1||All times are UTC + 3 hours|
|Powered by phpBB® Forum Software © phpBB Group