Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
4 registered members (AndrewAMD, fogman, Grant, juanex), 972 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Do not plot parts of curve below a certain value? #468132
09/19/17 14:15
09/19/17 14:15
Joined: Sep 2017
Posts: 235
H
Hredot Offline OP
Member
Hredot  Offline OP
Member
H

Joined: Sep 2017
Posts: 235
Let's say I want to plot only the values of a series that are above a certain value. Is there a way to tell the plot function to not plot the parts I do not want to see?

Re: Do not plot parts of curve below a certain value? [Re: Hredot] #468133
09/19/17 15:19
09/19/17 15:19
Joined: Feb 2017
Posts: 1,634
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,634
Chicago
Like this?
Code:
// Chirp cutoff ///////////////////

function run()
{
	BarPeriod = 60;
	MaxBars = 1000;
	LookBack = 100;
	asset(""); // dummy asset
	ColorUp = ColorDn = 0; // don't plot a price curve
	PlotHeight1 = PlotHeight2 = 200;
	PlotWidth = 800;
	set(PLOTNOW);
	
	vars Chirp = series(genSine(5,60));
	int Color = BLACK;
	plot("ChirpBefore",Chirp[0],0,Color);
	if(Chirp[0]>0.5)plot("ChirpAfter",Chirp[0],NEW,Color);
}


Re: Do not plot parts of curve below a certain value? [Re: AndrewAMD] #468135
09/19/17 17:02
09/19/17 17:02
Joined: Sep 2017
Posts: 235
H
Hredot Offline OP
Member
Hredot  Offline OP
Member
H

Joined: Sep 2017
Posts: 235
Oh, I see! The plot routines draw live, a pixel each run().
Good to know, thank you for the explanation!


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1