c# API to calculate parabolic sar
Atom
31.05.2019


Ash

Фотография
Hi,
I'm trying to use the parabolic sar class in the S# library inside my C# program. My understanding is I need to populate the SAR object with values using the process() method like this:

Код

ParabolicSar psar = new ParabolicSar
{
Acceleration = SARSeed,
AccelerationStep = 0.02M,
AccelerationMax = 0.2M
};
for(int i = 0; i < iBars; i++)
{
TimeFrameCandle candle = new TimeFrameCandle()
{
ClosePrice = (decimal)closeArr[i],
HighPrice = (decimal)highArr[i],
LowPrice = (decimal)lowArr[i],
OpenPrice = (decimal)openArr[i],
};
psar.Process(candle);
}

var sarValue = psar.GetValue(shift);


But I am getting no values and the container is empty. How can I fill it with data to get the correct PSAR value at a specific candle instance. Your help is appreciated.

Thank you



Спасибо:




Добавить файлы через драг-н-дроп, , или вставить из буфера обмена.

loading
clippy