MedianRenko cBot..

Created at 25 Apr 2017, 16:17
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!
AW

aw52uk@gmail.com

Joined 10.04.2017

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..");

}

 


@aw52uk@gmail.com
Replies

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