MedianRenko cBot..
MedianRenko cBot..
25 Apr 2017, 16:17
I have a problem to understand an idea of how the Renko color change works. I need to program a cBot with the MedianRenko.calgo indicator. Could you please help me and give me some code example how to place a pending order BUY when the color is Green and SELL when it is RED ? I will very appreciate your help. Thank you.
//-----------------------------------------------------------------------------------------
private MedianRenko _renko;
protected void OnStart()
{
_renko = Indicators.GetIndicator<MedianRenko>();
}
protected void OnTick()
{
if (_renko.color[OneBarAgo] == "Green")
PlaceStopOrder(TradeType.Buy, Symbol, VolumeInUnits, Symbol.Ask, "BuyStopOrder", StopLoss, TakeProfit, null, "BuyStopOrder..");
else if (_renko.color[OneBarAgo] == "Red")
PlaceStopOrder(TradeType.Sell, Symbol, VolumeInUnits, Symbol.Bid, "SellStopOrder", StopLoss, TakeProfit, null, "SellStopOrder..");
}
raphael.mca@hotmail.com
29 Apr 2017, 19:32
I'm also looking for a cBot that trades according to the Renko chart. I have a very good trading logic, which depends on the Renko chart, unfortunately I am not aware to create a cBot, if you can, let me know.
@raphael.mca@hotmail.com