Category Archive : Uncategorized

At risk of offending even more people: It feels like #CryptoTwitter is more preening & self-promotion than information exchange. You wanna find (or better, pay) someone to tell you what to trade next, sure! You wanna educate yourself how to tell what to trade next, or learn whether that’s even really possible…nope. So, where next? Ideas?

I’ve never before been involved in a profitable pursuit (and there’ve been a few) that didn’t have some community somewhere of beginners figuring it out together, along with a few generous folks sharing considerable expertise. (And FYI, I was usually one of those sharing, not seeking…a lot of my frustration with trying to “learn to trade” has been being on the unfamiliar knowledge-seeker side of the fence.)

If you scroll back through my twitter feed, you’ll see I share indicators that took me 100s of hours to develop, for free, along with fairly detailed explanations of the algorithms behind them. Maybe I’m lucky, but in my experience, that’s how professionals act. And I’m not even a profitable trader.

But CT seems to be mostly people sharing one-time info (“give a man a fish”) peppered with the occasional offer to pay monthly for more (whatever ‘more’ might be.) It seems predatory, not educational.

People make all kinds of excuses for this (“Nobody will give you alpha for free”) but my past experience with lucrative pursuits has been that there’s always enough room for small fry that the experts are free with information on how to become an expert yourself. This would seem especially true in trading markets. I can understand an institution not divulging their HFT algorithm, but retail traders are so inconsequential in terms of moving the market that I don’t believe any experienced retail trader has legitimate reason to fear for their profits simply by educating other retail traders.

Reminder Message (w/ color picker demo)



Reminder Message (with color picker) – ApopheniaPays by ApopheniaPays on TradingView.com

TradingView Script. Free TradingView account required to use. Direct link: https://www.tradingview.com/script/KLNJvOaF-Reminder-Message-with-color-picker-ApopheniaPays/

This is a very simple script. It displays a message above the latest price. I coded it because I need a constant reminder to keep me from overtrading.

You can customize several options:
– The message text
– How high above the latest price the message is displayed
– How often it is displayed. 1=display constantly, 2=only show it during every other period, 3=only show it every 3rd new period, etc. So, for example, if you are on the 15 minute chart, and set a frequency of 3, it will show it for the first 15 minutes out of every 45.
– The text size
– How many bars back from the last bar you want to position the text
– Whether it’s displayed above, at, or below the price
– Color and lightness. This can be used as an example of how to add a color selection input to your own scripts.

Note: by positioning using time instead of bar index, it would be possible to move the text ahead (to the right of) the last bar, but I’ve found that this gets complicated because you have to account for the time frame of the graph, so I leave this as an exercise for someone else.

Demonstration of how chart history length affects current EMA values



Demonstration of how history length affects all EMA values by ApopheniaPays on TradingView.com

TradingView Script. Free TradingView account required to use. Direct link: https://www.tradingview.com/script/NwvUwIQ3-Demonstration-of-how-history-length-affects-all-EMA-values/

I saw some discussion of this so I whipped up an example to prove the that effect of history length on EMA values is pronounced, even for bars much further than the EMA length away from the first candle of the chart.

This chart has two 89-bar EMAs of the close: a green one and a red one. However, for the red one, the first 89 bars of the graph are considered to have a close of “0”, which is exactly whatTradingView’s EMA calculation uses for bars before the start of the graph.

This is because unlike other moving averages, which reference the price of previous bars, the EMA references the EMA of previous bars. Therefore, bars closer to the beginning of the chart, where TradingView can’t calculate an EMA because there is no previous EMA and therefore uses 0, will return substantially different values for the EMA () function that the same cart would with more history.

The further a bar is back in history, the less influence it has. However, every single historical bar has some influence on the EMA of every later bar.

To allow you to see this for yourself, this script contains the following inputs which you can change to see the effect:
-EMA period (default 89)
-Number of bars to ignore for EMA2 (default 89)
-decimal precision to show differences in. By making this a large number you can see that, although the effects diminish, history length affects all EMA values for the char.
-label spacing (increase this if you have a long history and run into TV’s 50-label limit)

Range Strategy demo



ApopheniaPays Range Strategy by ApopheniaPays on TradingView.com

TradingView Script. Free TradingView account required to use. Direct link: https://www.tradingview.com/script/vQmYyTp5-ApopheniaPays-Range-Strategy

A very simple demo, made by request, to allow a user to set simple buy and sell levels and see how profit changes as you mover them.

AP VWWMA/Volume-Adjusted Price lines 5.4.2 shared alpha



AP VWWMA/Volume-Adjusted Price lines 5.4.2 shared alpha by ApopheniaPays on TradingView.com

TradingView Script. Free TradingView account required to use. Direct link: https://www.tradingview.com/script/Hgjz7wXW-AP-VWWMA-Volume-Adjusted-Price-lines-5-4-2-shared-alpha/

Initial alpha release, just for you to play with. No warranty, guarantee, support.

—–

This is an alpha of one of my most frequently-used custom indicators, provided without support or guarantees, for anyone to experiment with: the Volume Double-Weighted Moving Average and Volume-Adjusted Price Lines.

WHAT TH’ HECK ARE ALL THESE LINES?

Yellow/reddish line: VWWMA. Essentially a VWMA , but built on a WMA rather than an SMA . A very frequent target for brief mean reversions.

Blue line: WMA . If you look at movements of the VWWMA compared to movements of the WMA , it will tell you how much of an effect volume has on current movements. If the VWWMA moves towards the spot price more quickly than the WMA does, it means volume has joined in.

Yellow/red band between the VWWMA and the WMA: turns red for noisy movements, yellow for volume-supported trends. You may notice a correlation between the rate of change of the color band and the rate of change of the distance between the VWWMA and the WMA .

Everything else: Volume-Adjusted Price Lines. These are a an algorithm that shows moving points of control that frequently serve as support/resistance or mean-reversion targets. Just watch for a while. You’ll get it. There are 8 of them, all the same function but with different weighting constants: .5, 1, 1.5, 2, 3, 4, 5, 6. The ones I’ve found to be most informative are given more visual prominence. The values I’ve used are good but not canonical. For instance, I’ve noticed that price will often turn around in “mid-air” right where a VAP with weighting 3.5 would be, even though I didn’t include that as a default value. But the values I’ve included tend to be pretty useful.

I find that the VAPs very often fall into familiar movements (or noticeable lacks of movement) that are pretty consistently predictive of upcoming price changes. They also often coincide with VPVR points of control and other indications of support/resistance .

HOW I USE THIS:

I use this on BTCUSD , particularly on the 1min chart, but I’ve seen it be useful on the 1hr & 4hr too.

I usually place three of copies of this indicator:

Period 720, length 50, color set red, show up/down trends with colors, rainbow bands based on VAP #4, show WMA /VWWMA band.
VWWMA period 360, comparison length 50, color set dark yellow, don’t show up/down trends with colors, no rainbow bands, don’t show WMA /VWWMA band.
Period 1440, length 50, color set blue, don’t show up/down trends with colors, no rainbow bands, don’t show WMA /VWWMA band.

Then I hide the 360/1440 until I need them. The 720/50 is my main goto for BTC on Coinbase, it’s always on.

I set an alert the 720/50 to let me know when VAPrangeCompression crosses 0.5 up, that will give a good alert when something is up. Sometimes I set that alert on 1440 and 360 as well, but not always. VAPrangeCompression will often go from 0 to 1 before a big move. If you watch it long enough, you’ll start to detect consistent patterns.

Also, sometimes, if I just can’t figure out what’s happening, I’ll set the 360 or 1440 to a comparison length of 25 or 100 to get a different perspective. Shorter length makes the lines more responsive, but i think longer lengths give you a more accurate read on what’s going on. 50 seems to be the best in most cases.

The above settings work on a lot of charts and resolutions, but generally they’re better on exchanges with higher liquidity. Sometimes if they just don’t seem useful, I’ll look at a chart’s history, and adjust them for that chart until they seem to reliably indicate things that have happened, then use those settings going forwards. But mostly I leave the settings alone.

YEAH, BUT WHAT ARE THESE? HOW ARE THEY CALCULATED?

The original intent was to improve upon the VWMA , come up with something that better reflected the “REAL” market value, regardless of where spot price was. The problem with VWMA is their movements in relation to unweighted averages tell you a lot but their absolute position doesn’t actually tell you much. I wanted to use volume to determine an absolute value that the the market “wants” an instrument to be at.

However, mathematically, the general picture is this: roughly, a Volume-Adjusted Price is just an average of two values, the spot price and the previous bar’s Volume-Adjusted Price, weighted by a function of relationship between recent volatility in the VWWMA vs recent volatility in the price by itself over the same period. The less the price volatility has correlated with the VWWMA volatility (hence the greater effect of volume on price), the more the line moves towards the spot price from its previous value.

I really need to get my website going and do a real writeup, but I discussed the nuts & bolts of it a bit in the following threads on twitter:
Calculating the VWWMA: https://twitter.com/ApopheniaPays/status/1209777737579155456
Calculating a Volume-Adjusted Price line: https://twitter.com/ApopheniaPays/status/1208979072711180288
A slight correction to the formula for Volume-Adjusted Price lines: https://twitter.com/ApopheniaPays/status/1211872536432005120
Overview of reading the VAP lines: https://twitter.com/ApopheniaPays/status/1214053445029679105
Some inconclusive musings on how VAPs move and predict pumps and dumps: https://twitter.com/ApopheniaPays/status/1221596657097138176

Now, the trick here is, I provide this just as a fun fact, when I was first experimenting with this idea, I made a mistake. And I tested the most promising version of the algorithm for a week or two without realizing a mistake had crept into my weighting formula. And in that time I noticed pretty spectacular leading indication of price action. It was only after I really started to trust that the formula worked that I looked at it again, and realized there was a math mistake in it. So I fixed the mistake… and the indicators stopped working well. So, to this day, the weighting calculation has an intentional mistake in it. I know where the mistake is. Anybody who know anything about this stuff would look at the algorithm and see that I’d done something wrong. I don’t know why it works so well with the mistake. But it works. It’s like I threw a box of junk parts in the air and they accidentally landed in the shape of a working motorcycle. Total serendipity.