![what are my color codes in ctrader what are my color codes in ctrader](https://s3.amazonaws.com/tradingview/p/prH14cfo.png)
- What are my color codes in ctrader how to#
- What are my color codes in ctrader install#
- What are my color codes in ctrader code#
There are also hundreds of algorithms available from cTrader website. cTrader AutomateĬTrader Automate (previously called cAlgo) is now a part of the normal cTrader installation and offers quite a few examples of both indicators and robots.
What are my color codes in ctrader code#
You will also go through a sample source code with a detailed explanation of how it works, so that you could create your own cTrader indicators. Here, you will find the basic programming language constructions that are used to code custom indicators. Text = () + " " + Account.If you have already read our cTrader platform review, it is now time to explore possibilities offered by cTrader Automate - an algorithmic trading part of the platform. Text = () + " " + Account.Currency,Ĭreate the panel to show the equity information #region Equity RowĮquityRow.Margin = new Thickness(10, 0, 5, 5) ĮquityRow.Orientation = Orientation.Horizontal StackPanel balanceRow = new StackPanel() īalanceRow.Margin = new Thickness(10, 5, 5, 5) īalanceRow.Orientation = Orientation.Horizontal StackPanel accountInfoTitleRow = new StackPanel() ĪccountInfoTitleRow.Margin = new Thickness(10, 5, 5, 5) ĪccountInfoTitleRow.Orientation = Orientation.Horizontal ĪccountInfoTitleRow.AddChild(lbAccountInfoTitle) ĪccountInfoPanel.AddChild(accountInfoTitleRow) Ĭreate the balance panel to show the balance information #region Balance Row StackPanel accountInfoPanel = new StackPanel() ĪccountInfoPanel.Orientation = Orientation.Vertical VerticalAlignment = VerticalAlignment.Stretch, Create the title for account info: #region Account Info StackPanel contentPanel = new StackPanel() ĬontentPanel.Orientation = Orientation.Vertical Īnd create the account info in the content panel. We also use the border to wrap the layout: contentBorder = new Border That’s not bad, right?? Next, we need to create a content panel.
![what are my color codes in ctrader what are my color codes in ctrader](https://ctrader.com/uploads/user-1853/forum/84253/images/5287a07d0b17feec6cf25df69cd408da91cc7c99.png)
Text = "UI Demo (by Winson, coderblog.in)", Style = Styles.CreateCommonBorderStyle() //another custom style Var alpha = (int)Math.Round(byte.MaxValue * opacity, MidpointRounding.AwayFromZero) Īdd the border control into the Chart Chart.AddControl(border) Īfter that we can get a pretty panel, so easy, right ?Ĭreate the header object, this is also a border control, but we need to use the grid to control the layout, and use the TextBlock control to display the text, in the end, I want to add a ToggleButton for control show or hide the panel: var headerBorder = new Border Private static Color GetColorWithOpacity(Color baseColor, decimal opacity) Style.Set(ControlProperty.BorderThickness, new Thickness(1)) Style.Set(ControlProperty.BorderColor, Color.FromHex("#C3C3C3"), ControlState.LightTheme) Style.Set(ControlProperty.BorderColor, Color.FromHex("#3C3C3C"), ControlState.DarkTheme) Style.Set(ControlProperty.BackgroundColor, GetColorWithOpacity(Color.FromHex("#FFFFFF"), 0.85m), ControlState.LightTheme) Style.Set(ControlProperty.BackgroundColor, GetColorWithOpacity(Color.FromHex("#292929"), 0.85m), ControlState.DarkTheme) Style.Set(ControlProperty.CornerRadius, 3) The style clss function: public static Style CreatePanelBackgroundStyle() Style = Styles.CreatePanelBackgroundStyle(), HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, For this time, I will create an indicator to display the base account information as below:Ĭreate a StackPanel for the main container StackPanel mainPanel = new StackPanel() Ĭreate a Border to wrap the main panel and set the style var border = new Border
What are my color codes in ctrader install#
You need to download and install a window version cTrader, and open the “Automate - Indicators” for creating a new indicator:Īnd the base operation you can read the cTrader Offical document.
What are my color codes in ctrader how to#
You can create the indicator and cBot in cTrader by C#, and cTrader can use all of the C# libs to help you to your product! I will show you how to create a pretty UI panel in cTrader.