"Algorithmic Trading with Moving Averages on Steem"
Hello everyone, I'm here to participate in the Season 20 Week for Engagement challenge. This contest is about algorithmic trading. Through algorithmic trading a trader can save his time and trades will be completed automatically as per his wish. So we are going to discuss here about a very important and effective training. There were many things that I had to know from outside so let's talk about the content and important points of the contest.
Algorithmic trading is often defined as trading that is conducted via computer programs gaining the label “algo-trades”.
Automated trading is defined as the process of employing computers in making decisions where to trade in the market. Thes egoaledgorithm sare program medto automatically buy sell stocks with parameters set in anautomatice Split and other parameters include the price,quantity,time and themarket condition. The main goal is total elimination of human stimulation in an attempt to achieve the highest levels of efficiency in trading activities.
Relevance in Today’s Markets
Increased Efficiency: Algorithmic trading makes it possible for securities to be traded in as large quantities, and within the prevailing short time that cannot be achieved by human traders. This speed can take advantage of market windows that are normally very hard to identify.
Reduced Transaction Costs: Automating trading can eliminate most of the costs associated with manual trading by eliminating such things as brokerage and slippage costs.
Enhanced Liquidity: The experts have said that through algorithms, buy and therefore, sell sides can be provided in an unbroken sequence in the markets which helps in making transactions less turbulent.
Market Making: A large number of algo trading strategies consist of market making where the trader offers an insistence to buy and sell at various prices provided in the order book.
Data-Driven Decisions: Maths in algorithms allows analysis of large amounts of data in the shortest time and traders are able to take decisions based on logic instead of sentiments.
Risk Management: One major dealing of algorithms is that they can integrate risk control strategies into their dealing strategies, thereby minimizing prospective loss through use of stop loss or diversification of portfolio.
Simple Trading Plan Moving Averages
A popular group of algorithms entails deploying moving averages (MAs) as signaling tools for trading of the concerned commodities. A simple moving average crossover strategy is often employed:
Define Parameters:
Short-term Moving Average (SMA): 50-period
Long-term Moving Average (SMA): 200-period
Trading Signals:
Buy Signal: When a shorter-term moving average crosses up the longer-term moving average (Golden Cross formation).
Sell Signal: When the short-term SMA dips below the long-term SMA (known as Death Cross).
Application to STEEM/USDT Trading Pair:
Acquire historical price data of STEEM and USDT where STEEM is traded against the USDT. Compute Simple Moving Averages over a 50-period and 200-period respectively.
Application to STEEM/USDT Trading Pair:
Get the historical price of STEEM/USDT. Compute the simple moving averages 50 and 200.
Monitor these moving averages:
Perhaps when the 50-period SMA is located above the 200-period SMA, place a buy order for STEEM/USDT. On the other hand, if the 50-period SMA goes below the 200-period SMA, place a sell signal for STEEM/USDT.
It is envisaged that this strategy will hold trends in price fluctuations while avoiding exposure during consolidation or downturn in price direction.
Difference between simple, exponential and weighted moving average.
Moving Average is a method of analysis which is used to obtain mean value of set of numbers at certain time interval. It is basically divided into three main types: In detail we have basic moving average, namely, simple moving average, followed by exponential moving average, and the last one named weighted moving average. Both types have their pros and cons making it critical to factor them when developing algorithmic trading techniques.
1.Simple Moving Average (SMA)
SMA is an easy-to-compute formula in which the prices are massed over a particular period. For instance, in use of the 10-day Simple Moving Average, the closing prices recorded for the past 10 days are summed up then divided by 10.
Benefits:
Very workable in terms of comprehension and arithmetic. Helpful in working out long-term trends in the market.
Disadvantages:
Takes equal importance to older data so the recent changes are delayed in showing up. They are not as vulnerable to a faster rate of change in market trends as other organizations.
2.Exponential Moving Average/Exponential Average.
EMA places significantly high importance on the latest price. It forms another value using the preceding SMA that assigns more importance to latest knowledge.
Benefits:
Moves quickly in response to the market. Tends to give signs of reversal of the trends.
Disadvantages:
Not a very intensive though a little complicated calculation process. Such impression may be more likely if the market fluctuates much, and this may cause a trader to provide wrong signals.
3.Weighted Moving Average (WMA)
There are different weightings to each period when using WMA. In general there is a discounting factor assigned to prices & it is nearer prices so more importance is given to it.
Benefits:
Responds faster than SMA. Market factors that affect the calculation that is done on it are considered to arrive at a more accurate result.
Disadvantages:
This indicates that the study and the analysis of control algorithms progresses leads to an increase in computational complexity. These indicators explain that a larger weight amounts can at times cause problems due to sounding wrong signals.
Thus, my preferred measure for the algo-trading strategy is EMA. Because it reacts better to small changes and gives better indications of changes in trends as compared to the long-term averages. This gives me the understanding that when acting in the market,the EMA will assist me to quickly notice changes within the fast fluctuating market thus improving the chances of my trading decisions.
- Real example
Let the indicators be 50-day SMA and 20-day EMA of the S&P 500 index presented on the steam chart. Below is a hypothetical example:
Day | closing | price is 50 day SMA | 20 day EMA |
---|---|---|---|
1 | $100 | - | - |
50 | $120 | $110 | $115 |
70 | $130 | $125 | $128 |
This example shows that when the closing prices get to $130 the EMA $128 is above the SMA $125 which is a bullish signal. The three averages, SMA, EMA and WMA all have advantages and weaknesses as well. However, the selection of EMA for the algo-trading strategy appears more effective because the indicator responds highly to market fluctuations and is useful for making prompt decisions.
Automated trading techniques consist of the use of metrics within calculations to make trades as per certain set rules. Here in we shall use the moving averages (MAs) to predict the trend of the price of the Steem token, which is a blockchain-based, cryptocurrency mostly operating on the Steemit.
Moving Averages
Relative averages remove noise from price information to generate a momentum signal. The two most common types are:
Simple Moving Average (SMA): An arithmetic mean of a series of prices for occurrences in a given number of periods.
Exponential Moving Average (EMA): Like SMA but puts more weight on the recent prices as a result it reacts to new information more keenly.
Entry and Exit Signals
Entry Signal:
Buy Signal: It should be noted that when the short-term moving average (MA), for example the 10-day MA, rises above the long term MA, for example the 50-day MA, then we have a buy signal.
Confirmation: And make sure that whenever the crossover occurs the price is above both the EMAs.
Exit Signal:
Sell Signal: If the short-term EMA dips below the long-term EMA which will signal a bearish run.
Stop-Loss Trigger: Prices here are volatile as most traders know, and that is why it is good practice to set a stop loss at 3% below the entry.
Risk Management Rules
Position Sizing: All of these and many more are the basic rules of trading, these include: never risk more than 2% of your total capital in any single trade.
Stop-Loss Levels: As stated set stop loss at a point that is 10% below the entry level price of the share you intend to invest in. This level should be adjusted in line with volatility for instance if the asset is highly volatile you may find it advisable to set your stop loss to 3%.
Take-Profit Levels: Place take-profit at 1.5 times your exposure (If your exposure is $100, let your take-profit be $150).
Backtesting Strategy
Backtesting means the analysis of effectiveness of the applied trading strategy based on known information of stock exchange with the help of trading simulation.
Data Collection:
Collect old price values of the Steem token for a long time (at least 12 months).
Make certain that data contains daily traded opening, highest, lowest and closing prices.
I used gate.io I and A Account to set up algorithmic trading strategies .I first went to this website and created an account there and found the basic settings in the create bot option. In the basic setting, you should enter the amount of your investment. I have written one thousand USDT here. There you can set the period and enter the minimum amount to invest and you will also find out how much your fee will be. You can set target ratio and stop limit ratio here. Here I have no verified account and no dollar investment.
Now you have to set up the entry condition. The trade will be taken in one hour, so I set the time for one hour. I set the percentage of my investment to take every trade and gave it 10% and there I can also see our main issue that is sma close 50 and close 200 days. When the two-day line crosses 50 days and goes down, it will be sold, and when the line of the 200-day moving average crosses 50 days up, it will buy as many times as possible every hour. For this I have created this setup.
automatic exit trade, I set the time duration the same as 1 hour, The condition I set the SMA 50 Death cross to the SMA 200. This means the sell trade will be placed whenever SMA 50 crosses the SMA 200 below.
On observation, it appears that some traders have faced losses due to a big dump breaking everything. If the market conditions are normal and the news is good, algorithm trading and bot training losses are much less if the setup is correct. Many have earned good profits when the market was normal.
You can see in my drawn picture that I have included in the chart from December 2023 till now. Small trades have been done there many times. If you observe with measurement, it will be seen that more than 65% profit has been possible. Algorithm strategy trading requires us to keep an eye on the market and may face heavy losses due to bad news. Any trader must always invest fifty percent of his funds for training or even less is better. There we can get a chance to recover. Looking at the current market, we can understand that the market has a down trend and say. Of course buyers will come from here and take the market up. Analyzing the historical data, we see this. A lot of things are hidden in the four hour trading frame which has hurt many trades and traders have profited from many trades.
Crypto market is always risky so always monitor and keep in mind the market situation. Because at any time your purchased crypto can decrease. Of course we have to use stop loss to take the trade. Although algorithmic trading is done automatically, monitoring is the most important thing in algorithmic trading.
High frequency trading, trading facilitated by computers at high speeds and high volumes, has revolutionalised the financial markets through the provision of efficiency and liquidity. One of them is the use of mathematical models like the analysis of statistics to provide trading signals eliminating emotional influence. But it also comes with such concerns as increased market risk and systems’ breakdown. In the future, technologies are expected to change the market and overall volume, where algorithmic trading will improve its stake within the market therefore, the market continues to demand increased regulation due to the impact of algorithmic trading on the market and investor protection.
Thanks to everyone here is an invitation @abdul-rakib @simonnwigwe & @josepha
X promotion link
https://x.com/mostofajaman55/status/1842438367713296753
Upvoted. Thank You for sending some of your rewards to @null. It will make Steem stronger.
Thank you for posting well. Excellent information
Thank you very much for observing and reading my post.
THE QUEST TEAM has supported your post. We support quality posts, good comments anywhere, and any tags
thank you so much for your support @sduttaskitchen.🙋♂️
Your post has been rewarded by the Seven Team.
Support partner witnesses
We are the hope!
I appreciate how you have broken down the different type of moving average and highlighted their significance in creating a reliable trading strategy. The real life examples and screenshot are particularly helpful in visualizing the application of these concepts. I also agree that continuous monitoring even in automated systems is key to minmizing risks. Good luck with the contest
At first I was very scared to participate in the contest and thought it was very difficult but after analyzing it and learning a lot, I realized that it is not as difficult as I thought. Gives and protects our capital Thank you very much for your comment.