Posted By: DdlV
series issue? - 08/21/13 02:55
Hi. Please run this code for EUR/USD:
Is the [0] = Current Bar value for both Price and Trend supposed to be 14? That doesn't seem to be what the manual says, and it doesn't carry over to the [1] value of the next bar...
If this is correct, please help me understand.
Thanks.
Code:
function run() { set(LOGFILE); StartDate = 20130101; EndDate = 20130131; vars Price = series(price()); vars Trend = series(LowPass(Price,1000)); printf("\nBar,Price0-5=%i,%10.f4,%10.4f,%10.4f,%10.4f,%10.4f,%10.4f",Bar,Price[0],Price[1],Price[2],Price[3],Price[4],Price[5]); printf("\nBar,Trend0-5=%i,%10.f4,%10.4f,%10.4f,%10.4f,%10.4f,%10.4f",Bar,Trend[0],Trend[1],Trend[2],Trend[3],Trend[4],Trend[5]); }
Is the [0] = Current Bar value for both Price and Trend supposed to be 14? That doesn't seem to be what the manual says, and it doesn't carry over to the [1] value of the next bar...
If this is correct, please help me understand.
Thanks.