Attachments forums

List of attachments posted on this forum.


All files on forums: 136271

Re: Coding Help

Newton51, Sun Jul 09, 2017 1:50 pm

I feel awful asking where I am going wrong again.
I made up a screenshot showing the Code used and the csv file output, then marked up / documented in an xls.

The code I used as this:

Code: Select all

FileWrite(handle,TimeToString(Time[i]),Open[i],High[i],Low[i],Close[i],iOpen(NULL,PERIOD_D1,iBarShift(NULL,PERIOD_D1,Time[i+1])),iHigh(NULL,PERIOD_D1,iBarShift(NULL,PERIOD_D1,Time[i+1])),iLow(NULL,PERIOD_D1,iBarShift(NULL,PERIOD_D1,Time[i+1])),iClose(NULL,PERIOD_D1,iBarShift(NULL,PERIOD_D1,Time[i+1])));
The highlighted purple are not the same as the first bar for the new day (starting 00:00h) ad yet they are the same as desired.
The green, yellow, orange and red highlights show all else is correct. The problem is hours 0100 ~ 23:00h and only affects the BarShift related cells.
I have shown the full 24h period plus last and first bar of the previous and subsequent days. The symmetry is always the same i.e. I have not "cherry picked" an untypical day.

Have I erred or am I trying to do something intrinsically not do-able?

TIA for any critique and/or corrections.
All files in topic