Maxlist and MinList from 00:00 to 08:00

Questions about MultiCharts and user contributed studies.
Lupomanu32
Posts: 7
Joined: 20 Nov 2023

Maxlist and MinList from 00:00 to 08:00

Postby Lupomanu32 » 06 Mar 2024

Hi everyone,
I'm going to build a strategy that place pending orders at 08:00 CME time.
I would like to set stop order at the maxlist of highs between 00:00 to 08:00 and vice versa for minlist of lows.
I would like use time instead bars.
Can someone help me?

User avatar
ABC
Posts: 721
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 409 times
Contact:

Re: Maxlist and MinList from 00:00 to 08:00

Postby ABC » 06 Mar 2024

Lupomanu32,

welcome to the Multicharts forum. One approach is tracking the values yourself within the time window. Assuming you are working with time based intraday bars with a minute resolution the indicator code below demonstrates how you can track the high and low.

Code: Select all

Variables: highUntil800 ( -9999999 ), lowUntil800 ( 0 ); //we only track the values up to and including the bar with the 8:00 timestamp //this will include bars with a 00:00 timestamp in the tracking if Time <= 800 then begin //reset the variables on a new day if Date <> Date[1] then begin highUntil800 = High ; lowUntil800 = Low ; end ; //track new highs and lows if High > highUntil800 then highUntil800 = High ; if Low < lowUntil800 then lowUntil800 = Low ; end ; //we use the initial value to ensure we have at least one tracked value before we plot the result if highUntil800 <> -9999999 then begin Plot1( highUntil800, "High" ) ; Plot2( lowUntil800, "Low" ) ; end ;
Regards,

ABC

Lupomanu32
Posts: 7
Joined: 20 Nov 2023

Re: Maxlist and MinList from 00:00 to 08:00

Postby Lupomanu32 » 13 Mar 2024

Thank you my friend


Return to “MultiCharts”