0 registered members (),
1,173
guests, and 0
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Live trading doesn't work correctly
#475876
01/11/19 12:29
01/11/19 12:29
|
Joined: Dec 2018
Posts: 22 VN
Chuate
OP
Newbie
|
OP
Newbie
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 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:
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: AndrewAMD]
#475905
01/13/19 01:30
01/13/19 01:30
|
Joined: Dec 2018
Posts: 22 VN
Chuate
OP
Newbie
|
OP
Newbie
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,729 Chicago
AndrewAMD
Serious User
|
Serious User
Joined: Feb 2017
Posts: 1,729
Chicago
|
|
|
|
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
Chuate
OP
Newbie
|
OP
Newbie
Joined: Dec 2018
Posts: 22
VN
|
Hi, this is live chart after I run 2 minutes. Also, in the beginning, Zorro show: 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: Petra]
#475910
01/13/19 02:22
01/13/19 02:22
|
Joined: Dec 2018
Posts: 22 VN
Chuate
OP
Newbie
|
OP
Newbie
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:
|
|
|
|