Trendline Robot

Created at 24 Jul 2013, 13:02
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!
Delta_Gamma's avatar

Delta_Gamma

Joined 02.06.2013

Trendline Robot
24 Jul 2013, 13:02


Hi,


Is it possible to create a robot that buys when price crosses below or on a trendline LOW and sells when price crosses above or on a trendline HIGH? I see we have the trendline indicator as referenced here: /forum/whats-new/913
 but I have no idea how one uses these values, I've tried several times to use the Highs and Lows of the trendline indicator to no avail. Can anyone help me with this?


I am a strong believer in trend trading and as such I would love to find a way to automate trendline trades.

 

Thanks.


@Delta_Gamma
Replies

cAlgo_Fanatic
24 Jul 2013, 16:46

The code of that indicator does not output the values of the trendlines into an IndiatorDataSeries but draws the lines using ChartObjects.DrawLine.
Look at the Sample Trend Robot in the platform for an example on how you could utilize a trend indicator in a Robot.


@cAlgo_Fanatic

Delta_Gamma
24 Jul 2013, 21:06

RE:
cAlgo_Fanatic said:

The code of that indicator does not output the values of the trendlines into an IndiatorDataSeries but draws the lines using ChartObjects.DrawLine.
Look at the Sample Trend Robot in the platform for an example on how you could utilize a trend indicator in a Robot.

Hi,

is there any way to output that ChartObjects.DrawLine into a dataseries or at least access the maximum and minimum values (red)?

What I mean is, can that code be rewritten to use a Dataseries or is it not possible due to the dynamic nature of the trendline?

~The Sample Trend Robot unfortunately isn't specific enough as it uses a moving average cross technique and not a trendline.

Thanks for the help,


@Delta_Gamma