Trend line to the right boarder

To add comments, please log in or register
samjesse
645
samjesse  

Hi

This code needs to create a trend line and extend it to the right chart boarder regardless of the shift button action. it works but not an elegant solution, Any suggestions?  Thanks


  datetime start = TimeCurrent();
  datetime end = start + 2000000;
  ObjectCreate(0, dayPivotLineName, OBJ_TREND, 0, start, APrice, end, BPrice);
Keith Watford
Moderator
13975
Keith Watford  
samjesse:

Hi

This code needs to create a trend line and extend it to the right chart boarder regardless of the shift button action. it works but not an elegant solution, Any suggestions?  Thanks


Is there a particular reason that you need it to end at the right border?

If not just use Ray

ObjectSetInteger(0,dayPivotLineName,OBJPROP_RAY,true);
To add comments, please log in or register