Nick
January 31, 2018, 7:52pm
#1
I got a list of symbols and circulating supply (like shares) from the coinmarketcap API list of cryptocurrencies:
https://api.coinmarketcap.com/v1/ticker/?convert=USD&limit=100
Here´s the updated list after matching the symbols to the yahoo database:
www.mediafire.com/file/67bzo88rs14dsp2
I´m trying to get a market cap filter (shares x daily close) of the top 10 coins in AFL code for backtests.
The txt file is stored locally in c:/data/crypto 100 - shares 4 mcap.txt
Can someone please help?
PanoS
February 1, 2018, 3:30am
#2
Hello Nick
Is the file you upload has Shares outstanding or Shares Float?
You can use this to import shares data from external source
for Shares outstanding
# Import SHARES_OUT from a Ascii File comma separated. (Shares outstanding)
# https://api.coinmarketcap.com/v1/ticker/?convert=USD&limit=100
# https://api.coinmarketcap.com/v1/ticker/?convert=GBP&limit=100
$NOQUOTES 1
$AUTOADD 1
$OVERWRITE 1
$SEPARATOR ,
$FORMAT TICKER,SHARES_OUT
NOTE: for the new users above code is NOT an afl but is an xxx.format
More info in the manual
Import from ASCII file - AmiBroker
Using Fundamental data - AmiBroker
2 Likes
PanoS
February 1, 2018, 2:09pm
#3
This article explains all the required steps.
How to create custom import definition for ASCII importer
1 Like
Nick
February 1, 2018, 7:31pm
#4
Hi PanoS and thank you very much for your reply.
I´ve tested it but something is not working. I´m getting tickers mixed with the shares outstanding:
Any ideas?
1 Like
PanoS
February 1, 2018, 7:54pm
#5
yes . that is true as i think your file has a TAB and not comma
i did wrote above << Import SHARES_OUT from a Ascii File comma separated. >>
$SEPARATOR ,
Edit:
If you drag and drop your file in EXCEL is automatic made two columns, then save it As csv comma separated.
or just open it with a notepad and replace tab with comma ","
1 Like
Nick
February 1, 2018, 8:43pm
#6
Ahh, sorry. Is working now:
Now, how can we add the mentioned mcap filter (to use only the top 10 symbols)?
I´m trying to define it first, but I don´t know how to call the SHARES_OUT variable.
teyano
February 1, 2018, 8:53pm
#7
1 Like
PanoS
February 1, 2018, 8:53pm
#8
hi
Have you read my second link in the first post?
Using Fundamental data - AmiBroker
printf( "\n"+Name()+": market Cap \t"+ Close * GetFnData( "SharesOut" ) +"\n\n");
1 Like
Nick
February 1, 2018, 9:06pm
#9
Ahh, Perfect..
Knowing these things takes my noob coding to the next level.
Thank you very much. I appreciate it.
PanoS
February 1, 2018, 9:31pm
#10
I predicted the 6.000 mark. i can see this movement happening, what do you guys think?
Nick
February 1, 2018, 9:39pm
#11
Is bouncing from the .618 fib right now. Also bouncing from the trendline. That´s my opinion.
I got one last question about this issue. I´ve only used rankings in explorations.
How to do the rank filter (top 10) properly? Here´s the current mcap variable:
MarketCap = Close * GetFnData( "SharesOut" );
PanoS
February 1, 2018, 10:09pm
#12
Ops Nick sorry i didnt need to do any rank before, but i think is easy.
also this forum must have examples.
and here
http://www.amibroker.com/kb/index.php?s=rank
1 Like