Pergunta

I am new with Esper so i am unable to solve a simple problem. All i have to do is to get the difference of current close of bar with the previous close of bar. Whats the smartest way to approach this problem in esper?

Result= CurrentBar.Close - PreviousBar.Close.

EDIT:

I am using following piece of code will this work?

select
prev(0,close) - prev(1,close) as return,
security
from
Bar.win:length(2); 
Foi útil?

Solução

The "prev()" special function.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top