Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.2.0 Released
by DdlV. 12/01/21 18:04
Oanda LotAmount in Trade Mode
by JayWilly. 12/01/21 15:08
Price of entry with OrderDelay
by Zheka. 11/30/21 09:56
Issues with Binance Futures Plugin v1.0.2.9
by degenerate_762. 11/30/21 09:03
Lapsa's very own thread
by Lapsa. 11/29/21 00:56
Basic Time Windowed profit taking
by Petra. 11/28/21 07:38
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 11/27/21 15:02
Should be possible
by AndrewAMD. 11/27/21 14:56
AUM Magazine
Latest Screens
Tactics of World War I
Hecknex World
Scheherazade's Journey
Paradox Vector
Who's Online Now
5 registered members (degenerate_762, jack800, AndrewAMD, Quad, 3run), 512 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
allelxr, dcointrade, mcyr, AlgOz, Dark_Saber
18710 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 9 1 2 3 4 5 6 7 8 9
Re: Lapsa's very own thread [Re: Lapsa] #484186
09/18/21 18:18
09/18/21 18:18
Joined: Aug 2021
Posts: 110
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 110
some turbulence

didn't take profit but to be fair - I would have kept it open too

did expect a dump

[Linked Image]

so far so good

Re: Lapsa's very own thread [Re: Lapsa] #484193
09/20/21 06:59
09/20/21 06:59
Joined: Aug 2021
Posts: 110
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 110
and the wish has been granted. back to square #1

[Linked Image]

Re: Lapsa's very own thread [Re: Lapsa] #484205
09/20/21 23:07
09/20/21 23:07
Joined: Aug 2021
Posts: 110
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 110
hurrr durrr evergrande

Re: Lapsa's very own thread [Re: Lapsa] #484214
09/21/21 20:53
09/21/21 20:53
Joined: Aug 2021
Posts: 110
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 110
Found an equivalent of Ehler's Pearson correlation calculation to Zorro's in built Correlation.

Mental model is still quite muddy but as it seems - this may be kind of huge.

If Ehler is wrong (or my translation thereof) - this might trim whole bar of lag.

Code
for (count = 0; count < M - 1; count++) {


It's unclear to me why original script has `count < M - 1` instead of just `count < M`.



Code
#include <profile.c>

var Corr(var* Close)
{
	var AvgLength = 0;
	var M;
	var X;
	var Y;
	var Lag;
	var count;
	var Sx;
	var Sy;
	var Sxx;
	var Syy;
	var Sxy;

	var Corr[48];

	var* HP = series(HighPass2(Close, 48), 50);
	var* Filt = series(Smooth(HP, 10), 50);

	//Pearson correlation for each value of lag
	for (Lag = 0; Lag < 48; Lag++) {		
		//Set the averaging length as M
		M = AvgLength;
		if (AvgLength == 0) M = Lag;
		Sx = 0;
		Sy = 0;
		Sxx = 0;
		Syy = 0;
		Sxy = 0;
		
		for (count = 0; count < M; count++) {
			X = Filt[count];
			Y = Filt[Lag + count];
			Sx = Sx + X;
			Sy = Sy + Y;
			Sxx = Sxx + X*X;
			Sxy = Sxy + X*Y;
			Syy = Syy + Y*Y;
		}
		
		if ( (M*Sxx - Sx*Sx)*(M*Syy - Sy*Sy) > 0 ) {
			Corr[Lag] = (M*Sxy - Sx*Sy)/sqrt((M*Sxx-Sx*Sx)*(M*Syy-Sy*Sy));
		}

	}
	return Corr[3];
}
function run()
{
	set(NFA|PLOTNOW);
	StartDate = 20210903;
	EndDate = 20210903;
	Outlier = 0;
	BarPeriod = 1;
	LookBack = 100;
	BarMode = BR_FLAT;

	Verbose = 2;
	
	var* Close = series(priceClose());

	var* x = series(Corr(Close));
	
	var* HP = series(HighPass2(Close, 48), 50);
	var* Filt = series(Smooth(HP, 10), 50);
	
	var y = Correlation(Filt, Filt+3, 3);

	plot("x", x, NEW, RED);
	plot("y", y, END, BLUE);
}


[Linked Image]



Feeling too dumb to figure it out.

Last edited by Lapsa; 09/21/21 21:21.
Re: Lapsa's very own thread [Re: Lapsa] #484215
09/22/21 00:28
09/22/21 00:28
Joined: Aug 2021
Posts: 110
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 110
Please, stay above the water.

I'm not even asking gazillion profits.

Quote

Monte Carlo Analysis... Median AR 436%
Win 32.16$ MI 6.80$ DD 5.22$ Capital 22.59$
Trades 319 Win 55.8% Avg +144.0p Bars 648
AR 361% PF 1.84 SR 0.00 UI 0% R2 1.00


------------

yeah but no...319 trades only...
curve fitting too stronk

Last edited by Lapsa; 09/27/21 21:41.
Re: Lapsa's very own thread [Re: Lapsa] #484239
09/24/21 09:52
09/24/21 09:52
Joined: Aug 2021
Posts: 110
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 110
[Linked Image]

for a change - I'm on a right side

Last edited by Lapsa; 09/24/21 09:52.
Re: Lapsa's very own thread [Re: Lapsa] #484258
09/26/21 21:08
09/26/21 21:08
Joined: Aug 2021
Posts: 110
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 110
newest strategy name: "usyk"

has to be a winner

Re: Lapsa's very own thread [Re: Lapsa] #484263
09/27/21 21:38
09/27/21 21:38
Joined: Aug 2021
Posts: 110
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 110
smooth price close on 6 periods

pull out 3 period long RSIS out of it

do nothing unless rsis[0] != rsis[1]

boom! 172% -> 453%

makes no sense whatsoever

Re: Lapsa's very own thread [Re: Lapsa] #484264
09/27/21 23:28
09/27/21 23:28
Joined: Feb 2017
Posts: 1,351
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,351
Chicago
Originally Posted by Lapsa
makes no sense whatsoever
Usually a red flag.

Re: Lapsa's very own thread [Re: AndrewAMD] #484266
09/28/21 06:37
09/28/21 06:37
Joined: Aug 2021
Posts: 110
L
Lapsa Offline OP
Member
Lapsa  Offline OP
Member
L

Joined: Aug 2021
Posts: 110
Originally Posted by AndrewAMD
Originally Posted by Lapsa
makes no sense whatsoever
Usually a red flag.


yes and no

I mean - what such mechanism does is sort of understandable

it helps to follow trend

x3 difference it makes is what I find... err... quite peculiar

and it's not like there's 10 lucky trades.
think it was like 3k trades over 5 month period or something

Page 4 of 9 1 2 3 4 5 6 7 8 9

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