Author |
Topic: Identifying which server you are connected to... (2 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
PDavies541 Posts: 21 Joined: Feb 01, 2013 |
Hi
I have some code that is called from an indicator. It uses the API but it doesn't make the connection itself, it uses the connection that the OEC client creates. How can I tell if we are currently connected to a live or demo server? Thanks Pete Peter Davies |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
We just added a new property - "Environment". You need to compare its value with "PROD". All other values will point to simulation environments. Something like that:
if(OEC.API.OECClient.Global.Properties["Environment"] == "PROD") { // live actions } Victor Vins Lead Software Developer |
||||