is it possible to place EA on 15min chart but the code references a 1Hr chart?

 
i tried coding with ibarshift using a 1 min chart, and ima of a 1 hour chart. seems not to be working,

TimePassedFromBegin=iBarShift("GBPUSD",PERIOD_M1,EndTime, true); SessionHigh =High[Highest("GBPUSD",PERIOD_M1,MODE_HIGH,ReferenceStart-TimePassedFromBegin,TimePassedFromBegin)]; int HrShift=iBarShift("GBPUSD",PERIOD_H1,EndTime, true); dayhigh = High[Highest("GBPUSD",PERIOD_H1,MODE_HIGH,Day_Range_Hr,HrShift)]; daylow = Low[Lowest ("GBPUSD",PERIOD_H1,MODE_LOW, Day_Range_Hr,HrShift)];


seems that when i run the ea on the 1 min chart, the "sessionhigh" will work but the "dayhigh" wont work, and vise versa!

please please please help
 
What code returns GetLastError() after accessing to other timeframes?
 
didnt use GetLastError(), it just doesnt run properly in the tester. i did an objectcreate, at SessionHigh. if the ea is ran on 1 min chart, it shows up correct, if ran on any other timeframe, the object isnt created at the right location.

how do i access the error or outputs of the ea? its quite painful to read through the entire code repeatedly and have no idea what is wrong
 
What is tested symbol?
 
"GBPUSD"

its in above code, or are you talking about something else?
 
o6o2:
"GBPUSD"

its in above code, or are you talking about something else?
You can test this expert with any symbol.
If You use NULL or Symbol() instead of "GBPUSD" then You use current symbol in any case.
Be sure that before testing M1 and H1 charts are open. See https://www.mql5.com/en/articles/1512
===
If other symbols and periods are actively used, it is desirable to download them to all possible depth
===
 
i know about null, i use GBPUSD because this ea is only for the GBPUSD.
i attached the ea to a 15 min chart, are you saying that i need to also attach it to a 1min and 1hour chart of the GBP?

i am running it in the strategy tester, and i run the test on a 15 min chart, it does NOT work! i appreciate you trying to help, but you'v not understood my question.

i am saying, inside the code, i referenced different timecharts the 1 min, the 1hour and 15min. i ran the tester on the 15 min, and the values for the 1min and 1hour screw up, if i run the test in 1 min, only the 1 min value shows up correctly.

i am wandering if there is a mistake in the code or if there is someting i can do to fix this problem.

i NEED to use the 15 min chart because THE ema 150 has to be from 15min.

do i make sense? am i ranting? i think i am about to go nuts from rereading this code a couple hundred times and still cant figure out the problem