Hi There How to set Trendline to alway have trendLine.Y2 == trendLine.Y1

Created at 07 Jan 2021, 09:59
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
IM

imrealfighter

Joined 09.11.2020

Hi There How to set Trendline to alway have trendLine.Y2 == trendLine.Y1
07 Jan 2021, 09:59


Hello again guys is there a way that we could set trendLine.Y2 == trendLine.Y1 and always be like that (like a horizontal line) 
the purpose of this is I want a trendline to be a horizontal line but not extends on x-ais to the infinity date.

 

I've tried to use while() operation but if we use while loop it will not go to execute another section of the code. 

 

when I'm moving my trendline to extend or shrink it with the property of the trendline it kind of hard that not to change its angle so just want it to always be a horizontal line. 

Thank you.


@imrealfighter
Replies

PanagiotisCharalampous
07 Jan 2021, 10:56

Hi imrealfighter,

Is this a programming question or a usability question? I am confused. If this is a programming question, then you can set whatever value you like in the DrawTrendLine.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

imrealfighter
07 Jan 2021, 13:29

RE:

PanagiotisCharalampous said:

Hi imrealfighter,

Is this a programming question or a usability question? I am confused. If this is a programming question, then you can set whatever value you like in the DrawTrendLine.

Best Regards,

Panagiotis 

Join us on Telegram

First of all, Thank you again PanagiotisCharalampous you've helped me going through a challenge many and every time. 

I create a trendline by your suggestion method using Chart.DrawTrendLine();  

but I also set it to 

trendLine.IsInteractive = true;

the purpose of this trendline is using like a horizontal line but have a finite length. (the horizontal line doesn't have any angle and it's always 0 and the value of Y-axis at the right and left edge always equal) 

so when I extend or shrink the line the angle of it changes from 0 to 1-5 or something that's it.


Thank you.

 


 


@imrealfighter

PanagiotisCharalampous
07 Jan 2021, 14:45

Hi imrealfighter,

cTrader Desktop 4.0 will introduce a feature that will allow you to keep your lines straight when drawing.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

imrealfighter
09 Jan 2021, 03:02 ( Updated at: 09 Jan 2021, 03:10 )

RE:

PanagiotisCharalampous said:

Hi imrealfighter,

cTrader Desktop 4.0 will introduce a feature that will allow you to keep your lines straight when drawing.

Best Regards,

Panagiotis 

Join us on Telegram

PanagiotisCharalampous  we can't wait to see it.  looking forward for. :) 

Thank you. 

 


@imrealfighter