Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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