Trading Chart, Forex

Forex trading is not a guessing game. It involves analysis of data and constant vigilance on the side of the trader in order to form an intelligent decision when it comes to making an investment. Traders often use a variety of tools and systems in order to help them determine the trends of the market. Using Forex charts is not uncommon as it helps in visualizing the trends and help traders quantify and understand the trends more accurately. Some of the most popular charts used by FX traders are the line, the bar and the candlestick.

The Line Chart

Line-Chart

The line chart is the most basic of the three commonly used charts in Forex. Its name is derived from the series of interconnecting lines of data points formed by tracing the patterns of closing prices over a period of time. Relying on the line chart alone is not enough to make an accurate analysis, however, its strength as a tool is due to the clear visual it provides when it comes to data regarding closing prices from one period to another.

Determining the closing price is important for traders as it sets the value of a particular currency of a given market before trading starts again the next day at that same market. It can also be used to better understand the market sentiment on a given trading day by comparing it to the closing price of a previous date.

The Bar Chart

Bar-Chart

The bar chart is also known as the “OHLC” chart referring to the data displayed on the bar which are the open, high, low and close of a traded currency in a specific market in a given period of time. It is important to first determine the period covered on the chart in order to accurately understand the trend.

As opposed to the interconnected lines in the line chart, the bar chart is represented by vertical lines with horizontal dashes on each side. The topmost part of the bar represents the high.? The dash on the upper part pointing to the right represents the close and the dash on the lower part pointing to the left is the open. The lowest part of the bar represents the low.

The advantage of the bar chart over the line chart is that it allows the trader to analyze not only the opening and closing of a currency price but the highs and lows as well.

The Candlestick Chart

Candlestick-Chart

The candlestick chart, also known as the Japanese candlestick chart is probably the most widely used of the three charts but also the most complicated. Its name was derived from its display representation which resembles an upright candlestick with the body representing the price opening and price closing and the wicks on both ends representing the highest price and the lowest price of the day respectively. The term Japanese implies its origin being the analysis tool used in Japanese trading since the 1700s.

The candlestick chart takes into consideration all the variables that are used in both the line and bar chart. In addition to these, it also includes in the analysis the emotion of traders as reflected on the data of a given trading day. As opposed to the other charts which analyze data of a given day’s opening from the closing price of the previous day, the candlestick chart analyzes data from the opening of one particular trading day up to its closing. It also provides for a clearer visual as it uses a color coded approach in representing the uptrend and downtrend of the market. 

Because of its combination approach in analyzing trends, it is thought to be the most accurate of the three commonly used chart analysis tools.

More details regarding types of charts can be found here.

NinjaTrader Logo
NinjaTrader stores all user configurations, indicators and strategies in this folder C:\Users\<user>\Documents\NinjaTrader 7\bin\Custom. NT does not allow to change the folder.
But it is possible to link a folder from somewhere else. E.g. you could store all your settings in your Dropbox folder and just link it to the NinjaTrader target folder.
 
Steps:
  • Run cmd. exe as Administrator
  • Execute mklink /D “C:\Users\<user>\Documents\NinjaTrader 7\bin\Custom” “C:\Users\<user>\Dropbox\Data\NinjaTrader\NinjaTrader 7\bin\Custom”
  • Use rmdir <link> to just remove the link
NinjaTrader Logo
NinjaTrader 7 uses a GridControl to let the user modify strategy or indicator properties. Properties marked with certain tags will be shown automatically in the Grid.
Example:
[Description("Numbers of bars used for calculations")]
[GridCategory("Parameters")]
public int Period {
    get {return iPeriod;} 
    set {iPeriod = Math.Max(1, value);}
}
It is possible to hide parameters in the GridControl dynamically. For supporting  this feature the strategy has to implement the interface ICustomTypeDescriptor. The property which allows to modify the visibility of other properties in the GridControl has to get additionally the tag RefreshProperties(RefreshProperties.All). Finally the function ModifyProperties implements the visibility handling.
public class tF_TestAnn : Strategy, ICustomTypeDescriptor
{
        [Description("ANN trade mode.")]
        [GridCategory("Parameters")]
        [RefreshProperties(RefreshProperties.All)]
        public  ENAnnMode AnnMode { get; set; }
 
        private void ModifyProperties(PropertyDescriptorCollection col)
        {
            if( AnnMode != ENAnnMode.Backtest )
            {
                col.Remove(col.Find("NetType", true));
            }
            if( AnnMode != ENAnnMode.Live )
            {
                col.Remove(col.Find("BuyLevel", true));
            }
        }

        public AttributeCollection GetAttributes()
        {
            return TypeDescriptor.GetAttributes(GetType());
        }

        public string GetClassName()
        {
            return TypeDescriptor.GetClassName(GetType());
        }

        public string GetComponentName()
        {
            return TypeDescriptor.GetComponentName(GetType());
        }

        public TypeConverter GetConverter()
        {
            return TypeDescriptor.GetConverter(GetType());
        }

        public EventDescriptor GetDefaultEvent()
        {
            return TypeDescriptor.GetDefaultEvent(GetType());
        }

        public PropertyDescriptor GetDefaultProperty()
        {
            return TypeDescriptor.GetDefaultProperty(GetType());
        }

        public object GetEditor(Type editorBaseType)
        {
            return TypeDescriptor.GetEditor(GetType(), editorBaseType);
        }

        public EventDescriptorCollection GetEvents(Attribute[] attributes)
        {
            return TypeDescriptor.GetEvents(GetType(), attributes);
        }

        public EventDescriptorCollection GetEvents()
        {
            return TypeDescriptor.GetEvents(GetType());
        }

        public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
        {
            PropertyDescriptorCollection orig = TypeDescriptor.GetProperties(GetType(), attributes);
            PropertyDescriptor[] arr = new PropertyDescriptor[orig.Count];
            orig.CopyTo(arr, 0);
            PropertyDescriptorCollection col = new PropertyDescriptorCollection(arr);

            ModifyProperties(col);
            return col;

        }

        public PropertyDescriptorCollection GetProperties()
        {
            return TypeDescriptor.GetProperties(GetType());
        }

        public object GetPropertyOwner(PropertyDescriptor pd)
        {
            return this;
        }
}
NinjaTrader Logo

If you are planning to run your strategy within a chart window and your strategy requires an asynchronous execution or event, you can trigger this via dynamic buttons in the tool bar of the chart window.

In the code below the creation of the buttons and the event handler is implemented in a separate class. CStripButton is created in the OnStartUp context and disposed in the OnTermination context. A button click calls a callback implemented in the strategy class.

public class CStripButton
{
    private ToolStrip           toolStrip           = null;
    private ToolStripButton     toolStripBtnA       = null;
    private ToolStripButton     toolStripBtnB       = null;
    private ToolStripSeparator  toolStripSeparator  = null;

    private Strategy            clStrategy;
    private StripButtonCallback fnCallback;        

    public CStripButton( Strategy _clStrategy, StripButtonCallback _fnCallback )
    {
        clStrategy = _clStrategy;
        fnCallback = _fnCallback;
 
        System.Windows.Forms.Control[] control =
  _clStrategy.ChartControl.Controls.Find( "tsrTool", false );
 
        if( control.Length > 0 )
        {
            toolStrip = (ToolStrip)control[0];

            toolStripSeparator              = new ToolStripSeparator();
            toolStrip.Items.Add( toolStripSeparator );

            toolStripBtnA                = new ToolStripButton( "btnA" );
            toolStripBtnA.Text           = "Button A";
            toolStripBtnA.Click         += btnClick;
            toolStrip.Items.Add( toolStripBtnA );

            toolStripBtnB                = new ToolStripButton( "btnB" );
            toolStripBtnB.Text           = "Button B";
            toolStripBtnB.Click         += btnClick;
            toolStrip.Items.Add( toolStripBtnB );
        }
    }

    /// <summary>
    /// Destructor.
    /// </summary>
    public void Dispose()
    {
        if( toolStrip != null )
        {
            toolStrip.Items.Remove( toolStripSeparator );
            toolStrip.Items.Remove( toolStripBtnA );
            toolStrip.Items.Remove( toolStripBtnB );
        }
    }
 
    /// <summary>
    /// Button click handler.
    /// </summary>
    private void btnClick( object sender, EventArgs e )
    {            
        if( MessageBox.Show( 
             "Are you sure you want to continue?", 
             "Button pressed", 
             MessageBoxButtons.YesNo, 
             MessageBoxIcon.Question ) != DialogResult.Yes )
            return;

        var _bak = toolStripBtnTrain.BackColor;
        toolStripBtnTrain.BackColor = Color.Green;

        fnCallback( sender.ToString() );
 
        toolStripBtnTrain.BackColor = _bak;
    }
}