PROTECTED SOURCE SCRIPT

[Volume Profile] Signal Clean Up Analysis with Backtest (TSO)

Aktualisiert
This is a full-cycle trading system indicator, which uses Volume Profile for generating signals using a custom developed algorithm, TP (Take Profit) and SL (Stop Loss) levels. There are 2 SOURCES for signals (each can be used separately or both can be used at the same time, each signal SOURCE is using Volume Profile levels to open optimal trade direction) with chained (NOTE: You can select several or ALL of the features, this is not limited to either one) signal cleanup and analysis approach with scheduling and alerting capabilities. Works with most popular timeframes: 1M, 5M, 15M, 1H, 4H, D, great for intraday trading!

NOTE: Every calculation is done on a confirmed closed candle bar state, so the indicator will never repaint!
===========================================================================

Explanation of all the Features | Configuration Guide | Indicator Settings | Signal Cleanup Analysis
---------------------------------------------------------------------------
>>> Customizable Backtesting for a specific date range, results via TradingView strategy, which includes “Deep Backtesting” for largest amounts of data on trading results.

>>> Trading Schedule with customizable trading daily time range, automatic closing/alert trades before Power Hour or right before market closes or leave it open until next day.

>>> 3 Trading Systems.

>>> Multiple Signal SOURCEs for opening trades, either SOURCE can be used or both at the same time!

>>> Static/Dynamic Stop-Loss setups (HIGHLIGHT: Stop-Loss will be moved to Entry after TP1 is taken, which minimizes risk).

>>> Single or Multiple profit targets (up to 3).

>>> Take-Profit customizable offset feature (set your Take-Profit targets slightly before everyone is expecting it!).

>>> Candle bar signal analysis (matching candle color, skip opposite structured and/or doji candle uncertain signals).

>>> Additional analysis of VWAP/EMA/ATR/EWO (Elliot Wave Oscillator)/Divergence MACD+RSI/Volume signal confirmation (clean up your chart with indicator showing only the best potential signals!).

>>> Advanced Alerts setup, which can be potentially setup with a trading bot over TradingView Webhook (NOTE: This will require advanced programming knowledge).
===========================================================================

Labels, plots, colors explanations:
---------------------------------------------------------------------------
>>>>> Signal SOURCE(s): Green/Red arrows, which will be shown unconditionally, outside of trade engine and can be hidden if desired.

>>>>> LONG open: green "house" looking arrow below candle bar.

>>>>> SHORT open: red "house" looking arrow above candle bar.

>>>>> LONG/SHORT take-profit target: green/red circles (multi-profit > TP2/3/4/5 smaller circles).

>>>>> LONG/SHORT take-profit hits: green/red diamonds.

>>>>> LONG/SHORT stop-loss target: green/red + crosses.

>>>>> LONG/SHORT stop-loss hits: green/red X-crosses.

>>>>> LONG/SHORT EOD close (profitable trade): green/red squares.

>>>>> LONG/SHORT EOD close (loss trade): green/red PLUS(+)-crosses.
===========================================================================

Date Range and Trading Schedule Settings
---------------------------------------------------------------------------
>>>>> Date Range: Select your start and/or end dates (uncheck “End” for indicator to show results up to the very moment and to use for LIVE trading) for backtesting results, if not using backtesting – uncheck “Start”/“End” to turn it off.

>>>>> Use TradingView “Strategy Tester” to see backtesting results
NOTE: If Strategy Tester does not show any results with Date Ranged fully unchecked, there may be an issue where a script opens a trade, but there is not enough TradingView power to set the Take-Profit and Stop-Loss and somehow an open trade gets stuck and never closes, so there are “no trades present”. In such case you will need to manually check “Start”/“End” dates or use “Depp Backtesting” feature!

>>>>> Trading Schedule: This is where you can setup Intraday Session or any custom session schedule you wish. Turn it ON. Select trading hours. Select EOD (End of Day) setting (NOTE: If it will be OFF, the indicator will assume you are holding your position open until next day!).

>>> Trading Systems: 1) "Open Until Closed by TP or SL": the signal will only open a trade if no trades are currently open/trunning, a trade can only be closed by Take Profit, Stop Loss or End of Day close (if turned on) | 2) "Open Until Closed by TP or SL + OCA": Same as 1), but if there is an opposite signal to the trade which is currently open > it will immediately be closed with new trade open or End of Day close (if turned on) | 3) "OCA (no TP or SL)": There are is Take Profit or Stop Loss, only an opposite signal will close current trade and open an opposite one or End of Day close (if turned on)

>>>>> MULTIPROFIT | TP (Take-Profit) System: Once the trade is open, all Take-Profit target(s) are immediately calculated and set for the trade > once the target(s) is hit > trade will be partially closed (if candle bar closes beyond several Take-Profit targets > trade will be reduced accordingly to the amount of how many Take-Profit targets were hit)

>>>>> MULTIPROFIT | SL (Stop-Loss) System: 1) Static – Once the trade is open, Stop-Loss is calculated and set for the remaining of the trade ||| 2) Dynamic – At trade open, Stop-Loss is calculated and set the same way, however once 1st Take-Profit is taken > Stop-Loss is moved to Entry, reducing the risk.

>>>>> # of TPs (number of take profit targets): Just like it is named, this is where you select the number of Take-Profit targets for your trading system (NOTE: If "OCA (no TP or SL)" Trading System is selected, this setting won’t do anything, since there are no TP or SLs for that system).

>>>>> TP(s) offset: This is a special feature for all Take-Profit targets, where you can turn on a customizable offset, so that if the price is almost hitting the Take-Profit target, but never actually touches it > you will capture it. This is good to use with HHLL (Highest High Lowest Low), which is pretty much a Support/Resistance as often the price will nearly touch these strong areas and turn around…
===========================================================================

Take-Profit and Stop-Loss visual example:
---------------------------------------------------------------------------

1) A simply nice intraday trading day for SPY (S&P500 ETF TRUST) with a single Take-Profit target on each trade.
See how Take-Profit distances increase with price momentum and how Stop-Loss is following the trade reducing the risk!
Snapshot

2) Same intraday trading day for SPY (S&P500 ETF TRUST) with 3 Take-Profit targets with static Stop-Loss.
Snapshot

3) Same intraday trading day for SPY (S&P500 ETF TRUST) with 3 Take-Profit targets with dynamic Stop-Loss.
You can see how Stop-Loss was moved once TP1 is taken!
Snapshot
===========================================================================

Trade Analysis and Cleanup Settings
---------------------------------------------------------------------------
>>>>> Candle Analysis | Candle Color signal confirmation: If closed candle bar color does not match the signal direction > no trade will be open.

>>>>> Candle Analysis | Skip opposite candle signals: If closed candle bar color will match the signal direction, but candle structure will be opposite (for example: bearish green hammer, long high stick on top of a small green square) > no trade will be open.

>>>>> Candle Analysis | Skip doji candle signals: If closed candle bar will be the uncertain doji > no trade will be open.

>>>>> Divergence/Oscillator Analysis | EWO (Elliot Wave Oscillator) signal confirmation: LONG will only be open if at signal, EWO is green or will be at bullish slope (you can select which setting you desire), SHORT if EWO is red or will be at bearish slope.

>>>>> Divergence/Oscillator Analysis | VWAP signal confirmation: LONG will only be open if at signal, the price will be above VWAP, SHORT if below.

>>>>> Divergence/Oscillator Analysis | Moving Average signal confirmation: LONG will only be open if at signal, the price will be above selected Moving Average, SHORT if below.

>>>>> Divergence/Oscillator Analysis | ATR signal confirmation: LONG will only be open if at signal, the price will be above ATR, SHORT if below.

>>>>> Divergence/Oscillator Analysis | RSI + MACD signal confirmation: LONG will only be open if at signal, RSI + MACD will be bullish, SHORT if RSI + MACD will be bearish.

>>>>> Volume signal confirmation: LONG/SHORT will only be open if closing candle volume is 150% above average Volume based on the Volume Length.
===========================================================================

Alert Settings (you don’t have to touch this section unless you will be using TradingView alerts through a Webhook to use with trading bot)
---------------------------------------------------------------------------
Here is how a LONG OPEN alert looks like (each label ["COIN"] is customizable + I can add up more items/labels if needed):
COIN: BTCUSD
TIMEFRAME: 15M
LONG: OPEN
ENTRY: 20000
TP1: 20500
TP2: 21000
TP3: 21500
SL: 19000
Leverage: 0
===========================================================================

Adding Alerts in TradngView
---------------------------------------------------------------------------
-Right-click anywhere on the TradingView chart
-Click on Add alert
-Condition: Select this indicator by it’s name
-Alert name: Whatever you want
-Hit “Create”
-Note: If you change ANY Settings within the indicator – you must DELETE the current alert and create a new one per steps above, otherwise it will continue triggering alerts per old Settings!
===========================================================================

If you have any questions or issues with the indicator, please message me directly via TradingView.
---------------------------------------------------------------------------
Good Luck! (NOTE: Trading is very risky, past performance is not necessarily indicative of future results, so please trade responsibly!)
Versionshinweise
* Fixed some minor issues with alerts + dynamic SL with static TP was only moving to Entry once TP1 is hit, now it will move to Entry even if TP2/3/4 is hit before TP1
Versionshinweise
* Fixed a weird table issue where date range was not working
Versionshinweise
* Added Trading Schedule highlight option, so you can see exactly during which time the indicator is trading in the past, when does it start/end trading live!
Versionshinweise
Fixed a small issue with Intraday Close Settings.
Please note the trade closure times with the 2 different Intraday close settings when turned on:

At Market Close:
1/3/5min > will close at 15:55pm ET
15min > will close at 15:45pm ET
30min > will close at 15:30pm ET
45min > will close at 15:45pm ET
60min > will close at 15:00pm ET

Before Power Hour:
1/3/5min > will close at 15:00pm ET
15min > will close at 15:00pm ET
30min > will close at 15:00pm ET
45min > will close at 15:00pm ET
60min > will close at 15:00pm ET
Versionshinweise
* Added another feature, which can be turned on.
>>> Turn On/Off: Current Position SL + Opposite Position Open Signal on the same closing candle bar (If current trade hits Stop-Loss and at that same closing candle bar there is a signal for an opposite direction trade > indicator will close current position as Stop-Loss and immediately open an opposite position). NOTE: With this option turned on, there will be more trades, but not necessarily better results, since after Stop-Loss is hit, it may make sense to wait a little before opening an opposite trade, even if it matches the condition at the same time when Stop-Loss is hit, but sometimes it shows great results, so this setting/feature is included.
Versionshinweise
* Minor fix
Versionshinweise
* Updated current position LIVE P/L (profit/loss) table display to convert the result to PIPS if FOREX is being traded
Versionshinweise
* Updated background color of active trading schedule, looks much better now
Versionshinweise
* Updated 1/3 and 5/3 percentage of total trade from 33 to 34 percent, that way it rounds up correctly when you use multi-profit system, this should not affect backtesting
Versionshinweise
* Minor fix
Versionshinweise
* Minor fix with SL behavior
Versionshinweise
* Minor logic fix
Versionshinweise
* EOD (End of Day) close in profit would show "loss" alert - fixed
Versionshinweise
* Organized alerts better + TP/SL alerts will show closing price at alert, since even though TP/SL levels are pre-calculated at trade/position open - every target is considered HIT once candle bar actually breaks it (closes beyond it)
Versionshinweise
* Another minor fix
Versionshinweise
* Fixed an issue with multiTP system, where a TP2/3/4/5 would get ahead of TP1, alerts would show wrong percentage, now alerts will show exact percentage to close when TPs are hit!
Versionshinweise
* Added automated rounding of Entry/TP/SL/Close numbers within alerts, so it should be much easier to read now!
Versionshinweise
* Minor plotting fix
Versionshinweise
* Fixed a rare issue where SL is hit on the same bar a trade/position is open, now SL can only be hit next candle after trade/position is open
Versionshinweise
* Another minor fix
Versionshinweise
* Stats table now show more info (now will also show if any of the TPs were taken and which was the last TP that was taken)
Versionshinweise
* Volume Strength analysis Percentage can now be manually set (strong and weak)
Versionshinweise
* Adjusted use_bar_magnifier to false by default, so that non-premium user accounts would not get study error (for Premium accounts - it can be turned on via Indicator Settings > Properties > Backtesting Precision)
Versionshinweise
* Minor fix
Versionshinweise
* Changed calc_on_order_fills default setting to false, as it does not affect this indicator, yet it will show a warning now that backtesting results maybe unrealistic...
Versionshinweise
*** Please check this video guide to learn more about my indicators (the video is for my different indicator, but the way it operates and the way you configure it is very similar!): youtu.be/NuQOwgKgegA?si=Q0iqL4V_xvTaKdLP
Versionshinweise
* Minor fix to stats table
Versionshinweise
- Minor fix
Versionshinweise
* Updated scheduling settings. Now it is fully customizable and any cut off hour can be set to close any open trade/alert triggered, not only at US market close or before Power Hour. Now any custom intraday schedule can be set as desired!
Versionshinweise
* Updated the wording for "EOD(End of Day) Close/Trading Cut Off" settings so it is more friendly.
Versionshinweise
* Mistype fix
Versionshinweise
* Added additional optional signal confirmation by Volume above average MA line at signal trigger, if turned on - position/trade will be opened only if volume is above the volume MA line (volume MA length can be customized).
Versionshinweise
* Cleaned up and very slightly re-worded input parameters, hidden some of the long explanations inside a tooltip (hover mouse over (i) to the right from the parameter for more info). Reading and experimenting / searching for best combination of parameters should be now much easier and more convenient! Please NOTE: Nothing changed in the algorithm, this is a cosmetic change.
Versionshinweise
* Minor fix, EOD grey vertical line was showing at the wrong time (had custom timezone mistakenly included in the code)
Versionshinweise
* Fixed a bunch of warnings within the script, this is preventive measure as with new version of PineScript, these warnings may become errors. No changes were made to algorithm.
Versionshinweise
* Fixed an issue where EOD would combine with TP1/2/3/4/5 or SL on the same closed candle, where it would not fully close out the trade and leave it partially open due to a mix up the script trying to process both: EOD and another action like TP1.
Versionshinweise
* minor fix
Versionshinweise
* Cosmetic fix
Versionshinweise
* Minor fix
algotradinganalysisCandlestick analysisChart patternscustomizablecustomtradingsystemdynamiclevelsmultipletargetssentimenttrailingstopuniversalvolumeprofileanalysis

Geschütztes Skript

Dieses Skript wird als Closed-Source veröffentlicht und Sie können es frei verwenden. Sie können es favorisieren, um es auf dem Chart zu verwenden. Sie können den Quellcode nicht einsehen oder verändern.

Möchten Sie dieses Skript auf einem Chart verwenden?


Trading like a machine!
Auch am:

Haftungsausschluss