function run()
{
int cols = 3; //number of columns of the dataset
int handle = 100; //can be any number between 1..1000
if(is(INITRUN))
{
dataNew(handle, 0, cols);
}
var* row = dataAppendRow (handle, cols);
row[0] = wdate(); //mandatory for datasets
row[1] = price(); //just some data
row[2] = ATR(30); //just some data
int rows = dataSort(handle); //make sure, timestamps are in descending order
int idx = dataFind(handle, wdate());
printf("\n\nRows: %d", rows);
printf("\nValues sent : wdate() = %.5f, price = %.5f, atr = %.5f", wdate(), price(), ATR(30));
printf("\nValues received: wdate() = %.5f, price = %.5f, atr = %.5f", dataVar(handle, idx, 0), dataVar(handle, idx, 1), dataVar(handle, idx, 2));
}