Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
Deeplearning Script
by wolfi. 02/26/24 12:46
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/22/24 16:22
AssetAdd() vs. modern asset list?
by jcl. 02/21/24 15:01
How many still using A8
by Aku_Aku. 02/20/24 12:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 521 guests, and 6 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