Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 09:27:42 +0000



Change Color of Chart Background in Simulation Mode

View Count: 95

[2024-05-03 14:54:07]
jsandlan - Posts: 16
Is it possible to change the color of the entire chart background in simulation mode?

I traded the first part of the NY session today in SIM mode by mistake because the size of the text that is in the top left corner of the screen that indicates SIM mode is turned on did not catch my eye despite being a color chosen to be immediately visible.

I see the ability to change the Trade Window background color when attached to the chart, but I prefer not to have the Trade Window visible when trading.

I see the ability to change the background of the chart in general, but not in simulation mode v/s live trading.

It would be great to have the background of the chart in simulation mode be a specific color. This way it will never miss my attention that I am in SIM mode.
Date Time Of Last Edit: 2024-05-03 14:59:02
imageSIM.png / V - Attached On 2024-05-03 14:54:00 UTC - Size: 16.87 KB - 21 views
[2024-05-03 16:30:34]
John - SC Support - Posts: 31704
You could always create a custom study that will give you the state of Simulation Mode, which could then be used to do what you want. Refer to the following:
ACSIL Interface Members - Variables and Arrays: sc.GlobalTradeSimulationIsOn

List of Third Party Sierra Chart Study and System Programmers
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-05-03 17:49:28]
jsandlan - Posts: 16
In case anyone else would like a way to do this I put together this simple custom ASCIL study to change the background color when in simulation and to apply no background color when not in simulation.


#include "sierrachart.h"

SCDLLName("Simulation Background Color")

SCSFExport scsf_SimulationBackgroundColor(SCStudyInterfaceRef sc)
{
  int TradeSimulationIsOn = sc.GlobalTradeSimulationIsOn;
  SCSubgraphRef Subgraph_Background = sc.Subgraph[0];
  // Set the configuration and defaults
  sc.GraphName = "Simulation Background Color";
  sc.StudyDescription = "Simulation Background Color";
  sc.AutoLoop = true;
  sc.GraphRegion = 0;
  sc.DrawStudyUnderneathMainPriceGraph = 1; // not required in studies, but want color behind price for this study
  Subgraph_Background.Name = "Simulation Background Color";
  Subgraph_Background.DrawStyle = DRAWSTYLE_BACKGROUND;
  Subgraph_Background.PrimaryColor = RGB(210,255,210);

  if (TradeSimulationIsOn)
  {
    Subgraph_Background[sc.Index] = 1;
    return;
  }
  else
  {
    Subgraph_Background[sc.Index] = 0;
    return;
  }
}


Date Time Of Last Edit: 2024-05-03 17:50:41

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account