EarnForex / MarketProfile

Market Profile indicator for MT4, MT5, and cTrader by EarnForex.com

Home Page:https://www.earnforex.com/metatrader-indicators/MarketProfile/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Struggle with TimeShiftMinutes

Janaue opened this issue · comments

I have mT4 1335 and i use your market profile (ver. 1.16, 2020-12-07) but I can't get the TimeShiftMinutes to work

I use the default template for print a chart, then i load your marketprofile with stock options, on a M15 chart, then i choose

Session                  = Intraday;
SessionsToCount          = 12; 

and those 2 work well

Now if I add
TimeShiftMinutes = 60;
then some charts are missing

My goal is to define intraday sessions with respect to the opening hours of London and NYC, as per
https://fxssi.com/fxssi-sessions-indicator
So it would go like this

//input group "Intraday settings"
input bool           EnableIntradaySession1      = true;
input string         IntradaySession1StartTime   = "07:00";
input string         IntradaySession1EndTime     = "10:00";
input color_scheme   IntradaySession1ColorScheme = Blue_to_Red;

input bool           EnableIntradaySession2      = true;
input string         IntradaySession2StartTime   = "10:00";
input string         IntradaySession2EndTime     = "13:00";
input color_scheme   IntradaySession2ColorScheme = Red_to_Green;

input bool           EnableIntradaySession3      = true;
input string         IntradaySession3StartTime   = "13:00";
input string         IntradaySession3EndTime     = "16:00";
input color_scheme   IntradaySession3ColorScheme = Green_to_Blue;

input bool           EnableIntradaySession4      = true;
input string         IntradaySession4StartTime   = "16:00";
input string         IntradaySession4EndTime     = "19:00";
input color_scheme   IntradaySession4ColorScheme = Yellow_to_Cyan;

I would use TimeShiftMinutes in order to correct the server time by the broker, which is sometimes GMT+0,+1,+2,+3 depending on which pair broker-account I use. Currently the server time is GMT+1 time so I want TimeShiftMinutes=-60 to line up the market profile with the opening hours of London.

First picture is when everything is okay, ie TimeShiftMinutes=0
2021-06-07 13_00_09-EURGBP,M15

second picture is when TimeShiftMinutes=60
2021-06-07 12_59_42-495357_ IG-DEMO   EURGBP,M15

I just want to shift the profiles one hour to the right of their original starting time

Thanks for reporting! I will look into it. Meanwhile, you can adjust the intraday session times to match your desired timezone.

Fixed in 1.17.

PS: Actually, you could already do it simply by setting the intraday intervals with time shift in mind and keeping TimeShiftMinutes=0. Anyway, now it will work fine by setting TimeShiftMinutes too.