Hello,
I am new in NinjaScript development and I am trying to learn how to code in NinjaScript and because of it I am doing many testing and exercises.
Currently I have goal to develop indicator which will give Long or Short signals.
Inputs are:
AmountOfSeconds = 3600;
PercentChangeInPrice = 1;
NumberOfTicks = 100;
VolumeTraded = 10;
So signals are:
Long setup:
1) In last 3600 seconds price changed at least 1% in positive direction(moving up).
2) in last 3600 seconds ticks was equal or more then 100.
3) in last 3600 seconds traded volume was equal or more then 10.
Short setup:
reversal of Long setup.
So my main problem is that I don't know how to find:
1) exact price 3600 seconds ago.
2) how many ticks we had in last 3600 seconds.
3) what was volume 3600 seconds ago.
Hope someone could help me.
Thanks in advanced.
Comment