Lines on the chart

1
Hi everyone, I live in Italy and I need help to create a simple code.

I should draw horizontal lines on today's chart on the levels:
high yesterday
minimum yesterday
maximum 2 days ago
minimum 2 days ago
a line halfway between the maximum and yesterday's minimum
a line halfway between yesterday's candle opening and closing

In addition 2 lines following these indications:
   At 8:00 ...

if T = 0800 then
(remember C [3] indicates closure of 3 candles ago compared to 8:00)

MAXI = (C [3] + C [6] + C [9]) / 3 + ((max previous day-min previous day) / 2);
MINI = (C [3] + C [6] + C [9]) / 3 - ((max previous day-min previous day) / 2);

IF MAXI-MINI> 100 THEN MAXI = MAXI-45; MINI MINI + = 45; ENDIF;
IF MAXI-MINI> 100 THEN MAXI = MAXI-45; MINI MINI + = 45; ENDIF;
IF MAXI-MINI> 100 THEN MAXI = MAXI-45; MINI MINI + = 45; ENDIF;
IF MAXI-MINI> 100 THEN MAXI = MAXI-45; MINI MINI + = 45; ENDIF;
IF MAXI-MINI> 100 THEN MAXI = MAXI-45; MINI MINI + = 45; ENDIF;
IF MAXI-MINI> 55 THEN MAXI = MAXI-25; MINI MINI + = 25; ENDIF;
endif;
Now write the 2 lines at the found value

I use these lines on futures
Thanks


Who is online

Users browsing this forum: Amazon [Bot] and 25 guests