Highest in range

4 replies

jbendsen

Subscriber, bbp_participant, community, 24 replies.

Visit profile

10 years ago #111573

I need to find the high in a range from 10:00 hours to current time, but highest in range only support variables? So how do I do this?

Thanks

Jesper

0

jbendsen

Subscriber, bbp_participant, community, 24 replies.

Visit profile

10 years ago #122608

Also could you please tell me how I use HighestInRange from 2300 hours the day before till 0730 hours today?

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #122631

I need to find the high in a range from 10:00 hours to current time, but highest in range only support variables? So how do I do this?

 

you’d have to use a custom action to get the current time value into a string variable.

How to do it:

1. define a string variable first, for example TimeNow

2. Create a new tab before all the other tabs and specify a condition like 0=0 (to make it execute every time)

3. in the THEN part use Custom Action with command: TimeNow = TimeToStr(Time[0], TIME_MINUTES);

 

This will call MQL function to get the current time and store it into TimeNow variable.

 

4. then you can use TimeNow variable in the Highest in Range condition

 

 

Also could you please tell me how I use HighestInRange from 2300 hours the day before till 0730 hours today?

 

it works automatically, it will recognize that the time range is from one day to another.

 

Mark

Mark
StrategyQuant architect

0

jbendsen

Subscriber, bbp_participant, community, 24 replies.

Visit profile

10 years ago #122645

Thanks, another related question…

 

What do I use as input if I want to get the highest form a bar with the period 17:05:00 to 17:09:59 in HighestInRange? (seconds not allowed in HighestInRange) Is it HighestInRange(17:05,17:09) or HighestInRange(17:05,17:10)?

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #122687

it depends also on your timeframe, but if you’ll use m% then it will be recognized as HighestInRange(17:05,17:10)

 

Mark

Mark
StrategyQuant architect

0

Viewing 4 replies - 1 through 4 (of 4 total)