Hi,
I am interested in having a lua script developed that can provide me with the data presented in FXCMs Real Volume indicator.
I am proficient in python but find it dificult to figure out .lua
So far I have managed to add some code to a existing lua script I found on here: http://fxcodebase.com/code/viewtopic.php?f=28&t=61403&p=121729&hilit=csv#p121729
However the code correctly loads the real volume indicator but only zeroes are printed to the csv file
I suspect that it is quite easy to fix, and it is probably because the indicator is not updated correctly.
The pseudo code is something like:
-- Load indicator
Ind=core.indicators:create("REAL VOLUME", source);
-- Create line to be printed to csv file.
Str = Counter .. ";" .. Time.day .. "/" .. Time.month .. "/" .. Time.year .. " " .. Time.hour .. ":" .. Time.min .. ":" .. Time.sec;
Str = Str .. ";" .. source.open[period] .. ";" .. source.high[period] .. ";" .. source.low[period] .. ";" .. source.close[period] .. ";" .. Ind.DATA[period] ..'\n';
-- print to designated .csv file and repeat when a new period starts.
FileRec:write(Str);
Hope you can help