Would someone help me out with this? C# to C++ Conversion

To add comments, please log in or register
tradingmarkets4pips
32
tradingmarkets4pips  

I'm somewhat familiar with C# and NOT with C++. I wrote an EMA indicator for Ninja Trader that I'd like to use on MT5 because that is where I trade Forex.

Would someone please help me convert this to C++.


Period        = 5;
                UpColor        = Brushes.LimeGreen;
                DnColor        = Brushes.Red;
                NeuColor    = Brushes.Navy;
                AddPlot(Brushes.Orange, "MAColor");



Value[0] = (CurrentBar == 0 ? Input[0] : Input[0] * (2.0 / (1 + Period)) + (1 - (2.0 / (1 + Period))) * Value[1]);
       
             if(RSI(5, 1)[0] >= 60)
            {if(IsRising(Value))
            PlotBrushes[0][0] = UpColor;
            } else if (RSI(5, 1)[0] <= 40)
            {if(IsFalling(Value))
            PlotBrushes[0][0] = DnColor;
            } else
            {
                PlotBrushes[0][0] = NeuColor;
            }

To add comments, please log in or register