Hi, I have created the load script below but I can't figure out why I get the results that I do. With the "previous" statement commented out as it is the statements that follow it work fine and return values but as soon as I add the "previous" statement I get the expected results from the previous statement (= yesterday's value) but the 2 following calculation statements now return no values. Can anyone explain why?
[Daily Stats]:
LOAD Date,
Month(Date) as OrderMonth,
Year(Date) as OrderYear,
Time,
Start as DayOpen,
High as DayHigh,
Low as DayLow,
End as DayClose,
Volume as DayVolume,
[Daily 20 EMA]as [EMA Daily 20],
//Previous([Daily 20 EMA]) as [EMA 20 Yesterday],
Round(([Daily 20 EMA] - lookup('BuySL','Date',Date,'Trade Results'))*100,10) as [EMA Daily 20 v SL],
If([Daily 20 EMA]>lookup('Buy Open','Date',Date,'Trade Results'),'Above Buy',If([Daily 20 EMA]<lookup('Sell Open','Date',Date,'Trade Results'),'Below Sell','Asia Range')) as [EMA Daily Position],
DailyStoch%K
FROM
[EURJPY 2yr Daily.xlsx]
(ooxml, embedded labels);