Posted by yuvaltaylor at May 18, 2022 10:19:26 AM
Re: International Breath, Industry Breath
The formula for market breadth (don't forget the d in breadth or else it means something totally different!) is simply

(FSum("Close(0)/Close(21)>1",#scopeparameter)-FSum("Close(0)/Close(21)<1",#scopeparameter))/FSum("Close(0)/Close(21)<>NA",#scopeparameter

Now unfortunately, we don't have a scope parameter for country (yet) in stocks. So the only way to get this for countries is to use the Country command and then use #previous as your scope parameter. For example, to get the market breadth for the US, you'd use the following commands:

country("usa")
showvar(@breadth,(FSum("Close(0)/Close(21)>1",#previous)-FSum("Close(0)/Close(21)<1",#previous))/FSum("Close(0)/Close(21)<>NA",#previous))

With ETFs, however, you can specify the country as a parameter, using #country.

You can also do this with industries and sectors using #industry and #sector, and so on.

We will consider introducing #country as a scope parameter for stocks.
----------------------------------------
Yuval Taylor
Product Manager, Portfolio123
invest(igations)
Any opinions or recommendations in this message are not opinions or recommendations of Portfolio123 Securities LLC.