Please I need help to draw trendlines

 
Please I need help to draw trend lines that will:
1. Draw two trend lines high and low
2. The trend lines will use 2 anchor point.
1st point will start from 0 to 48 previous candle
2nd point will start from 0 to 24 previous cable
3. These lines will only be drown once at 00:01
4. At 23:59 these lines will be deleted
5. While the line is drown..if price goes above or below it should alert price is below or above trend lines.
 
  1. Help you with what? You haven't stated a problem, you stated a vague, incomprehensible want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
              No free help (2017)

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2018)

    We're not going to code it for you (although it could happen if you are lucky or the issue is interesting).
              No free help (2017)

  2. Until you can state your requirements in concrete terms, it can not be coded.

  3. “1st point from 0…48” is meaningless. A coordinate has a single price and time. You just implied 196 prices and 49 times. See № 2.

  4. “2nd point from 0…24” means first and second could be the same.

  5. Why are you including index zero, when you want to draw at the start of a new day?
              Please help with one trade per day code - Day Trading - Expert Advisors and Automated Trading - MQL5 programming forum #3.2 (2020)

  6. There is no water here, you can't drown.

 
William Roeder #:
  1. Help you with what? You haven't stated a problem, you stated a vague, incomprehensible want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
              No free help (2017)

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2018)

    We're not going to code it for you (although it could happen if you are lucky or the issue is interesting).
              No free help (2017)

  2. Until you can state your requirements in concrete terms, it can not be coded.

  3. “1st point from 0…48” is meaningless. A coordinate has a single price and time. You just implied 196 prices and 49 times. See № 2.

  4. “2nd point from 0…24” means first and second could be the same.

  5. Why are you including index zero, when you want to draw at the start of a new day?
              Please help with one trade per day code - Day Trading - Expert Advisors and Automated Trading - MQL5 programming forum #3.2 (2020)

  6. There is no water here, you can't drown.

Lol, the guy think everything is simple as that. 
 
Teddy Odafe:
Please I need help to draw trend lines that will:
1. Draw two trend lines high and low
2. The trend lines will use 2 anchor point.
1st point will start from 0 to 48 previous candle
2nd point will start from 0 to 24 previous cable
3. These lines will only be drown once at 00:01
4. At 23:59 these lines will be deleted
5. While the line is drown..if price goes above or below it should alert price is below or above trend lines.

Like so ? i don't get it , why 24 and 48 though ?

#property version   "1.00"
#property script_show_inputs
input int first=24;
input int second=48;
input int timehour=0;
input int timeminute=1;

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
  string tag="Channel_";
  ObjectsDeleteAll(ChartID(),tag);
  //find the first point ? 
    int barz=Bars(_Symbol,_Period);
    int start_bar=-1;
    //find the first bar of the day that contains the start time hour and start time minute 
      for(int i=0;i<barz;i++)
        { 
        datetime checked=iTime(_Symbol,_Period,i);
        if(checked!=0&&is_this_time_inside_this_bar(timehour,timeminute,checked)){
        start_bar=i;
        break;
        }}
    //did we find a start bar ? 
      if(start_bar!=-1)
      {
      //project point 1 + 2
        int point_1_bar=start_bar+first;
        int point_2_bar=start_bar+second;
      //get high and low of points 1 , 2 and times 
        datetime p1time=iTime(_Symbol,_Period,point_1_bar);
        datetime p2time=iTime(_Symbol,_Period,point_2_bar);
        double p1high=find_highest(start_bar,first);
        double p1low=find_lowest(start_bar,first);
        double p2high=find_highest(point_1_bar,second);
        double p2low=find_lowest(point_1_bar,second);
      //link highs 
        ObjectCreate(ChartID(),tag+"_H",OBJ_TREND,0,p2time,p2high,p1time,p1high);
        ObjectSetInteger(ChartID(),tag+"_H",OBJPROP_RAY_RIGHT,true);
        ObjectCreate(ChartID(),tag+"_L",OBJ_TREND,0,p2time,p2low,p1time,p1low);
        ObjectSetInteger(ChartID(),tag+"_L",OBJPROP_RAY_RIGHT,true);
      }
  }
//+------------------------------------------------------------------+

bool is_this_time_inside_this_bar(int hour,int minute,datetime bartime){
//flatten the day first 
  MqlDateTime mt;
  TimeToStruct(bartime,mt);
  mt.hour=hour;
  mt.min=minute;
  mt.sec=0;
  //back to datetime 
  datetime timestamped=StructToTime(mt);
  datetime timeto=(datetime)((int)bartime+PeriodSeconds());
  if(timestamped>=bartime&&timestamped<=timeto){return(true);}
return(false);
}

double find_highest(int from,int within){
double highest=iHigh(_Symbol,_Period,from);
for(int i=from;i<=from+within;i++){
if(iHigh(_Symbol,_Period,i)>highest){highest=iHigh(_Symbol,_Period,i);}
}
return(highest);
}

double find_lowest(int from,int within){
double lowest=iLow(_Symbol,_Period,from);
for(int i=from;i<=from+within;i++){
if(iLow(_Symbol,_Period,i)<lowest){lowest=iLow(_Symbol,_Period,i);}
}
return(lowest);
}
Reason: