Latest "PIne scripts" files
ImportedFromAP » Free Scripts & Algos Even Though You Probably Don't Deserve It
Crossing detector (feat. 2-field date/time entry demo)

Crossing detector (feat. 2-field date/time entry demo)



var tradingview_embed_options = {}; tradingview_embed_options.width = '640'; tradingview_embed_options.height = '400'; tradingview_embed_options.chart = 'izM2anXV'; new TradingView.chart(tradingview_embed_options);

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…

ImportedFromAP » Free Scripts & Algos Even Though You Probably Don't Deserve It

AP Risk Management Assistant 20-02-25.01 shared alpha



var tradingview_embed_options = {}; tradingview_embed_options.width = '640'; tradingview_embed_options.height = '400'; tradingview_embed_options.chart = 'cviFZ4S5'; new TradingView.chart(tradingview_embed_options);

AP Risk Management Assistant 20-02-25.01 shared alpha 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…

ImportedFromAP » Free Scripts & Algos Even Though You Probably Don't Deserve It

AP VWWMA/Volume-Adjusted Price lines 5.4.2 shared alpha



var tradingview_embed_options = {}; tradingview_embed_options.width = '640'; tradingview_embed_options.height = '400'; tradingview_embed_options.chart = 'Hgjz7wXW'; new TradingView.chart(tradingview_embed_options);

AP VWWMA/Volume-Adjusted Price lines 5.4.2 shared alpha 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…

ImportedFromAP » Free Scripts & Algos Even Though You Probably Don't Deserve It

Range Strategy demo



var tradingview_embed_options = {}; tradingview_embed_options.width = '640'; tradingview_embed_options.height = '400'; tradingview_embed_options.chart = 'vQmYyTp5'; new TradingView.chart(tradingview_embed_options);

AP Range Strategy 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.

ImportedFromAP » Free Scripts & Algos Even Though You Probably Don't Deserve It

Demonstration of how chart history length affects current EMA values



var tradingview_embed_options = {}; tradingview_embed_options.width = '640'; tradingview_embed_options.height = '400'; tradingview_embed_options.chart = 'NwvUwIQ3'; new TradingView.chart(tradingview_embed_options);

Demonstration of how history length affects all EMA values 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…

ImportedFromAP » Free Scripts & Algos Even Though You Probably Don't Deserve It

Reminder Message (w/ color picker demo)



var tradingview_embed_options = {}; tradingview_embed_options.width = '640'; tradingview_embed_options.height = '400'; tradingview_embed_options.chart = 'KLNJvOaF'; new TradingView.chart(tradingview_embed_options);

Reminder Message (with color picker) - 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.
-…