Can someone give me advice about trend breakout EA

 

I know how to drawl trendline using trend object but I have no idea how can get trend slope as manual drawing

here manual

can drawl both upper and lower trend

here object


Here my code 

Trend_Line(Time[0],Time[65],Close[0],Low[50],Gold,STYLE_SOLID);
  }
//+------------------------------------------------------------------+

void Trend_Line(
    datetime x1, datetime x2, double y1,
    double y2, color lineColor, double style){
    //~~~~~~~~~~
    string label = "_Trend_Line_";
    ObjectDelete(label);
    ObjectCreate(label, OBJ_TREND,0, x1, y1, x2, y2, 0, 0);
    ObjectSet(label, OBJPROP_RAY, 0);
    ObjectSet(label, OBJPROP_COLOR, lineColor);
    ObjectSet(label, OBJPROP_STYLE, style);
    //~~~~~~~~~~
}
 

Get or Set the value ?

 
Marco vd Heijden:

Get or Set the value ?

Plz check my code .is it correct for get trend line as manual drawing. In manual drawing trendline touch swing points .In coding it is hard to touch .
 
Aung Swar:
Plz check my code .is it correct for get trend line as manual drawing. In manual drawing trendline touch swing points .In coding it is hard to touch .

Hi, use D1 chart and draw lines yourself. Regards Greg

Reason: