Referencing a Hand Drawn Trend Line via Calgo
Referencing a Hand Drawn Trend Line via Calgo
24 Mar 2022, 01:05
Hey Guys,
Do you know if it's possible to reference a manually drawn trend line via a cBot?
I'm not looking to use Calgo to create the trend lines, just to reference them for alerts.
Thanks in advance,
Replies
MTrade12
24 Mar 2022, 14:05
RE:
amusleh said:
Hi,
What do you mean by referencing them?
You have access to all chart objects and the events like object added/removed/updated.
If you want to draw trend line on chart you can do it with Char.DrawTrendLine method.
Here are some examples:
cAlgo API Reference - Chart Interface (ctrader.com)
cAlgo API Reference - ChartArea Interface (ctrader.com)
cAlgo API Reference - ChartTrendLine Interface (ctrader.com)
Hi amusleh!
Sorry, i realise now i could've been clearer in what i meant!
Let's say I want to manually draw a horizontal line on GBPCHF chart at 1.2265.
By default, my manually drawn horizontal line is called "Horizontal Line 1", and each subsequent line is "Horizontal Line +1".
Am i able using Calgo, to identify "Horizontal Line 1", and if so, can then obtain the price or X Value of it?
Hope that clarfies!
@MTrade12
amusleh
24 Mar 2022, 14:17
RE: RE:
MTrade12 said:
amusleh said:
Hi,
What do you mean by referencing them?
You have access to all chart objects and the events like object added/removed/updated.
If you want to draw trend line on chart you can do it with Char.DrawTrendLine method.
Here are some examples:
cAlgo API Reference - Chart Interface (ctrader.com)
cAlgo API Reference - ChartArea Interface (ctrader.com)
cAlgo API Reference - ChartTrendLine Interface (ctrader.com)
Hi amusleh!
Sorry, i realise now i could've been clearer in what i meant!
Let's say I want to manually draw a horizontal line on GBPCHF chart at 1.2265.
By default, my manually drawn horizontal line is called "Horizontal Line 1", and each subsequent line is "Horizontal Line +1".
Am i able using Calgo, to identify "Horizontal Line 1", and if so, can then obtain the price or X Value of it?
Hope that clarfies!
Hi,
Yes, you can.
Use chart object comments for objects identification.
Check my previous post links, there you can find examples.
@amusleh
amusleh
24 Mar 2022, 09:11
Hi,
What do you mean by referencing them?
You have access to all chart objects and the events like object added/removed/updated.
If you want to draw trend line on chart you can do it with Char.DrawTrendLine method.
Here are some examples:
cAlgo API Reference - Chart Interface (ctrader.com)
cAlgo API Reference - ChartArea Interface (ctrader.com)
cAlgo API Reference - ChartTrendLine Interface (ctrader.com)
@amusleh