Please help me out with this closing price.

Created at 11 May 2017, 23:51
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
FR

fredrik

Joined 02.05.2017

Please help me out with this closing price.
11 May 2017, 23:51


Hi guys,

trying to get a buy trade when the candle has closed under simple moving average 10.

how do I get the closing price of the last candle?

var close = MarketSeries.Close.LastValue; // is this correct?
sma = Indicators.SimpleMovingAverage(SourceSeries, 10);

if (Close < sma.Result.LastValue)
{

//Execute the trade...

}

 


@fredrik