Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Nymphodora), 490 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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