Friday, December 3, 2021

The Complete MQTT Broker Selection Guide

 https://www.catchpoint.com/network-admin-guide/mqtt-broker

mosquitto

 https://github.com/eclipse/mosquitto

my Guru 2

 https://lms.onnocenter.or.id/wiki/index.php/MQTT:_install_di_Ubuntu_20.04

Thursday, November 25, 2021

Error: Unable to load CA certificates on Mosquitto Broker Server

1637245173: Error: Unable to load CA certificates. Check cafile "/etc/letsencrypt/live/10.0.36.50/chain.pem".

1637245173: Error: Unable to load server certificate "/etc/letsencrypt/live/10.0.36.50/cert.pem". Check certfile.

1637245173: OpenSSL Error[0]: error:02001002:system library:fopen:No such file or directory

1637245173: OpenSSL Error[1]: error:20074002:BIO routines:file_ctrl:system lib

1637245173: OpenSSL Error[2]: error:140DC002:SSL routines:use_certificate_chain_file:system lib




Mosquitto man page

 https://mosquitto.org/man/mosquitto-8.html

Friday, March 5, 2021

Peter Lynch's 25 Golden Rules for Investing

 Rule 1: Investing is fun and exciting, but dangerous if you don't do any work.

Rule 2: Your investor's edge is not something you get from Wall Street experts. It's something you already have. You can outperform the experts if you use your edge by investing in companies or industries you already understand.

Rule 3: Over the past 3 decades, the stock market has come to be dominated by a herd of professional investors. Contrary to popular belief, this makes it easier for the amateur investor. You can beat the market by ignoring the herd.

Rule 4: Behind every stock is a company. Find out what it's doing.

Rule 5: Often, there is no correlation between the success of a company's operations and the success of its stock over a few months or even a few years. In the long term, there is a 100% correlation between the success of the company and the success of its stock. This disparity is the key to making money; it pays to be patient, and to own successful companies.

Rule 6: You have to know what you own, and why you own it. "This baby is a cinch to go up" doesn't count.

Rule 7: Long shots almost always miss the mark.

Rule 8: Owning stocks is like having children — don't get involved with more than you can handle. The part-time stockpicker probably has time to follow 8-12 companies, and to buy and sell shares as conditions warrant. There don't have to be more than 5 companies in the portfolio at any one time.

Rule 9: If you can't find any companies that you think are attractive, put your money in the bank until you discover some.

Rule 10: Never invest in a company without understanding its finances. The biggest losses in stocks come from companies with poor balance sheets. Always look at the balance sheet to see if a company is solvent before you risk your money on it.

Rule 11: Avoid hot stocks in hot industries. Great companies in cold, non growth industries are consistent big winners.

Rule 12: With small companies, you are better off to wait until they turn a profit before you invest.

Rule 13: If you are thinking of investing in a troubled industry, buy the companies with staying power. Also, wait for the industry to show signs of revival. Buggy whips and radio tubes were troubled industries that never came back.

Rule 14: If you invest $1000 in a stock, all you can lose is $1000, but you stand to gain $10,000 or even $50,000 over time if you are patient. The average person can concentrate on a few good companies, while the fund manager is forced to diversify. By owning too many stocks, you lose this advantage of concentration. It only takes a handful of big winners to make a lifetime of investing worthwhile.

Rule 15: In every industry and every region of the country, the observant amateur can find great growth companies long before the professionals have discovered them.

Rule 16: A stock market decline is as routine as a January blizzard in Colorado. If you are prepared, it can't hurt you. A decline is a great opportunity to pick up the bargains left behind by investors who are fleeing the storm in panic.

Rule 17: Everyone has the brainpower to make money in stocks. Not everyone has the stomach. If you are susceptible to selling everything in a panic, you ought to avoid stocks and stock mutual funds altogether.

Rule 18: There is always something to worry about. Avoid weekend thinking and ignore the latest dire predictions of the newscasters. Sell a stock because the company's fundamentals deteriorate, not because the sky is falling.

Rule 19: Nobody can predict interest rates, the future direction of the economy, or the stock market, Dismiss all such forecasts and concentrate on what's actually happening to the companies in which you have invested.

Rule 20: If you study 10 companies, you will find 1 for which the story is better than expected. If you study 50, you'll find 5. There are always pleasant surprises to be found in the stock market — companies whose achievements are being overlooked on Wall Street.

Rule 21: If you don't study any companies, you have the same success buying stocks as you do in a poker game if you bet without looking at your cards.

Rule 22: Time is on your side when you own shares of superior companies. You can afford to be patient — even if you missed Wal-Mart in the first five years, it was a great stock to own in the next five years. Time is against you when you own options.

Rule 23: If you have the stomach for stocks, but neither the time nor the inclination to do the homework, invest in equity mutual funds. Here, it's a good idea to diversify. You should own a few different kinds of funds, with managers who pursue different styles of investing: growth, value small companies, large companies etc. Investing the six of the same kind of fund is not diversification.

Rule 24: Among the major stock markets of the world, the U.S. market ranks 8th in total return over the past decade. You can take advantage of the fastergrowing economies by investing some portion of your assets in an overseas fund with a good record.

Rule 25: In the long run, a portfolio of well-chosen stocks and/or equity mutual funds will always outperform a portfolio of bonds or a money-market account. In the long run, a portfolio of poorly chosen stocks won't outperform the money left under the mattress.

Thursday, March 4, 2021

Gann's 28 Trading Rules

 The Rules given below are based upon W. D. Gann's experience :

1. Amount of capital to use: Divide your capital into 10 equal parts and never risk more than one-tenth of your capital on any one trade.

2. Use stop loss orders. Always protect a trade when you make it with a stop loss order.

3. Never overtrade. This would be violating your capital rules.

4. Never let a profit run into a loss. After you once have a profit (...), raise your stop loss order so that you will have no loss of capital.

5. Do not buck the trend. Never buy or sell if you are not sure of the trend according to your charts and rules.

6. When in doubt, get out, and don't get in when in doubt.

7. Trade only in active markets. Keep out of slow, dead ones.

8. Equal distribution of risk. Trade in two or three different commodities, if possible. Avoid tying up all your capital in any one commodity.

9. Never limit your orders or fix a buying or selling price. Trade at the market.

10. Don't close your trades without a good reason. Follow up with a stop loss order to protect your profits.

11. Accumulate a surplus. After you have made a series of successful trades, put some money into a surplus account to be used only in emergency or in time of panic.

12. Never buy or sell just to get a scalping profit.

13. Never average a loss. This is one of the worst mistakes a trader can make.

14. Never get out of the market just because you have lost patience or get into the market because you are anxious from waiting.

15. Avoid taking small profits and big losses.

16. Never cancel a stop loss order after you have placed it at the time you make a trade.

17. Avoid getting in and out of the market too often. 

18. Be just as willing to sell short as you are to buy. Let your object be to keep with the trend and make money.

19. Never buy just because the price of a commodity is low or sell short just because the price is high.

20. Be careful about pyramiding at the wrong time. Wait until the commodity is very active and has crossed Resistance Levels before buying more and until it has broken out of the zone of distribution before selling more.

21. Select the commodities that show strong uptrend to pyramid on the buying side and the ones that show definite downtrend to sell short.

22. Never hedge. If you are long of one commodity and it starts to go down, do not sell another commodity short to hedge it. Get out of the market; take your loss and wait for another opportunity.

23. Never change your position in the market without a good reason. When you make a trade, let it be for some good reason or according to some definite rule; then do not get out without a definite indication of a change in trend.

24. Avoid increasing your trading after a long period of success or a period of profitable trades.

25. Don't guess when the market is top. Let the market prove it is top. Don't guess when the market is bottom. Let the market prove it is bottom. By folllowing definite rules, you can do this.

26. Do not follow another man's advice unless you know that he knows more than you do.

27. Reduce trading after first loss; never increase.

28. Avoid getting in wrong and out wrong; getting in right and out wrong; this is making double mistakes. When you decide to make a trade be sure that you are not violating any of these 28 rules which are vital and important to your success. When you close a trade with a loss, go over these rules and see which rule you have violated; then do not make the same mistake the second time. Experience and investigation will convince you of the value of these rules, and observation and study will lead you to a correct and practical theory for successful Trading in Commodities.

Tuesday, March 2, 2021

Money Flow Index Trading Indicator

The Money Flow Index (MFI) is a momentum indicator that measures the strength of money flowing in and out of a market. Look for divergence between the Money Flow Index and the current price. If the price moves higher and the MFI moves lower a reversal may be imminent.

Refer figure below. Look for possible market tops when the MFI is above 80. Look for possible market bottoms when the MFI is below 20. This study is very similar to the Relative Strength Index, however, the Money Flow Index includes Price and Volume in the calculation.

Properties

Bars = Number of Bars to use in the calculations.
Average = Number of N periods used in the optional moving average.

Formula

Money Flow = Price * Volume
Money Ratio = Positive Money Flow Sum / Negative Money Flow Sum
Money Flow Index = 100 – ( 100 / ( 1 + Money Ratio))