0
Answered

Draw a DOT under or above a candle _ Delta indicator

Natalia da Fontoura 2 years ago updated 2 years ago 2

Hi,

I want to add a DOT, red o green when de Delta indicator have a Candle Red or Green.

Could you help me to real de Delta indicator by c# source code anda and a Dot in the chart?

I guess I have to create a new instance 

readonly Delta _delta = new Delta();

But how I read the values?


Thank you.

Regards,

Natalia

Thank you Vladmimir.

I have another question. This is so important to me, to finish mi strategy.

How I can execute a strategy when the candle is close?For example the code above execute a BUY order when candle is UP else SELL order, but is opening orders during the candle is being created :
protected override void OnCalculate(int bar, decimal value)
{
var candle = GetCandle(bar);

if (ctrlSetup.IsUp(candle))
{
OpenPosition(OrderDirections.Buy);
}
else
{
OpenPosition(OrderDirections.Short);
}

}

Regards,
Natalia