High(iHighest) since a specific time

 

Hello!

Please, somebody can help me to define "High(iHighest)" and "Low(iLowest)" since a specific time?

I can find this in the topics:

double highestPriceAfterBuy = High[iHighest(NULL, 0, MODE_HIGH, iBarShift(NULL, 0, OrderOpenTime()), 0)];

How could I say High(Highest) since a specific time, e.a. "18:34"?

Thank You!

 
Use
int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)
Search for bar by open time. The function returns bar shift with the open time specified. If the bar having the specified open time is missing, the function will return -1 or the nearest bar shift depending on the exact.

on 1-minute time-frames

Sample:
  datetime some_time=iTime("EURUSD",PERIOD_D1,0)+(60*60*18)+(60*34);
  int      shift=iBarShift("EURUSD",PERIOD_M1,some_time);
And then put that into your highest function

int iHi=iHighest("EURUSD",PERIOD_M1,MODE_HIGH,Shift,0);
double xHig=iHigh("EURUSD",PERIOD_M1,iHi);

Well something like that ... you get the idea. If you're lucky, someone else would post a short hand version.

 
  1. ubzen:
    someone else would post a short hand version.
    The long version is better as it makes the code understandable. just edit the variable names.
  2. Minor change if the time is in the future.
     datetime some_time=iTime("EURUSD",PERIOD_D1,0)+(60*60*18)+(60*34);
     if (some_time > Time[0]) some_time -= 24*60*60;

 

Hi,

some body help me

I want specific time period high low, i.e High and low of 10 to 15 time period.

advance thanks.

 
052ac1416:

Hi,

some body help me

I want specific time period high low, i.e High and low of 10 to 15 time period.

advance thanks.

Please don't double post . . .
Reason: