Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Peter5510

Pages: [1]
1
General Discussion / Re: Help for change many symbol in the Dbase
« on: February 06, 2019, 11:25:51 pm »
Code: [Select]
// Before running this Javascript, please backup your database
// Backup = Just copy your database to another location
// Change the Qty inside the "for loop" to a small number for testing purpose
// If it works, change back to Qty
AB = new ActiveXObject("Broker.Application");
sts = AB.Stocks;
Qty = sts.Count;
for( i = 0; i < Qty; i++) {
var ticker_sym = sts(i).Ticker;
// Use Javascript substring function to extract last 3 characters from Ticker name
// For example BE_XXX, to get symbol XXX, must use postion 2 to the last position
var new_ticker_sym = ticker_sym.substring(2,ticker_sym.length);
var prefix_text = ticker_sym.substring(0,3);
if( prefix_text == "BE_" ) {
sts(i).Ticker = "some other prefix" + "_" + new_ticker_sym;
}
}

2
General Discussion / Re: AA Sorted (by price) stock sent to watchlist.
« on: February 06, 2019, 07:35:54 pm »
If you do not clear the old tickers from the watchlist, new tickers will be appended to the watchlist. You can try by comment out(//) the clear watchlist code.

3
General Discussion / Re: AA Sorted (by price) stock sent to watchlist.
« on: January 01, 2019, 09:26:02 pm »
Use this code to clear the watchlist before the exploration i.e. put it at the top of the AFL script.
Put the watchlist name that you intend to update in the place where indicated and include the double quotes.
Code: [Select]
//Get watchlist number for update
listnum = CategoryFind("Put your watchlist name here", categoryWatchlist);
// erase the watchlist when we process very first symbol
if ( Status( "stocknum" ) == 0 )
{
    // retrieve watchlist members
    oldlist = CategoryGetSymbols( categoryWatchlist, listnum );
    // iterate through the list and remove tickers
    for ( i = 0; ( sym = StrExtract( oldlist, i ) ) != ""; i++ )
    {
        CategoryRemoveSymbol( sym, categoryWatchlist, listnum );
    }
}
Your exploration script goes here. Use SetSortColumn(Column number) to sort your exploration results.
Column number is for the column that you intend to sort and it should be from 1 to any number.
Positive number for ascending order, and negative for descending.

Put the script for updating the watchlist after exploration here. Update your watchlist name.
Code: [Select]
if ( Filter ==1 ) {
for( i = 0; CategoryGetName( categoryWatchlist, i ) != ""; i++ ) {
if ( CategoryGetName( categoryWatchlist, i ) == "Your Watchlist name here" ) {
listnum = i;
}
}
if ( LastValue( Cum( Filter AND Status( "barinrange" ) ) )  )
CategoryAddSymbol( "", categoryWatchlist, listnum );
}

4
General Discussion / Re: How to create Format file, aqe file
« on: December 18, 2017, 10:30:54 pm »
Change your file in the following order....
$FORMAT TICKER,BOOK_VALUE_PER_SHARE,.....
$SEPARATOR ,
$SKIPLINES 1
$NOQUOTES 1

Save this file and name it e.g. fundamental.format in the Amibroker/Formats folder.

The next thing you must do is to add the following line in import.types file.
Fundamental Information (*.*)|*.*|fundamental.format

In Amibroker, go to File -> Import ASCII... select the file to import and select the file types in the drop down menu. Click Open
.

5
Amibroker Help / Re: amiquote
« on: December 18, 2017, 10:10:02 pm »
Yahoo Finance deprecated its API and new API uses unit time stamp, cookie and crump.
The latest version of AmiQuote can do the download.

6
Trading Resources / Re: Cleanup EOD Data util
« on: November 07, 2013, 03:01:24 am »
Hi Henry,
Alternatively, you can use MS Excel to cleanup your EOD data.
I can help you and the Excel macro.
Excel should work on Windows 8.

7
Introduction / Hi... manage to login after many attampts.
« on: November 07, 2013, 02:55:09 am »
Hi Admin,

I think the email activation is bugged. Here is what happened.
I registered as a member and proceed to activate my email. I tried to login and got an error message that my email is not activated. I tried reactivate my email and got a error message saying my email address is belonged to another members. In the final attempt, I changed my email address slightly and the reactivation went through.

So, I hope that admin will something so that potential new members not getting stuck at reactivation.

Thanks.

Pages: [1]