Image by Steve Buissinne from Pixabay

We’ll start by creating a structure that holds the data for a single trade.

A trade is made up of an amount, a price, and a value. All of the trades are stored in the TradesModel, which will make all of the calculations necessary for DCA (dollar-cost averaging).

The didSet property observer is used so that the trades array is given a new empty trade when the user wants to increase the number of trades displayed.

This keeps the size of the array in line with the number we expect to see on the screen, eliminating the possibility of index…


Image by Ahmad Ardity from Pixabay

In 2014, the PowaTag mobile payments app launched with 240 retailers on board.

The product centred around an app that allowed you to buy any product you come across in the real world. If it was a billboard, you would scan a QR code. On the radio, the app could detect audio frequencies to tell the app what the product is. The app even made use of Bluetooth beacons, such as Apple’s iBeacons, to find products within range of your device.

Paying for the product was simple, as your payment details were stored in the PowaTag cloud and could be…


Image by Reimund Bertrams from Pixabay

It takes just a cursory glance at Wikipedia to discover that HODL “originated in a December 2013 post on the Bitcoin Forum message board” where a presumably drunk user wrote “I AM HODLING.” Wikipedia provides a 2017 quote from Quartz that suggested it described a determination to stay invested in bitcoin and “not to capitulate in the face of plunging prices.”

When someone says they’re HODLing, they mean that they are waiting a long time to get a bigger payout.

But they’re also doing it to save the price from crashing.

The only thing stopping any cryptocurrency from being worthless…


Image by Charles Thompson from Pixabay

Moving average convergence divergence (MACD) is an indicator that shows the direction of a trend.

The MACD line is calculated by subtracting the 26-period Exponential Moving Average (EMA) from the 12-period EMA. These exponentially weighted moving averages are affected more by recent price changes than simple moving averages (SMAs), which apply an equal weight everything.

Depending on what timeframe you’re looking at, the duration of the period that each EMA takes into account could be minutes, hours, or days. Comparing two of them effectively compares the recent past with the less recent past, showing the relative direction and momentum between…


Image by S K from Pixabay

Let’s start by giving a basic definition of the terms involved.

What is short selling?

Shorting is pretty easy to explain.

If I sell a bitcoin, I have ‘cash’ in the form of a stablecoin like USDT or BUSD. When the price drops, the amount of bitcoin I can afford with that cash goes up.

Bitcoin is cheaper, so I can get more for my money.

But what if I told you I didn’t own any bitcoin when I sold one?

What is cross margin?

Cross margin is a trickier concept to define.

I’ll talk exclusively about Binance, just because that’s the exchange I’m familiar with, but a…


Image by TheOtherKev from Pixabay

Here’s what we know so far, according to the release notes.

Markdown can be used to create Text, whether that be through LocalizedStringKey or a String literal. You can create a Text View with an AttributedString, which I admit is a structure I don’t use very often. There are performance improvements to animations, which makes one of the best frameworks in the world for UI and animation work even faster. …


UPDATE: the problem has now been fixed, although the developers aren’t sure if the problem will surface again.

Image by Nattanan Kanchanaprat from Pixabay

Polkadot is a Nominated Proof-of-Stake (NPoS) network that has been up and running since May 26th 2020. Users vote to determine which validators do a good job, and in return they get rewarded with more DOT coins. Rival project Cardano (ADA) has a similar system, except that there is no minimum staking amount and the risk is only that a user fails to get rewarded. …


Photo by Aaron Burden on Unsplash

If you’ve been added as a writer, select ‘add to publication’ and submit it. Being a writer is not a guarantee that your stories will be accepted for publication. If you’ve not yet been added as a writer, you’ll need to send your draft link using the form below. You do not need to use the form if you have already been added as a writer.

If the form isn’t displayed above, you can go to the form directly.

We’ll get back to you at the email address you provide.


A metal coin with the Bitcoin logo standing on its edge in the middle of a chess board
Image by WorldSpectrum from Pixabay

Binance is the world’s largest cryptocurrency exchange, and the last 6 months have been the most profitable of its entire history.

The reason for this recent success is the launch of two blockchains. The first is Binance Chain, a closed source blockchain based on Tendermint that centres around trading BEP2 tokens. These tokens are pegged, meaning they will follow the value of a coin exactly. This concept may be unfamiliar to you but have probably heard of USDT, a pegged token on many blockchains which follows the value of the US dollar.

On Binance Chain there is a pegged token…


a smartphone showing the Dogecoin price on its screen
Photo by Clay Banks on Unsplash

The cryptocurrency Dogecoin has had an incredible run this week, fuelled only by hype and celebrity endorsements. Unlike GameStop, where arguments of the company being undervalued can be made, Dogecoin really doesn’t offer any new utility. Maybe that doesn’t matter, but we’re probably going to find out soon enough. Whether you’ve bought into the hype or not, you might be interested to know how to use an API to check the price.

Here’s how the two screens of the app will look:

Rob Sturgeon

An iOS developer who writes about gadgets, startups and cryptocurrencies. Swift programming tutorials and SwiftUI documentation are here too. robsturgeon.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store