BlogWeb
-
7 min readWilliams %R, also known as Williams Percent Range, is a popular technical analysis indicator used in trading to identify overbought and oversold conditions in the market. Developed by renowned trader and author Larry Williams, it is primarily used to determine potential reversal points in price movements.Williams %R is a momentum oscillator that oscillates between 0 and -100. It measures the level of the latest closing price relative to the high-low range of a specified period.
-
10 min readTo load SVG files with D3, you can follow these steps:First, include the D3 library in your project by adding the following script tag to your HTML or by downloading and including the library file in your project directory. Next, create an SVG container using D3. Select an HTML element where you want to append the SVG and create a container with a specific width and height. For example: const svg = d3.select("body") .append("svg") .attr("width", 500) .
-
6 min readTrading with Average True Range (ATR) is a commonly used strategy in technical analysis to identify potential entry and exit points in the market. The ATR indicator measures the volatility of an asset by calculating the average range between high and low prices over a certain period of time.To trade with ATR, you follow these steps:Determine the ATR period: Decide on the number of periods you want to use in your calculation.
-
10 min readIn d3.js, you can display an array of objects using various methods and techniques. One common approach is to use the data() method in conjunction with enter() and append() functions to dynamically create HTML elements based on the array elements.Here's an example of how you can display an array of objects in d3.js:First, select the parent DOM element where you want to display the array.Use the data() method to bind the array to a selection of DOM elements.
-
6 min readTo set margin or padding in a canvas object using d3.js, you can follow these steps:First, select the canvas element using D3's select() method. For example: var canvas = d3.select("canvas"); Next, define the width and height of the canvas element using the attr() method to set the "width" and "height" attributes. This will determine the size of the canvas where the visual elements will be drawn: canvas.attr("width", width); canvas.
-
9 min readThe Ichimoku Cloud is a technical analysis indicator that was developed by a Japanese journalist named Goichi Hosoda in the late 1930s. It is a comprehensive trading system that provides various levels of support and resistance, as well as signals for potential trend reversals and trend strength.The Ichimoku Cloud consists of five components, namely:Tenkan-sen (Conversion Line): This line is calculated by taking the average high and low prices over a specified period, usually 9 periods.
-
7 min readUnit testing in Kotlin is a crucial part of software development as it allows developers to verify the correctness of individual units of code, such as functions or classes, in isolation. Here are the steps to perform unit testing in Kotlin:Import the required testing framework: Kotlin supports multiple testing frameworks such as JUnit and Spek. You need to add the necessary dependencies in your build file, such as Gradle, to import the testing framework you prefer.
-
5 min readTo create a time scale in d3.js, you can follow these steps:First, you need to include the d3.js library in your HTML file by including the following script tag: Next, define the dimensions of your time scale, including the range on which your scale will be based. For example, you might have a width of 500 pixels and a height of 300 pixels.
-
6 min readAsynchronous programming in Kotlin involves handling tasks that may not complete immediately. This allows your application to continue executing other tasks while waiting for certain operations to finish, such as network requests or file I/O.There are several ways to handle asynchronous programming in Kotlin:Callbacks: One traditional approach is using callbacks. You can define a function that takes a callback as a parameter, which will be invoked when the asynchronous task completes.
-
8 min readThe Arms Index, also known as the Trading Index (TRIN), is a technical analysis tool used in trading to determine the strength of a particular market trend. It was developed by Richard W. Arms Jr. in the late 1960s.The Arms Index is primarily used to measure the market's breadth and investor sentiment. It takes into account the relationship between advancing and declining stocks and the volume associated with each.
-
8 min readTo convert a complex JSON dataset to be used in d3.js, you can follow these steps:Load the JSON dataset: Use a method like d3.json() to load the JSON dataset from a file or an API endpoint. Parse the JSON data: Once the JSON dataset is loaded, you need to parse it into a JavaScript object using JSON.parse() method. Transform the data: Depending on the structure of your JSON dataset, you may need to transform it to match the requirements of your d3.js visualization.