Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (vicknick, howardR, sleakz), 674 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Fractal-Based Trendlines #465146
04/05/17 13:15
04/05/17 13:15
Joined: Mar 2017
Posts: 15
edu Offline OP
Newbie
edu  Offline OP
Newbie

Joined: Mar 2017
Posts: 15
Hi!

I am trying to display trendlines, that join the two last fractals.
I created a static var, that joins the last fractals, but it does not join the points diagonally, but takes the last non-zero fractal value. Any idea?

Here's the code:

function run()
{
set(PLOTNOW);
StartDate = EndDate = 2010;

var FH = FractalHigh(series(price()),5);

if (FH>0 or FH<0) plot("FH", FH, DOT, GREEN);

static var TrendLine; if(FH>0 or FH<0) {TrendLine = FH;}
plot("TrendLine", TrendLine, LINE, PURPLE);
}

Re: Fractal-Based Trendlines [Re: edu] #465401
04/24/17 17:28
04/24/17 17:28
Joined: Mar 2017
Posts: 15
edu Offline OP
Newbie
edu  Offline OP
Newbie

Joined: Mar 2017
Posts: 15

I get a line that connects the green dots as in steps, any idea about how to connect dots with a straight line?

Here's what I get:
https://drive.google.com/file/d/0Byj3F1NtSWtLOHJrUkR2ZjhtNms/view?usp=sharing

Re: Fractal-Based Trendlines [Re: edu] #465420
04/26/17 12:41
04/26/17 12:41
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
You can find an example in indicators.c, look for the code of the ZigZag indicator.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1