Domanda

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); 
È stato utile?

Soluzione

The "prev()" special function.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top