INVITE-ONLY SCRIPT

Quickfingers Lucs Base Breaking Indicator v2.5 - 3Commas Edition

Diupdate
Introduction

The indicator attempts to implement a popular price action strategy by Luc Thomas (a.k.a. Quickfingers Luc) typically referred to as a QFL base-breaking strategy specifically for the 3Commas platform. The Input settings have been redesigned to match the same inputs as the 3Commas My Bot Settings page. Only the "Deal Start Condition" section will echo the required QFL-related settings found in the original Quickfingers Luc's Base Breaking Indicator v2.5 to successfully implement the strategy.

The strategy revolves around price action movements that reveal “bases”, which are price levels of support that have a significant, rapid price surges called “bounces”. Once a base is revealed, the base price level is used as reference to implement multiple entries below the base using a layering technique of dollar-cost averaging to place multiple limit orders at various price levels below the base price. As price action breaks below the base price, the limit orders will be filled, and the take profit, breakeven and stop loss prices will be recalculated.

How is it original and useful?

This indicator is unique in that the strategy version fully supports the TradingView backtester, which will enable you to perform experiments with various settings to evaluate performance using the historical chart data. The study version implements the "Start Deal" and "Close Deal" alerts for you to integrate with 3Comma's "Trading View Custom Signal" start condition. Both script versions will provide the same configuration abilities. The following list is a brief description of its usefulness:

  • The ability to define the QFL base confirmation settings, including volume analysis.
  • The ability to define your preferred layering strategy of either dollar-cost averaging (DCA) or grid-like layers along with precise layer placement.
  • The ability to define your trading parameters like take profit and stop loss offsets, exchange commission rates, trading start time, and position size multiplication for each layer.
  • The ability to define flexible trade eligibility rules that can use other chart indicators, like RSI or EMA, to exclude the selection of base prices for trading.
  • The ability to set the visibility & color theme of the detailed statistics from the chart history pertaining to trading sessions started and closed, session durations, win rate, price action drops and bounces, as well as layer utilization.


How does it compare to other scripts in the Public Library?

The indicator offers a very detailed, comprehensive settings to implement the QFL base-breaking strategy ion 3Commas. The strategy version leverages the full features of the TradingView backtester to provide informative, detailed performance measurements surrounding this unique trading strategy. The study version will implement the latest alert framework called "Any Alert() Function" where you can create a single alert to handle multiple events, which include:

  • Deal Start
  • Deal Close


What does it do and how does it do it?

The strategy can be applied to any chart at any time frame, but the minimum should be no lower than 10 minutes. When applied to the chart for the first time, the default settings will work to render base price levels in orange and 8 DCA layers in thin blue lines. As you scroll through the chart's history you should see price action crossing the DCA layers, denoted with blue triangles, and a green take-profit line will render with green triangle denoting the crossing. Lastly, when a deal session begins upon the crossing of the first layer, the indicator will continue to identify base price levels, but the color of the price lines will be gray. When the trade session concludes upon the crossing of the take profit line, the indicator will switch the most recent base price line from gray to orange to make it active and eligible for trading.

As price action develops, the indicator will use the "Base Confirmation Settings" to look back by counting the number of bars to the left and right of a pivot low point, measure the price drops and bounces, and volume amounts to validate that they are within the specified values. If so, the indicator will draw an orange triangle beneath the candle bar to denote it as the pivot low point and begin rendering the orange line as the base price. The DCA layers will be calculated and offset relative to the base price using thin blue lines.

Optionally, the breakeven price line will be drawn to help visualize the true breakeven price which takes into consideration the exchange fees being applied. Base line, take profit, stop loss and DCA layer crossings will be denoted with colorful shapes to help visually recognize the events on the chart.

The volume is validated only at the pivot low candle. It will measure the volume against the moving average to determine base confirmation. A volume factor of 1 will mean that the volume must be at least the same value as the moving average value. A volume factor of 2 means it must be twice the moving average value.

Lastly, a table of statistics is positioned to the upper-right corner of the chart that summarize all the events that have taken place since the indicator began simulating deal sessions from the chart's history.

Strategy Results

The default settings are designed to define a "weak" QFL base to ensure that the indicator will render chart elements when first loaded as well as to allow the backtester to gather order executions and display performance summary. The strategy version is using $10,000 initial capital, a commission rate of 0.1% for both entries and exits, and a 1 tick slippage setting. It is also using 3.4881% of the equity for the Base Order Size, 4.7097% of equity for the first Safety Order Size. The Maximum Safety Trade Count is 7 with a Safety Order Volume Scale of 1.35, and a take profit of 5% with no stop loss. All other settings are defaults.

It is recommended that the indicator be "tuned" for your specific market in order to best implement the QFL trading strategy and obtain better desirable results. You do so by using the statistics table and observe the Mean Price Drop and Bounce values to learn what the indicator is detecting when it measures from the pivot low points. Using this information, you can adjust the Base Confirmation Settings accordingly, along with any volume specifications you require, to configure the indicator for the chart.

Always keep in mind that past performance may not be indicative of future results. Settings that seem favorable for one market may be found to be disastrous in another. Therefore, do take the time needed to understand how the settings will behave with the given chart symbol.

Enjoy! 😊👍

How to obtain access to the script?

You have two choices:

  • Use the "Website" link below to obtain access to this indicator, or
  • Send us a private message (PM) in TradingView itself.
Catatan Rilis
New fixes and features in this release:

Both Indicator and Strategy:

  • Added a new "MAIN SETTINGS" section.
  • Added new "TV CUSTOM SIGNAL" section .
  • Moved most QFL v2.5 inputs from "DEAL START CONDITION" to "TV CUSTOM SIGNAL" section.
  • Added new "Short" option to "Strategy" input.
  • Added new "Start Order Type" input to the "STRATEGY" section.
  • Added new "Max Active Safety Trades Count" input to the "SAEFTY ORDERS" section.
  • Added the "Stop Loss Action" input to the "STOP LOSS" section.
  • Added new "Stop Loss Timeout (bars)" input to the "STOP LOSS" section.
  • Added a new "ADVANCED SETTINGS" section with inputs to match 3Commas.
  • Added new "CLOSE DEAL AFTER TIMEOUT" section with inputs to enable and set the timeout.
  • Added new "Show Used Amount For Each Step Table" input to display a new table on the bottom-center of the chart.
  • Enhanced the organization of the inputs for better layout visualization and closer resemblance to 3Commas layout.
  • Fixed a defect where enabling the "Stop Loss Timeout (bars)" feature was not working properly.
  • Fixed a defect where using a "Safety Order Volume Scale" value of 1 was not working properly.
  • Renamed the "DEAL START CONDITION: QFL v2.5.7" section to "DEAL START CONDITION" to match 3Commas.
  • Renamed the "Bars For Drop" input to "Bars On Left" since Shorting is supported.
  • Renamed the "Min. Drop %" input to "Min. Change %" since Shorting is supported.
  • Renamed the "Bars For Bounce" input to "Bars On Right" since Shorting is supported.
  • Renamed the "Min. Bounce %" input to "Min. Change %" since Shorting is supported.
  • Renamed the label for the "SO Volume Scale" input to "Safety Order Volume Scale".
  • Renamed the label for the "SO Step Scale" input to "Safety Order Step Scale".
  • Updated the "QFL STATISTICS" to contain the same data points as "3C-DCA STATISTICS".
  • Removed the "Dark" and "Light" color inputs for the "Show Statistics Table" input and replaced them with "Custom" color inputs.
  • Updated the minimum value of the "Max Safety Trades Count" input from "1" to "0" to match 3Commas.
  • Updated the maximum value of the "Max Safety Trades Count" input from "20" to "100" to match 3Commas.
  • Updated the default value of the "Pyramiding" input from "21" to "101" to support 3Commas' ability to configure 100 safety orders plus the base order.
Catatan Rilis
New fixes and features in this release:

Both Indicator and Strategy:

  • Added the "Equal To" and "Not Equal To" options in the "Is" inputs in the "Enable Trade Eligibility Condition" sub-section.
  • Fixed a defect where the Win/Loss Rate % was not being calculated for Stop Loss Timeouts.
  • Fixed a defect where using the "Stop Loss Timeout (bars)" with a "Stop Loss Action" of "Close Deal & Stop Bot" was not stopping trading.
  • Fixed a defect where the "BOS" value in the Statistics table for the "Summary" data point was displaying a percentage value even if "Open Deal At Deviation From Base" was disabled.


Strategy Only:
  • Fixed a defect where the Strategy Tester was showing a 2nd safety order entry, but the total volume size for the safety order was unevenly split between the two. The fix involved implementing a workaround with the strategy.exit() by supplying a value for the 'from_entry' argument instead of omitting it to handle all the orders.
Catatan Rilis
New features and fixes in this release:

Both Indicator and Strategy:

  • Added the "Time frame" data point to the "3C-DCA STATISTICS" table.
  • Updated the price labels position to render at the real-time bar instead of at the start of the order line.


Strategy Only:

  • Fixed a defect where the deal number was not being assigned to the correct safety order signal name, thus creating a separate exit order in the list of trades table.
Catatan Rilis
New fixes in this release:

Both Indicator and Strategy:

  • Fixed a defect where the logic to detect the number of safety orders crossed would be wrong when a single candle crossed more than two safety orders.


Indicator Only:

  • Removing the use of barstate.islast to prevent the alert repaint warning when creating alerts.


Strategy Only:

  • Fixed a defect where the limit orders where being submitted at base created and at the base order entry events, thus intermittently separating the submitted quantity of the safety safety order into two separate orders in the list of trades table.
  • Fixed a defect where the limit orders where being submitted multiple times on each tick during the base created and base order entry events during forward testing.
Catatan Rilis
New features and fixes in this release for both Indicator and Strategy:

  • Added the "Timeframe" data point to the "3C-DCA STATISTICS" table.
  • Added more abbreviation settings (MAD & SDSP) to the "Summary" data point in the "3C-DCA STATISTICS" table.
  • Added show/hide input controls for the various sections of the "3C-DCA STATISTICS" table.
  • Added "Show Profit/Loss Zones" and "Show Unrealized Profit/Loss Label" inputs to show or hide these new chart features.
  • Fixed a defect where the strategy would submit multiple limit orders on the real-time bar as it is crossing a Safety Order layer when "Recalculate On Every Tick" is checked in the Properties tab. (Strategy version only)
  • Fixed a defect where the deviation from the base order for the first safety order was not being inverted correctly for the "Short" strategy setting.
  • Updated the "Daily P&L" data point in the "3C-DCA STATISTICS" table to display the calculated daily P & L in deals and for the entire lookback period (in total).
  • Updated the safety order lines to place the price label at the real-time bar instead of the entry bar to improve readability.
  • Updated the inputs in the STRATEGY and SAFETY ORDERS section to match the new UI changes on 3Commas. Also updated tooltip content.
Catatan Rilis
New features and fixes in this release for both Indicator and Strategy:

  • Updated the default value of the "Stop Date/Time" input to 2030-01-01.
Catatan Rilis
New features in this release for both Indicator and Strategy:

  • Added new "Ignore Value" input for the "Enable Trade Eligibility Condition" section.
  • Added new "Link to TradingView Script" and "Link to Documentation" inputs to the "GENERAL INFO" section.
  • Added the "No. of Single-Bar Entries & Exits" data point to the "3C-DCA STATISTICS" table.
  • Added new "Stat Label Font Weight" input to change the font labels to bold or normal for the "3C-DCA STATISTICS" table.
  • Fixed spelling mistakes in the "Eligible When" options.
  • Fixed a defect where a new base would be drawn below a previous base, but the base order was filled from the previous base.
  • Removed almost all tooltip icons and text due to the 60K compiled tokens limitation and tooltips consume a lot of these tokens.
  • Updated the Statistics table rendering criteria to draw the table during Replay mode of the chart.
Catatan Rilis
New features in this release for both Indicator and Strategy (v2.5.18-3C):

  • Fixed a defect caused by the last release where the options "Base", "Safety Order 1", and "Last Safety Order" were accidentally removed from the "Eligible When" and "The Value Of" inputs.
Catatan Rilis
New features in this release for both Indicator and Strategy (v2.5.19-3C):

  • Fixed a defect caused by the v2.5.17 release where the base shifting logic not being applied when the base reference bar low was lower than the newly detected base price.
Catatan Rilis
New features in this release for both Indicator and Strategy (v2.5.20-3C):

  • Added new "Apply Condition On" input in the "Enable Base Acceptance Condition" section to control the acceptance of a base before and during its use.
  • Added new "Base Order" option to "Eligible When" and "The Value Of" inputs.
  • Fixed a defect with the "Enable Base Acceptance Condition" logic where the rules were only applying successfully to the Long strategy.
  • Fixed a defect with the "Enable Base Acceptance Condition" logic where using the values of "Safety Order 1" or "Last Safety Order" for the "Eligible When" input was not using the "Open Deal At Deviation From Base (%)" input value when it was enabled.
  • Renamed the label for the "Enable Trade Eligibility Condition" input to "Enable Base Acceptance Condition".
  • Renamed the label for the "BASE CONFIRMATION SETTINGS" input to "BASE DEFINITION SETTINGS".
Catatan Rilis
New features in this release for both Indicator and Strategy (v2.5.21-3C):

  • Fixed a defect where the indicator would trigger an Open Deal when the candle crosses the Next Base price immediately following the candle that crosses the Take Profit price, but then the base is marked as unacceptable.
  • Fixed a defect where setting the "Max Safety Trades Count" to zero would cause a fatal error of "Study Error, Index 1 is out of bounds, array size is 1."
  • Fixed a defect where using the "Percentage from base order" option for the "Take Profit Type" input was not calculating the Take Profit price correctly.
  • Fixed a defect where the next base was not being accepted when it was below the current active base.
Catatan Rilis
New fixes in this release for both Indicator and Strategy (v2.5.22-3C):

  • Fixed a defect where a single candle will cross a safety layer and the take profit price and not close the deal.
Catatan Rilis
New features and fixes in this release for both Indicator and Strategy (v2.5.23-3C):

  • Added support for a comma-delimited list of values for the "Bot ID" input with placeholders "{{bot_id_1}}", "{{bot_id_2}}"..."{{bot_id_10}}", etc. (Indicator Only)
  • Fixed a defect where the "Errors Found" table would disappear when the current bar would complete, and a new bar would begin.
Catatan Rilis
New features and fixes in this release for both Indicator and Strategy (v2.5.24-3C):

  • Added the "in Deal ##" values for the "Min Bars in Deals" and "Max Bars in Deals" data point in the statistics table.
  • Updated the "Pair" data point in the Statistics table to show the 3Commas formatted symbol instead of the TradingView ticker ID in order to know if you should use the "Use Custom Symbol" input or not.
Catatan Rilis
New features and fixes in this release for both Indicator and Strategy (v2.5.25-3C):

  • Added "Mean", "Median", "Mode", "Min", "Max", and "Std. Dev. of" "Bars from Base Created to Cracked" data points to the 3C-DCA Statistics table.
  • Added "No. of Bases Cracked" data point to the 3C-DCA Statistics table.
  • Added "No. of Base Order-Only Deals" data point to the 3C-DCA Statistics table.
  • Converted the "Open Deal Signal Message" and "Close Deal Signal Message" string inputs to text area inputs to support multi-line messages.
  • Fixed a defect where checking the "Open Deal Signal Message" and "Close Deal Signal Message" checkboxes when the "Bot ID" input was blank would cause a "Index 1 is out of bounds" fatal error.
  • Moved the "Base & Safety Order Size Unit" drop-down into it's own row instead of next to the "Base Order Size" input.
  • Updated the maximum value for the "Open Deal At Deviation From Base (%)" input from 10 to 20.
  • Updated the JSON messages in the "Open Deal Signal Message" and "Close Deal Signal Message" inputs to contain the newline character ("\n") due to some users needing it for a successful signal to be accepted by 3Commas.
  • Upgraded to source code to version 5 of Pine Script.
Catatan Rilis
New features and fixes in this release for both Indicator and Strategy (v2.5.26-3C):

  • Added the "Verify Price For Limit Orders (ticks)" input to the "ADVANCED SETTINGS" section. (Indicator only)
  • Added the "Total Volume" data point to the 3C-DCA Statistics table that reports all the base & quote volume used in all the deals.
  • Fixed a defect where the "Max Safety Order Price Deviation" data point in the 3C-DCA Statistics table was displaying "NaN%". (Indicator only)
  • Fixed a defect with the Profit/Loss Zones background color not having any transparency and added the color settings to the Style tab for customization.
Catatan Rilis
New features and fixes in this release for both Indicator and Strategy (v2.5.27-3C):

  • Added the "close_entries_rule" argument to the "strategy()" function in order to eliminate single limit orders being broken out to multiples in the Strategy Tester. (Strategy only)
  • Updated the drop-down inputs that have a blank value to a single dash (-) in order to better support the Optimiser plugin's ability to read the values.
Catatan Rilis
New features/fixes in this release (v2.5.28-3C):

  • Added the use of the "barstate.isconfirmed" to the base detection logic to prevent an Open Deal signal from firing while the candle is still forming. (Indicator only)
  • Added the "⚠️ Warning" input to the ALERT SETTINGS section to explain the reason for the warning prompt when creating alerts due to using 'barstate' variables. (Indicator only)
  • Implementing a workaround to avoid a defect with the Strategy Tester where calling "strategy.close_all()" function twice will open a short position in the List of Trades table. (Strategy only)
Catatan Rilis
New features/fixes in this release (v2.5.29-3C):

  • Fixed a defect caused by implementing the workaround in the previous release where the limit orders were not being canceled when the Stoploss timeout was reached. (Strategy only)
Catatan Rilis
New features/fixes in this release (v2.5.30-3C):

  • Fixed a defect where the "No. of Deals Started" is not accurate because the "Enable Base Acceptance Condition" is checked, and the base is invalidated in the same candle where the first safety order is filled.
Catatan Rilis
New features/fixes in this release (v2.5.31-3C):

  • Fixed a defect where there was a missing comma in the "Close Deal Signal Message" text area after the 0 value for the "delay_seconds" property. (Indicator only)
Catatan Rilis
New features/fixes in this release (v2.5.32-3C):

  • Added the ability to set the Take Profit % after a given number of bars in a deal has been reached as a result of the following:
  • Added the "Set TP to [X]%, on bars in deal [Y]" input to the "TAKE PROFIT" section.
  • Added the "When price is beyond new TP price, then [choice]" input to the "TAKE PROFIT" section.
  • Reordered the "STRATEGY" and "SAFETY ORDERS" sections to match the Advanced user interface for improved efficiency when comparing settings between 3Commas and the script settings.
Catatan Rilis
New features/fixes in this release (v2.5.33-3C):

  • Fixed a defect where using the "Cooldown Between Deals (bars)" input was only working for the ASAP Deal Start Condition.
Catatan Rilis
New features/fixes in this release (v2.5.34-3C):

  • Fixed a defect where the Next Base was not being validated using the Base Acceptance Condition thus causing the indicator to switch to it since there was no active base in progress.
Catatan Rilis
New features/fixes in this release (v2.5.35-3C):

  • Added support for a comma-delimited list of values for the "Email Token" input with placeholders "{{email_token_1}}", "{{email_token_2}}"..."{{email_token_10}}", etc.
  • Added the "Override Minimum Tick Precision", "Custom Minimum Tick Precision", and "Method To Adjust Prices To Minimum Tick Precision" inputs to the "ADVANCED SETTINGS" section to handle exchanges that require a specific precision in prices.
  • Added the "Safety Order Filled" alert condition.
  • Added the "Safety Order Filled Signal Message" checkbox and text area to support the "add_funds_in_quote" or "add_funds_in_base" messages that are found on the bot Information page.
  • Added new placeholders for the "Safety Order Filled Signal Message" alerts message. (Indicator version only)
    New placeholders are: {{event_name}}, {{break_even_price}}, {{stop_loss_price}}, {{take_profit_price}}, {{base_order_price}}, {{count_of_filled_safety_orders}}, {{safety_order_quote_volume}}, {{safety_order_base_amount}}
  • Fixed a defect where TV no longer supports line breaks in the "stepline" line style that is used for the "Breakeven", "Take Profit", and "Stoploss" price lines.
  • Reordered the "Max Active Safety Trades Count" and "Max Safety Trades Count" inputs to match the order with 3Commas Bot Settings page.
  • Reordered the "Stat Label Font Weight" input to be above the "Cell Text Size" input for the Statistics Table settings since it really is not related to the Custom theme color inputs that were surrounding it.
  • Reordered the data points in the Data Window to move the price values at the top because TV's will only allow the first 19 data points to be resolved using placeholders in alert condition messages.
  • Renamed the "Open Deals & Stop" input to "Open X Deals & Stop" to match the label for the input on the 3Commas Bot Settings page.
  • Renamed the "ALERT SETTINGS" section to "ANY ALERT() FUNCTION CALL" to make it more clear about the type of alert that must be used for the inputs in the section.
Catatan Rilis
New features/fixes in this release (v2.5.36-3C):

  • Fixed a defect when a new base is detected at the same time that the price action crosses the Base Order price from the previous base and is ignored but the Strategy Tester records the entry.
  • Fixed a defect where the deal number in the Strategy Tester signal name is skipping numbers because of the scenario where the first bar on the new base fills the base order at the same time.
  • Fixed a defect TV's minimum tick precision is not being applied to OHLC data on some symbols (e.g., BINANCE:DOGEBUSD), so the Strategy Tester is out of sync with the script's logic.
  • Updated the labels for the Statistics table position inputs to include text in order to support automation script needs to locate these inputs.
Catatan Rilis
New features/fixes in this release (v2.5.37-3C):

  • Removed the "Used Amount For Each Step" & "Statistics" tables from the indicator script in order to resolve the "Something went wrong. Please try again later." error that is displayed when loading it to a chart.
  • Removed the "Used Amount For Each Step" table from the strategy script in order to resolve the "Something went wrong. Please try again later." error that is displayed when loading it to a chart.
Catatan Rilis
New features/fixes in this release (v2.5.38-3C):

  • Reverted the changes in v1.0.37-C because TradingView has resolved the compiler issues that was preventing the indicator from being added to the chart for the first time.
  • Replaced the "Link to TradingView Script" and "Link to Documentation" inputs with the "Links to TradingView Script & Documentation" text area to make it easier to read the information.
Catatan Rilis
New features/fixes in this release (v2.5.39-3C):

  • Updated source code to resolve the "Something went wrong. Please try again later." error that is displayed when loading it to a chart.
3commasbacktestingDCAPivot Pointsqflqfl-tradingstoplossSupport and Resistancetakeprofit

Skrip hanya-undangan

Akses ke skrip ini dibatasi hanya bagi pengguna yang telah diberi otorisasi oleh penulisnya dan biasanya membutuhkan pembayaran untuk dapat menggunakannya. Anda dapat menambahkannya ke favorit anda, tetapi anda hanya akan dapat menggunakannya setelah meminta izin dan mendapatkan aksesnya dari pembuat skripnya. Hubungiprosum_solutions untuk informasi lebih lanjut, atau ikuti instruksi penulisnya dibawah ini.

TradingView tidak menyarankan untuk membayar untuk sebuah skrip dan menggunakannya kecuali anda 100% mempercayai pembuatnya dan memahami cara kerja skrip tersebut. Dalam banyak kasus, anda dapat menemukan alternatif skrip sumber terbuka yang bagus secara gratis di Skrip Komunitas kami.

Instruksi penulis

To request access to this script, either use the "Website" link below or send us a private message (PM) in TradingView. We will respond as soon as possible.

Inggin menggunakan skrip ini pada chart?

Peringatan: harap membaca sebelum meminta akses.

Contact Us on our Website: prosum-solutions.store/contact-us/
Documentation for Indicators: prosum-solutions.store/documentation/
Discord Server: discord.com/invite/Zuf9MyKmfW
Juga di:

Pernyataan Penyangkalan