Cristian
(Cristian)
September 29, 2017, 4:48pm
1
Hi All,
I use this expression:
Exp1
.es(_exists_:candles.highMid, timefield=candles.time,offset=-1d).if(eq, 0, null, .es(timefield=candles.time,offset=-1d,metric=sum:candles.highMid)).fit(average)
and this expression:
Exp2
.es(_exists_:candles.highMid, timefield=candles.time).if(eq, 0, null, .es(timefield=candles.time,metric=sum:candles.highMid)).fit(average)
But! I would like to plot the highest of these - max(Exp1, Exp2). Is this possible?
Br
Cris
cjcenizal
(CJ Cenizal)
October 3, 2017, 1:23am
2
Cristian:
.es(exists :candles.highMid, timefield=candles.time).if(eq, 0, null, .es(timefield=candles.time,metric=sum:candles.highMid)).fit(average)
Hi there Cris, you can combine and compare your expressions using the max
function like this:
.es(_exists_:candles.highMid, timefield=candles.time,offset=-1d).if(eq, 0, null, .es(timefield=candles.time,offset=-1d,metric=sum:candles.highMid)).fit(average).max(
.es(_exists_:candles.highMid, timefield=candles.time).if(eq, 0, null, .es(timefield=candles.time,metric=sum:candles.highMid)).fit(average)
)
Hope this helps!
CJ
system
(system)
Closed
November 3, 2017, 11:39am
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.