freelanceshack.com
- 8 min readThe Detrended Price Oscillator (DPO) is a technical indicator that helps traders identify cycles and overbought/oversold conditions in the market. It is used to eliminate or reduce the effect of trends, making it easier to spot short-term market cycles.Trading with the DPO involves the following steps:Calculating the DPO: The DPO is calculated by taking the price of an instrument and subtracting the n-day simple moving average (SMA) of the instrument's price action.
- 8 min readCandlestick patterns are formed by the price movements of an asset over a certain time period, commonly depicted on a chart. The calculations involved in reading candlestick patterns are relatively simple. Every candlestick consists of four main components: the open, close, high, and low prices.The open price represents the first traded price of an asset during a specific time interval, while the close price represents the last traded price within the same period.
- 7 min readThe Arms Index, also known as the Trading Index (TRIN), is a technical analysis indicator that measures market sentiment by comparing the volume of advancing stocks to the volume of declining stocks alongside the advancing volume and declining volume. It was developed by Richard Arms in 1967 as a tool to assess the strength or weakness of a stock market.
- 12 min readThe Triple Exponential Average (TRIX) is a technical indicator commonly used by traders for scalping strategies. Scalping involves making quick trades to take advantage of small price movements in the market. The TRIX indicator helps traders identify the trend direction, momentum, and potential reversal points.The TRIX indicator is based on a triple moving average of the underlying price data.
- 11 min readThe Percentage Price Oscillator (PPO) is a technical analysis tool that helps identify potential buy and sell signals in swing trading. It is derived from the Moving Average Convergence Divergence (MACD) indicator and measures the percentage difference between two moving averages.The PPO is calculated by subtracting the longer-term moving average from the shorter-term moving average and dividing the result by the longer-term moving average.
- 5 min readCore Data is a framework in Swift that enables developers to persist data in their applications. It provides an object-oriented way to manage the model layer objects in the application and also handles the storage of that data.To use Core Data for data persistence in Swift, you need to follow a few steps. First, you need to set up a Core Data model. This model defines the entities and attributes that make up your data structure. You can create this model in Xcode using the Core Data editor.
- 11 min readExponential Moving Average (EMA) is a technical analysis indicator used to calculate the average price of an asset over a specific period of time. It is similar to the Simple Moving Average (SMA) but gives more weight to recent data points. The EMA places greater importance on the most recent price data, making it more responsive to changes in price trends.To calculate the EMA, you start by selecting a time period (e.g., 10 days) and a smoothing factor (e.g., 2/(1+10)).
- 5 min readUserDefaults is a built-in class in Swift that allows you to store and retrieve small amounts of user-related data. It provides a simple and convenient way to save user preferences, settings, and other application-specific data.To work with UserDefaults in Swift, you need to follow these steps:Import the Foundation framework: Before you can use UserDefaults, you need to import the Foundation framework at the top of your Swift file.
- 8 min readThe Chande Momentum Oscillator (CMO) is a technical analysis tool developed by Tushar Chande, a prominent trader and author. The CMO is used to determine the momentum of a particular asset or security by comparing the current price to the average price over a defined period of time.The CMO is calculated by taking the difference between the sum of positive and negative price changes over a given period and dividing it by the sum of total price movements over the same period.
- 10 min readUnit testing in Swift is an essential part of software development, as it helps ensure the quality and correctness of the code. Here is an overview of how to perform unit testing in Swift:Import XCTest Framework: XCTest is a built-in testing framework in Swift, so start by importing this framework in your test file. Create Test Classes: Create test classes as subclasses of XCTestCase. Each test class should correspond to a class or module in your project that needs testing.
- 9 min readDelegation is a design pattern commonly used in Swift programming to establish communication between objects. It involves creating a protocol that defines a set of methods to be implemented by a delegate object, which will receive notifications or perform some actions on behalf of another object.To implement delegation in Swift, follow these steps:Define a protocol: Create a protocol that lists the methods the delegate object should implement.