0

I am using Amibroker ver5.97

Suppose I have a stock symbol DAS.G and EFS.XF. I would like to remove the substring after the dot (including dot itself) so that the output becomes DAS and EFS respectively.

How can this be done in AFL?

guagay_wk
  • 26,337
  • 54
  • 186
  • 295

1 Answers1

1

Try this Explore:

Substring = StrFind(Name(),".");
Length = StrLen(Name());
Position = Length - (Length-Substring) - 1;

if ( Substring ) 
{
Ticker=StrLeft( Name(), Position);
}
else
{
Ticker=Name();
}

Filter = 1;
AddTextColumn(Ticker,"Ticker");