Louis Krupp wrote:
> Does it work? If so, congratulations! If not, please post your code
> and your results.
> Louis
------------------------------------------------
code written in AFL language (Amibroker Formula Language)
[
https://www.amibroker.com/guide/AFL.html]
AB = CreateObject("Broker.Application");
sts = AB.Stocks();
Qty = sts.Count;
for( i = Qty - 1; i >= 0; i = i - 1 )
{
st = sts.Item( i );
Ticker = st.Ticker;
printf("changing " + Ticker + "\n" );
Length = StrLen(Ticker );
if( StrFind(Ticker, "TO:") )
st.Ticker= "TC-"+StrRight(Ticker,Lenght+3);
}
-------------------------------------------------------------
haven't a code result.
The result is in the symbol changed on my database on the screen.
...and the results are 2 errors:
[1]. change only 1 symbol a time (every time i click "apply") and I think
it's a "FOR Cycle" problem.
[2]. Example: I have a list symbols on the left side [below] -----> and the
result in the symbols modified [every time I click apply script] in the
right side.
TO:A TC-T:A [wrong]
TO:DE TC-:DE [wrong]
TO:ASD TC-ASD OK <<<<<<< Thats OK (I want this)
TO:AXMA TC-XMA [Wrong]
TO:ERJTT TC-JTT [wrong]
I want to change in this case "ONLY" the "TO:" [or in other case the part of
string that I want to change from the first chacacter on the left] leaving