Page 1 of 2

Trend Line Helper

PostPosted: Tue Jun 09, 2015 4:51 am
by Apprentice
Trend Line Helper.png

Based on request.
viewtopic.php?f=27&t=62268

While you can argue this indicator does not have any practical value.
This indicator is designed to be used from within strategys.

Line is determined by two points.
Date And Level is set via indicator parameter sections.
Trend Line Helper.lua
(4.51 KiB) Downloaded 1083 times


The indicator was revised and updated

Re: Trend Line Helper

PostPosted: Wed Jun 10, 2015 2:11 pm
by zoltanh
Thanks a lot, Apprentice!! this is exactly what i need.. i can start putting this into strategies :)

Re: Trend Line Helper

PostPosted: Tue Jun 16, 2015 3:15 pm
by zoltanh
Hi Apprentice,

I seem struggling with this, I created the first strategy, which is a simple cross over/under of the line. When I want to run the strategy TS always says that the indicator cannot be found although it is imported. I think somehow the strategy cannot pull the indicator data. Could you help me having a look at this?
thanks!

Re: Trend Line Helper

PostPosted: Wed Jun 17, 2015 2:21 am
by Apprentice
Try this lines.
Code: Select all
assert(core.indicators:findIndicator("TREND LINE HELPER") ~= nil, "Please, download and install Trend Line Helper.LUA indicator");
TLH = core.indicators:create("TREND LINE HELPER", Level1, Date1, Level2, Date2, Extend );   


You must use uppercase when defined indicator calls.

Re: Trend Line Helper

PostPosted: Fri Jun 19, 2015 7:26 am
by zoltanh
Hi Apprentice, Big thank you again for your help!!!

Re: Trend Line Helper

PostPosted: Sat Jul 30, 2016 1:27 pm
by Cactus
I like this very much. The only trendline that can be used in a strategy indeed. Now, can the point level and point date be automatically definded by the past zig zag turning points?
With zig zag settings set by user also?

When zig zag turns from red (downtrend) to green (uptrend), make that point 1
When zig zag turns from green (uptrend) to red (downtrend), make that point 2
This would make an "uptrend" line, color = green

When zig zag turns from green (uptrend) to red (downtrend), make that point 1
When zig zag turns from red (downtrend) to green (uptrend), make that point 2
This would make a "downtrend" line, color = red

And to have multiple lines like this not just two, on all past zig zag points? But all independently named (up1, dn1, up2, dn2 etc)

I have something that made in Excel to detect zig zag swings from past historical data exported from marketscope "table" view with zigzag indicator applied, please see screenshot for formulas if they might be useful to help. Now the only thing is to take the date from that period too and the parameters can be populated. This indicator would gain much power this way.

Re: Trend Line Helper

PostPosted: Sat Jul 30, 2016 1:36 pm
by Cactus
Actually apart from what I explained it might be better if it plotted those lines from low to low and high to high. Like normal trendlines should be drawn... So there is no "up" or "down" trend. Just lines plotted on high to high zigzags and low to low zigzags CHEERS

Re: Trend Line Helper

PostPosted: Tue Aug 02, 2016 6:56 am
by Apprentice
Your request is added to the development list, Under Id Number 3582
If someone is interested to do this or any task other from list please contact me.

Re: Trend Line Helper

PostPosted: Sat Nov 05, 2016 7:59 pm
by Cactus
I managed to achieve what I described in above posts using a macro to input the points and date data from Excel into multiple instances of Trend Line Helper on the chart.

The problem is, the lines will not show until sufficient candlesticks are shown on the screen. Can this be fixed to still show the lines even if date is out of range for current view?

For example, when having the chart set to 1 minute timeframe, one cannot scroll past back to year 2010 for example. So if I add a trendline that should show up today, but the points are defined back in 2010, the indicator will stay blank until it "sees" that data on chart, only then it will draw a line with "extend" set to yes... So my question is, can it still work without me having to zoom out all the chart? Sometimes it's impossible, such as with "1 minute" data... It's only possible to zoom out so far with 1m view in backtester chart. Thanks

Re: Trend Line Helper

PostPosted: Mon Nov 07, 2016 6:13 am
by Apprentice
Can you share excel / code.