Gamestudio Links
Zorro Links
Newest Posts
Where's the Wiki?
by Quad. 06/25/19 22:16
Published Gamestudio Games?
by Dooley. 06/25/19 16:59
Updating to A8 [SOLVED]
by Dooley. 06/25/19 16:00
Message from IB of open position
by Zheka. 06/25/19 13:58
FXCM: "Can't connect to price server"
by riinvest. 06/25/19 10:35
New Zorro version 2.12
by jcl. 06/25/19 09:42
Aum120 is ready
by Emre. 06/24/19 17:54
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
5 registered members (JeyKey II, wdlmaster, alibaba, jenGs, kvm), 574 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Theaisback, redye, rhe2564, Qw3rty, Dal
18239 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Live trading doesn't work correctly #475876
01/11/19 12:29
01/11/19 12:29
Joined: Dec 2018
Posts: 22
VN
C
Chuate Offline OP
Newbie
Chuate  Offline OP
Newbie
C

Joined: Dec 2018
Posts: 22
VN
Hello,
The image tell everything.

Zorro say price > ema50,80, 220 while price in Binance < ema50, 80 and 220. All ema value is different. So, can you show me what is problem ?


In the log file, I see most recent 200 price is same
Quote:
0.000006850. Price[0], Price[1], Price[2],... Price[n] is same. So I think that is reason why the ema50 and 80 is 00000685.

[495: Fri 19-01-11 12:15] (0.000006850)
price: 0.00000685, EMA5: 0.00000685, ema80 : 0.00000685, ema220: 0.00000670
price > ema 50
price > ema 80
price > ema 220
[496: Fri 19-01-11 12:15] (0.000006850)
price: 0.00000685, EMA5: 0.00000685, ema80 : 0.00000685, ema220: 0.00000670
price > ema 50
price > ema 80
price > ema 220
[497: Fri 19-01-11 12:15] (0.000006850)
price: 0.00000685, EMA5: 0.00000685, ema80 : 0.00000685, ema220: 0.00000670
price > ema 50
price > ema 80
price > ema 220
[498: Fri 19-01-11 12:15] (0.000006850)
price: 0.00000685, EMA5: 0.00000685, ema80 : 0.00000685, ema220: 0.00000670
price > ema 50
price > ema 80
price > ema 220
[499: Fri 19-01-11 12:15] (0.000006850)
price: 0.00000685, EMA5: 0.00000685, ema80 : 0.00000685, ema220: 0.00000670
price > ema 50
price > ema 80
price > ema 220

End of lookback period

[500: Fri 19-01-11 12:20] (0.000006870)
price: 0.00000687, EMA5: 0.00000685, ema80 : 0.00000685, ema220: 0.00000670
price > ema 50
price > ema 80
price > ema 220
[501: Fri 19-01-11 12:25] (0.000006850)
price: 0.00000685, EMA5: 0.00000685, ema80 : 0.00000685, ema220: 0.00000671
price > ema 220


This is code I use:

Code:
function run()
{
	
	set(PLOTNOW|PARAMETERS);
   asset("TRXBTC");
	BarPeriod = 5;
	UnstablePeriod = 250;
	LookBack = 250+UnstablePeriod;
	Weekend = 0;
	
	vars Price = series(priceClose());
	vars ema50 = series(EMA(Price, 50));
	vars ema80 = series(EMA(Price, 80));
	vars ema220 = series(EMA(Price, 220));

		char message[300];
		sprintf(message,"n price: %.8f, EMA5: %.8f, ema80 : %.8f, ema220: %.8f", (var)Price[0], (var)ema50[0], (var)ema80[0], (var)ema220[0]);
		printf(message);
		if (Price[0] > ema50[0]) printf(" n price > ema 50");
		if (Price[0] > ema80[0]) printf("n price > ema 80");
		if (Price[0] > ema220[0]) printf("n price > ema 220");
		//enterLong();



	plot("ema50", ema50, MAIN, BLUE);
	plot("ema80", ema80, MAIN, RED);
	plot("ema220", ema220, MAIN, BLACK);
}


Last edited by Chuate; 01/12/19 02:28.
Re: Live trading doesn't work correctly [Re: Chuate] #475903
01/13/19 00:33
01/13/19 00:33
Joined: Dec 2018
Posts: 22
VN
C
Chuate Offline OP
Newbie
Chuate  Offline OP
Newbie
C

Joined: Dec 2018
Posts: 22
VN
No one haven't faced this problem ?

Re: Live trading doesn't work correctly [Re: Chuate] #475904
01/13/19 00:53
01/13/19 00:53
Joined: Feb 2017
Posts: 664
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 664
Chicago
Try plotting your data so you can see what your indicators are doing.

Re: Live trading doesn't work correctly [Re: AndrewAMD] #475905
01/13/19 01:30
01/13/19 01:30
Joined: Dec 2018
Posts: 22
VN
C
Chuate Offline OP
Newbie
Chuate  Offline OP
Newbie
C

Joined: Dec 2018
Posts: 22
VN
yes, it worked incorrectly but don't know how to fix it

Last edited by Chuate; 01/13/19 01:30.
Re: Live trading doesn't work correctly [Re: Chuate] #475906
01/13/19 01:36
01/13/19 01:36
Joined: Feb 2017
Posts: 664
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 664
Chicago
Plot with Zorro.

Re: Live trading doesn't work correctly [Re: AndrewAMD] #475907
01/13/19 01:59
01/13/19 01:59
Joined: Dec 2018
Posts: 22
VN
C
Chuate Offline OP
Newbie
Chuate  Offline OP
Newbie
C

Joined: Dec 2018
Posts: 22
VN
Hi, this is live chart after I run 2 minutes. Also, in the beginning, Zorro show:
Quote:
V 2.014 on Sun 19-01-13 08:54:02 (Zorro S Subscription)
Load TRXBTC prices.. 501 min, gap 122 h, 227 bars added


Why 122h gap ?



and this Binance chart:

Last edited by Chuate; 01/13/19 02:01.
Re: Live trading doesn't work correctly [Re: Chuate] #475908
01/13/19 02:10
01/13/19 02:10
Joined: Apr 2008
Posts: 238
Petra Offline
Member
Petra  Offline
Member

Joined: Apr 2008
Posts: 238
It looks like missing price history. You can see this from "gap" warning and the jump between the last history price and the first live price. Probably your history is very old. EMA does not work with no history.

What history do you use?

Re: Live trading doesn't work correctly [Re: Petra] #475910
01/13/19 02:22
01/13/19 02:22
Joined: Dec 2018
Posts: 22
VN
C
Chuate Offline OP
Newbie
Chuate  Offline OP
Newbie
C

Joined: Dec 2018
Posts: 22
VN
Hello Petra,

I don't understand why it need history price from my side. When I trade live, it will get history price from Binance ?

Anyway, this is my Asset list:

Re: Live trading doesn't work correctly [Re: Chuate] #475915
01/13/19 21:19
01/13/19 21:19
Joined: Apr 2008
Posts: 238
Petra Offline
Member
Petra  Offline
Member

Joined: Apr 2008
Posts: 238
I dont know if binance has history, but many exchanges have not, better use the history from bittrex or cryptocompare. You have also no TRX in your assetlist.

Re: Live trading doesn't work correctly [Re: Petra] #475932
01/14/19 13:49
01/14/19 13:49
Joined: Dec 2018
Posts: 22
VN
C
Chuate Offline OP
Newbie
Chuate  Offline OP
Newbie
C

Joined: Dec 2018
Posts: 22
VN
Thank you Petra laugh
I downloaded historical data from CryptoCompare then use PRELOAD flag then it worked. Also change "xxxxxx.t6" to "xxxxxx_2019.t6"


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