I almost nailed the changes needed for market profile to draw correctly in case your broker is not GMT.
However I could use some help, because right now Europe and US are drawn correctly (because the same day open and close looking from US perspective), but Asia starts at 17EST and ends 5EST next day.
Right now the code below will make it draw from 17EST (prev day) which is correct, but then adds the current day's Asia also which is incorrect.
The code is not mine, I just tried to modify it for my needs.
Can a coder have a look a this?
However I could use some help, because right now Europe and US are drawn correctly (because the same day open and close looking from US perspective), but Asia starts at 17EST and ends 5EST next day.
Right now the code below will make it draw from 17EST (prev day) which is correct, but then adds the current day's Asia also which is incorrect.
The code is not mine, I just tried to modify it for my needs.
Can a coder have a look a this?
PHP Code
if (Time[i] <= EndDate) { signal=true; CurPos=LastLow; while (CurPos<=LastHigh) { MySizeAzia=0; MySizeEuropa=0; MySizeAmerica=0; for (j=i;j>=BACK;j--) { if ((High[j]>=CurPos) && (Low[j]<=CurPos)) { MySize++; if ((TimeHour(Time[j])>=8) && (TimeHour(Time[j])<17)) MySizeAmerica++; else if ((TimeHour(Time[j])>=3) && (TimeHour(Time[j])<12)) MySizeEuropa++; //if (TimeHour(Time[j])<5) MySizeAzia++; else if ((TimeDay(Time[j+1]) && (TimeHour(Time[j])>=17)) || (TimeDay(Time[j+1]) && (TimeHour(Time[j])<24))) MySizeAzia++;