Author: ApopheniaPays

This is a post containing my free The Missing Bybit Liquidation Calculator tool, as a convenience for sharing a direct link to it for other social media users. This calculator is also available as a popup from anywhere on the site by selecting it on from the Tools menu.


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.

Trading Success is just a matter of always following simple, consistent rules. The following are my “Golden Rules of Trading Success”. There is no guarantee in trading, but ability to follow these rules can make a difference between a lifelong career as a successful trader, and spending the rest of your days an abjectly loser complaining on #CryptoTwitter.

  1. Buy low, sell high. Don’t sell low or buy high. And, always use stop losses and sell low to cut your losses. And only buy high to profit off breakouts without falling for fakeouts.
  2. The market is efficient, and prices in all known information instantly. Also, you can get rich by having the foresight to intelligently and reasonably pick the right crypto to buy while it’s still cheap, before it moons.
  3. The trick to profit is to continuously add to positions on winning trades. Start small and add to it by slowly buying as your position moves further into profit. Also, remember to lock in realized profits, by slowly selling as your position moves further into profit.
  4. Don’t use a million indicators. Find one that works and stick with it. For instance, use a moving average to indicate trend. To find out the most effective moving average, a quick survey of CryptoTwitter or TradingView posts will reveal that the only one you need is the 5, 9, 20, 21, 24, 50, 78, 90, 100, 120, 150, 200, 360, 360, 480, and 500 4-hour, day and week MA and EMA.
  5. Always wait for trend confirmation, otherwise you’ll get into too many fakeouts and bad trades. But also, “Confirmation is only for Catholics”- act quickly, because if you wait for trend confirmation, you’ll get into the trade much too late to have a decent r/r or any kind of profit.
  6. “Trade the range”. But “the trend is your friend”.
  7. Let your profits run, don’t take money off the table when it’s appreciating. Also, remember to pay yourself- take profit off the table frequently as it’s appreciating.
  8. The market is predictable- “History may not repeat, but it rhymes”. Trading pioneer Jesse Livermore said the market is the only place where history repeats. But also, there is alpha decay- any strategy will only work for a short while, then it won’t work anymore at all. Past results are absolutely unreliable for predicting the future.
  9. Technical analysis works because the market behaves in accordance with consistent rules. Also, the market can stay irrational longer than you can stay solvent.
  10. Stick to simple strategies, don’t overcomplicate things. However, you have to find a totally unique alpha or strategy that nobody else has figured out, because you’re competing against all the greatest minds and massive number-crunching computing power in the world.
  11. You want to short when price has tested resistance and been rejected, therefore the buyers aren’t strong enough and price is likely to fall. However, testing resistance weakens it, making a subsequent break past it and further pump more likely. So when you see the price test resistance, it’s a sign to short, and also a sign not to short. (The inverse is true for testing support.)
  12. You compete against the entire world in trading, so you have to find an “edge”, something no one else has. But also you’re competing against the smartest people in the world, who are on to your every trick.
  13. Nobody is ever going to share real alpha, it’s too valuable, genuine alpha is how you get richer than everybody else, and the more people have it the less it works. But if you really want it, you can pay one of hundreds of thousands of traders to share their real alpha with you for only $50/month.
  14. The trend is your friend. Also, the market distributes itself to spread maximum pain, and the more complacent and trusting you are that something won’t change, the sooner it will. Past performance is an unreliable indicator of future returns.
  15. Markets reflect the wisdom of the crowd. Also, 90% of traders lose money.
  16. . As your trade moves in your favor, move your stops up aggressively to protect your profits. But also, leave your stops wide to give price room to breathe, otherwise volatility will stop you out and you’ll miss the big profits.
  17. “Cut your losses but let profits run”. Use close stoplosses to cut your losses early when price moves against you. And, don’t cut your losses early, because then you’ll lose money on frequent temporary pullbacks before price reverses and continues on to be a big winner in the direction you expected.
  18. Markets are efficient, information moves instantly so everything is already fairly priced based on the most advanced information. And, the most successful long-term investing strategy of all time is Value Investing, systematically finding and investing in companies that the market had undervalued.

Trading vs Gambling: know which you are doing!

Most professional traders will tell you that there is a very big difference between trading and gambling. Use the following table to understand the differences, and make sure you’re on the only reliably profitable side of this crucial division!

TradingGambling
0.) "Alpha decay": You win for a while but it will never remain consistent for long.
1.) In absence of actionable guidance on how to improve, or any return on lengthy efforts to discover a way to, the whole thing begins to look like a game of chance where "improvement" isn't actually possible.
2.) If improvement is possible, failures ought to be teachable. But in this, 99% of what you "learn" turns out to be about as reliable as a coin flip. Winning is dependent simply on time in the game, rather than on learned info.
3.) Some claim it's a real discipline, but it cannot be taught, other than "forune cookie wisdom" that everyone has plenty of to pass along.
4.) In analyzing it, everything is ambiguous. Anything can be read as confirmation or not enough confirmation. You can find a million different points it's likely to retest (to deny your thesis, set a stop, etc) and no reason why one is more likely than any other. Anything can be read as an "trend" depending on timeframe.
5.) "It seems right to me" and "It's always worked before" are foundational provisions, just like in a religion or a superstition, not like a science.
6.) You're trying to profit off a chaotic system, no cause and effect... overwhelmingly similar circumstances may give rise to vastly different results, for unclear reasons
7.) Consistent profits are very, very rare. Inconsistent results are common.
8.) Knowledge, understanding, technique, and analytical skill are only ever partially, inconsistently, and variably useful.
9.) Most people, regardless of intelligence or skill, lose their shirt.
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.

AP Risk Management Assistant 20-02-25.01 shared alpha



AP Risk Management Assistant 20-02-25.01 shared alpha by ApopheniaPays on TradingView.com

TradingView Script. Free TradingView account required to use. Direct link: hhttps://www.tradingview.com/script/cviFZ4S5-AP-Risk-Management-Assistant-20-02-25-01-shared-alpha/

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

—–

A word about the “regretted sale” features:

BUYBACK SPOT PRICE AFTER ‘REGRETTED’ SALE:

This is the level at which you will lose the same amount by having sold and bought back in as if you had simply held without selling. If you buy back at this level after a regretted sale, whenever you sell again, you will make the exact same profit or loss as if you had not made the regret sale. And every dollar below this price that you buy back in, is a dollar more profit you would have made if you had held and sold at that price. So if you now expect the price to go back up, you can get back in the game at this price or lower. Even if it goes back up just a little more than the spot price of your regretted sale, you can get back in at this price and then at least cut your losses by selling higher. Beware though — if you buy back in using this feature and then you sell anywhere below where you originally made the regret sale, you will lose more than you would have by simply not buying back in. Buying back in like this can only be profitable if the spot price goes back up at least to where you made the regret sale, and then, you have the discipline to really sell again at a higher price than that.

For instance, if you are on track to break even on 1.5 WhatsiCoins at spot price $1500, but instead stop out at $1435, and check the ‘I REGRET IT’ box and fill in 1.5 and $1435, it will give you a buyback line at a lower price, say, for example, $1417. If the price drops past $1417, and you buy back in, and it rises again to $1500, you can sell at $1500 and break even overall, exactly as if you hadn’t made the regretted sale. Or if the price drops to $1400 and you buy back in there, and it rises to $1500, you can sell there, and instead of breaking even you’ll make $25.50 profit. ($17/WhatsiCoin * 1.5 coins).

However, if you buy back in at $1417 and it only goes to $1425, and you sell there, you’ve taken on an additional loss of $15 ($1435-$1425 = $10 loss/coin, * 1.5 WhatsiCoins) and you would have done better not to buy back in.

And always remember: when you make a regret buyback, yeah, you’re where you would have been anyway, but, that position is further from profitability. If you make a regret buyback at $20 less than you sold out at, you’re now $20 further from profitability than you were when you sold, no matter what, and good luck with that addtional obstacle. And if you buy back at more expensive, and the price falls to your stop again, you’ve lost even more.

Generally, stop-losses are a good idea. This indicator aims to help you plan them sensibly.

So if you clearly made a bad mistake, and things go just right and dip far enough before a clear and predictable HUGE rebound that you’re sure is coming, this “REGRET IT” feature can get you back in to profit at no cost whatsoever. Or, it can easily cost you even more money, chasing your losses like a clueless newbie. Be careful.

Crossing detector & 2-field date/time entry [tradingview]



ApopheniaPays Crossing detector & 2-field date/time entry by ApopheniaPays on TradingView.com

TradingView Script. Free TradingView account required to use. Direct link: https://www.tradingview.com/script/izM2anXV-ApopheniaPays-Crossing-detector-2-field-date-time-entry/

A demonstration created by request.

You specify a horizontal line by value, start date/time, and end date/time, and choose a data source (bar close is the default) and it will label count how many times that source crosses that line between those dates/times.

“Crossing type”: count only crossing up, crossing down, any cross, or any touch at all. “Any touch” ignores the source you specified in the first input, and triggers if any part of the candle at all is touching the specified value.

BONUS DEMO FEATURE: Enter the start and end dates for your horizontal line as MMDDYY and HHMM (24 hour time).

: Jan 17, 2020 would be 11720 (properly it would be 011720, but Pine inputs delete leading 0s).
: November 17, 2020 would be 110720.
: 8:30 AM would be 0830.
: 8:30 PM would be 2030.

Remember to enter the right time zone.

I believe nobody else has published a 2-input date/time picker on TV, at least the last time I checked they hadn’t, they all make you input M,D,Y,H,M as separate fields. Ugh!

If you use any parts of this code, please credit me. If somehow you happen to make a lot of money using this code, please think about what a fair share would be to pay me for my help, then give that amount to a worthwhile charity.

RSS2k
Follow by Email173
Facebook42