infervour.com
-
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.
-
9 min readKotlin's standard library provides a set of scope functions that allow you to easily work with objects and execute code within a specific scope. These functions are: let, run, with, apply, and also.let is used to perform operations on an object and return the result. It can be chained together to perform multiple operations in sequence.run is similar to let but is invoked directly on an object.
-
5 min readCandlestick patterns are a visual representation of price movement in financial markets, commonly used in day trading. They provide valuable insights into market psychology and can help traders make informed decisions about when to enter or exit trades.Each candlestick represents a specified time period, such as one minute or one hour, and consists of four main components: the open, close, high, and low prices.