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
3 registered members (VoroneTZ, monk12, Quad), 829 guests, and 4 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
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: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
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: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
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: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
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: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
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"


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1