Skip to content
Home » Posts » Documentation » Quickfingers Luc’s Base Breaking Indicator & Strategy v2.5 » Setup Guide for ProfitView

Setup Guide for ProfitView

Overview

The following is a basic guide on how to set up and configure Quickfingers Luc’s Base Breaking Indicator for use with ProfitView chrome plugin.

Disclaimer: Use of Third-Party Software or Websites

We may recommend use of software, information, products, or web sites that are owned or operated by other companies. We offer or facilitate this recommendation by hyperlinks or other methods to aid your access to the third-party resource. While we endeavor to direct you to helpful, trustworthy resources, We cannot endorse, approve, or guarantee software, information, products, or services provided by or at a third-party resource or track changes in the resource. Thus, we are not responsible for the content or accuracy of any third-party resource or for any loss or damage of any sort resulting from the use of, or for any failure of, products or services provided at or from a third party resource.

We recommend these resources on an “as is” basis. When you use a third party resource, you will be subject to its terms and licenses and no longer be protected by our privacy policy or security practices, which may differ from the third policy or practices or other terms. You should familiarize yourself with any license or use terms of, and the privacy policy and security practices of, the third party resource, which will govern your use of that resource.

Special Thanks to Cryptoaryan

A majority of this content was authored by Cryptoaryan 🡵 and I want to thank him for spending the time and effort in compiling the information contained in this guide.

Conventions & Abbreviations

Conventions

The following table details the conventions that are used in the guide to help you distinguish when referring to UI elements and values you type into inputs.

ConventionMeaning
BoldUI element label
ItalicsData value to enter or select

Abbreviations

The following table details the abbreviations used in the guide to improve readability.

AbbreviationMeaning
TVTradingView
PVProfitView
QFLThe Prosum Solutions QFL Indicator v2.5

Requirements

The Steps

The workflow from start to finish will proceed as follows

  1. Create API Keys on Your Exchange
  2. Configure Exchange Permission and Account API Keys in PV
  3. Configure PV Alerts with Correct Syntax
  4. Select High Volatile Trading Pairs/Markets
  5. Configure the QFL Indicator on TV
  6. Create TV Alerts on Trading Pairs/Markets
  7. Wait for Alerts and Fine Tune PV, TV, and QFL

Step 1: Create API Keys on Your Exchange

Please consult with the exchange documentation to create the API keys:

Step 2: Configure Exchange Permissions & Account API Keys in PV

In this section we will activate the exchange you want to target.

  1. Open the ProfitView menu and select the Options button. A new tab will open to the Options page.


  2. Select the Setup Permissions menu item on the left side and scroll to locate your exchange and toggle the button to the ON position.


  3. Select the newly activated exchange under the Exchanges section on the left-side navigation and supply an Account Name and enter your account API key, secret, and passphrase in accordance to what is required (each exchange has their own set of key values).


Step 3: Configure PV Alerts with Correct Syntax

When your account it working it is time to configure some alerts that will let PV interact with your exchange/account.

Basic Steps in Creating PV Alerts

Perform the following steps for every PV Alert you create.

1. In the PV options page, click the Setup: PV Alerts menu item in the left-side.

2. In the Alert Names text box, enter the name of the alert. Choose a naming convention that will help you recall the purpose and function of the commands within the alert.

3. In the Commands text area, enter your PV commands for the specific action you want to take on the exchange. Example commands are provided in subsequent sections in this guide.

4. Click the Save Alerts button.

5. Click the Add Alert button at the bottom to add another alert panel.

PV Alerts for QFL

Use the above steps to configure the following PV alerts for the QFL indicator:

  • QFL_Base_Created_Spot
  • QFL_Layer_Cracked_Spot
  • QFL_Take_Profit_Crossed_Spot
  • QFL_Stop_Loss_Crossed_Spot

NOTE: Each PV Alert is using syntax to send PV Alert notification to Telegram. Details on how to configure PV and Telegram in order to received these notifications are located in a different section below.

QFL_Base_Created_Spot

Commands
# QFL Base Created
account=[_acct]
# Cancel all open buy orders
cancel=order book=buy id=L1 iferror=continue
cancel=order book=buy id=L2 iferror=continue
cancel=order book=buy id=L3 iferror=continue
cancel=order book=buy id=L4 iferror=continue
cancel=order book=buy id=L5 iferror=continue
cancel=order book=buy id=L6 iferror=continue
cancel=order book=buy id=L7 iferror=continue
delay=1.0
# Setup limit orders for each DCA layer...
id=L1 type=limit book=buy quantity=6.12354% yield=equity price=@[_l1] error=-1 retries=3 notify=telegram:"L1 placed"
delay=1.0
id=L2 type=limit book=buy quantity=7.06060% yield=equity price=@[_l2] error=-1 retries=3 notify=telegram:"L2 placed"
delay=1.0
id=L3 type=limit book=buy quantity=8.27878% yield=equity price=@[_l3] error=-1 retries=3 notify=telegram:"L3 placed"
delay=1.0
id=L4 type=limit book=buy quantity=9.86242% yield=equity price=@[_l4] error=-1 retries=3 notify=telegram:"L4 placed"
delay=1.0
id=L5 type=limit book=buy quantity=11.92114% yield=equity price=@[_l5] error=-1 retries=3 notify=telegram:"L5 placed"
delay=1.0
id=L6 type=limit book=buy quantity=15.59749% yield=equity price=@[_l6] error=-1 retries=3 notify=telegram:"L6 placed"
delay=1.0
id=L7 type=limit book=buy quantity=18.07673% yield=equity price=@[_l7] error=-1 retries=3 notify=telegram:"L7 placed"
# Update the balance amounts that PV stores locally...
updatebalance
Summary

The following is a description of the order of events to fully understand the commands:

1. When a base is created by the QFL Indicator, it will fire the the Base Created alert which will contain the PV Alert named “QFL_Base_Created_Spot” and all the parameters needed for the commands.

2. PV will place (7) limit buy orders using the DCA layers how the QFL Indicator has determined them. If you are using stop loss, a stop loss limit order will be placed as well.

3. It could be that a new Base Created alert will trigger again and when this happens the PV Alert named “QFL_Base_Created_Spot” will execute again (see step 1), and we start all over. All old buy limit orders will be removed, and the stop loss (SL) sell order will be removed and new ones will be placed based on the new base and DCA Layers.

NOTE: the PV Syntax currently is using a “quantity percentage” of your total portfolio. This means that if you are testing/working with one coin it will work fine, but as soon as you add in a second, third or more coins the orders can not be placed because the portfolio funds are already reserved/allocated in previous limit orders.

NOTE: To do a proper calculation you need to know what your exact start portfolio is and know the exact amount of coins you want to trade with using automated QFL Trading. When your funds are too low for you will get an error in PV: ERROR: Balance insufficient!

NOTE: You also need to make sure that the first order is “big” enough to actually make an order, I believe the minimum order size of a trade needs to be $10 per trade. When your defined percentage is too low for the first DCA Layer you will get an error in PV: ERROR: Order size invalid.

QFL_Layer_Cracked_Spot

Commands
# QFL Layer Cracked
account=[_acct]
# Cancel all open sell orders...
cancel=order book=sell iferror=0 retries=3 timeout=3
delay=1.0
# Setup limit sell order to close position...
id=TP book=sell type=post quantity=100% price=@[_tp] notify=telegram:"Setup limit sell order to close position..."
updatebalance
Summary

The following is a description of the order of events to fully understand the commands:

  1. When one DCA layer is cracked, the QFL Indicator will fire the the Layer # Cracked alert which will contain the PV Alert named “QFL_Layer_Cracked_Spot” and all the parameters needed for the commands.
  2. It is assumed that the actual buy will be done on the exchange (so an entry will be done).
  3. A new stop limit (TP) sell order is placed with a new take profit. This will happen every time a new DCA layer is cracked. The old stop limit (TP) sell order will be removed and a new one will be placed.

NOTE: It is possible for the price action to cross multiple layers in a single candle. When this happens, the alert will trigger for each layer that is crossed, but if the timing is too fast, it is possible that the limit order to sell may not include all the accumulated units of the market pair, therefore be aware of any strange anomalies when this happens and review your orders accordingly.

QFL_Take_Profit_Crossed_Spot

Commands
# QFL Take Profit Crossed
account=[_acct]
# Market sell any existing positions...
book=sell type=market quantity=100% iferror=continue notify=telegram:"Market sell any existing positions."
delay=1.0
# Cancel all open buy orders...
cancel=order book=buy retries=3 timeout=3
updatebalance
Summary

When the price goes up after a cracked layer, TP will be hit. When one TP Layer is crossed three things will happen:

  1. TV will fire the alert named “QFL_Take_Profit_Crossed_Spot”.
  2. The actual sell will be done on the exchange. The reason why a market sell order command is used here is to use as a fail safe to the possibility of the TP limit order not having the full amount to be sold or not existing.
  3. All old buy limit orders will be removed, and the stop loss (SL) sell order will be removed.

QFL_Stop_Loss_Crossed_Spot

Commands
# Stop Loss Crossed
account=[_acct]
# Cancel all open sell orders...
cancel=order book=sell err=0
delay=1.0
# Market sell all quantities of holding...
book=sell type=market quantity=100% iferror=continue notify=telegram:"Market sell all quantities of holding..."
updatebalance
Summary

When the price goes down after a cracked layer, another layer will be cracked and so on, until the last layer is cracked and eventually the stop loss is hit. When one SL Layer is crossed three things will happen:

  1. TV will fire the alert named “QFL_Stop_Loss_Crossed_Spot”.
  2. The actual sell will be done on the exchange.
  3. All old buy limit orders will be removed, and the take profit (TP) sell order will be removed.

Step 4: Select High Volatile Trading Pairs/Markets

To find volatile coins to trade with you can use the TV Screener and you can use the QFL strategy to back-test these coins to see if they where profitable in the past. If they are, they will likely be profitable in the future.

NOTE: This is NOT financial advice and I am NOT a financial advisor. Profits made in the past do not guarantee profits in the future so please use this at your own risk.

Using the TV Screener

When you use the TV Screener you will be able to filter on coins of a specific exchange, and filter on coins with a high volatility.

When the filter is applied, make sure you add the Volatility column and make sure you sort the column from high to low and select a few coins that you think are good to trade with and start with the back-test in the next section.

Using the QFL Strategy to View Strategy Tester Results

When you have selected a few coins with a high volatility you can use the QFL Strategy to perform some back-testing.

When you are satisfier with the back-testing results you can start configuring the QFL Indicator settings.

Step 5: Configure the QFL Indicator on TV

When you have applied the QFL indicator on your chart you need to open the indicator settings by clicking on the “wheel”.

When you scroll down you will see the Any Alert () Function Call Settings section and this is where you need to change some parameters.

First you start with the Base Created Message settings and In the text field you specify the exact same name that you have used in the PV Alerts. This way PV will know what commands to perform when a certain alerts is triggered. So the name has to match.

The PV Alert name (and the text you need to specify in the text field.

QFL_Base_Created_Spot(ex=kucoin,acc=kucoin-qfl,L1:{{layer_1_price}},L2:{{layer_2_price}},L3:{{layer_3_price}},L4:{{layer_4_price}},L5:{{layer_5_price}},L6:{{layer_6_price}},L7:{{layer_7_price}})

These alerts are fired when a certain base is cracked.

The PV Alert name and the text you need to specify in the text field. Use the same name for all layers. The PV Alert name and the text you need to specify in the text field.

QFL_Layer_Cracked_Spot(ex=kucoin,acc=kucoin-qfl,TP:{{take_profit_price}})

This alert is fired when the take profit line is cracked.

The PV Alert name and the text you need to specify in the text field.

QFL_Take_Profit_Crossed_Spot(ex=kucoin,acc=kucoin-qfl)

This alert is fired when the stop loss line is cracked. This alert is optional, and when you use this make sure stop loss is enabled in the QFL Indicator settings.

The PV Alert name and the text you need to specify in the text field.

QFL_Stop_Loss_Crossed_Spot(ex=kucoin,acc=kucoin-qfl)

When all settings are done your settings should look something like this:

Step 6: Create TV Alerts on Trading Pairs/Markets

When all settings are configured in STEP 5 you need to add an TV alert on the specific coin you want to trade with.

In the condition field you need to select the QFL Indicator and select the Any alert () function call this will make sure that all the alerts specified in the settings in STEP 5 will be able to function.

NOTE: When you are trading on multiple coins you will need to configure multiple TV alerts, so one alert per coin/market.

Step 7: Wait for Alerts and Fine Tune PV, TV, and QFL

When you are finished with STEP 1 – STEP 6, you need to wait until one of the alerts is triggered starting with the base creation.

In the example below I have described a few examples with what is happening where to you can follow along.

Detailed Audit Checking

Base Created Alert
TV/QFL

On the 14th of December on 23:01 the QFL Indicator generated an alert that a base was created.

This base is displayed and marked with a red ellipse below:

PV

The alert that PV received is logged like this:

2021-12-14 22:59:48.571 NOTICE [6352102139] Received Alert for KUCOIN:DOGEUSDT 1h @ 12-14 22:00:00 / fired 12-14 23:00:01 (100% bar time, 0s slippage) => Commands to run: 
1: QFL_Base_Created_Spot(ex=kucoin,acc=kucoin-qfl,L1:0.17407,L2:0.17048,L3:0.16509,L4:0.15612,L5:0.14177,L6:0.11844,L7:0.09331)
2021-12-14 22:59:48.573 INFO [6352102139-1 => QFL_Base_Created_Spot] Attached parameters found:
 ex: kucoin
 custom1: kucoin
 acc: kucoin-qfl
 custom2: kucoin-qfl
 _l1: 0.17407
 custom3: 0.17407
 _l2: 0.17048
 custom4: 0.17048
 _l3: 0.16509
 custom5: 0.16509
 _l4: 0.15612
 custom6: 0.15612
 _l5: 0.14177
 custom7: 0.14177
 _l6: 0.11844
 custom8: 0.11844
 _l7: 0.09331
 custom9: 0.09331
2021-12-14 22:59:48.573 INFO [6352102139-1 => QFL_Base_Created_Spot] Overriding symbol default: KUCOIN:DOGEUSDT
2021-12-14 22:59:48.573 INFO [6352102139-1 => QFL_Base_Created_Spot] Overriding account default: kucoin-qfl

The log also shows that the commands in the PV alert are executed in a top-down order:

2021-12-14 22:59:48.580 NOTICE [6352102139-1 => QFL_Base_Created_Spot] Commands to run (#99122743209): 
 1: # QFL Base Created
 2: #account=0
 3: #acc=KuCoin
 4: # Cancel all open buy orders
 5: cancel=order book=buy id=L1 iferror=continue
 6: cancel=order book=buy id=L2 iferror=continue
 7: cancel=order book=buy id=L3 iferror=continue
 8: cancel=order book=buy id=L4 iferror=continue
 9: cancel=order book=buy id=L5 iferror=continue
10: cancel=order book=buy id=L6 iferror=continue
11: cancel=order book=buy id=L7 iferror=continue
12: delay=1.0
13: id=L1 type=limit book=buy quantity=6.12354% yield=equity price=@0.17407 error=-1 retries=3 notify=telegram:"L1 placed"
14: delay=1.0
15: id=L2 type=limit book=buy quantity=7.06060% yield=equity price=@0.17048 error=-1 retries=3 notify=telegram:"L2 placed"
16: delay=1.0
17: id=L3 type=limit book=buy quantity=8.27878% yield=equity price=@0.16509 error=-1 retries=3 notify=telegram:"L3 placed"
18: delay=1.0
19: id=L4 type=limit book=buy quantity=9.86242% yield=equity price=@0.15612 error=-1 retries=3 notify=telegram:"L4 placed"
20: delay=1.0
21: id=L5 type=limit book=buy quantity=11.92114% yield=equity price=@0.14177 error=-1 retries=3 notify=telegram:"L5 placed"
22: delay=1.0
23: id=L6 type=limit book=buy quantity=15.59749% yield=equity price=@0.11844 error=-1 retries=3 notify=telegram:"L6 placed"
24: delay=1.0
25: id=L7 type=limit book=buy quantity=18.07673% yield=equity price=@0.09331 error=-1 retries=3 notify=telegram:"L7 placed"
26: delay=1.0
27: #id=L8 type=limit book=buy quantity=23.5

The three main commands are the ones starting with “cancel”, “delay” and “id”.

These commands are runned for each DCA (buy) layer.

Below I will only show the log output for one single layer as they are all the same for all the layers.

The PV command:

5: cancel=order book=buy id=L1 iferror=continue

The PV log output:

2021-12-14 22:59:49.535 INFO [6352102139-1 => QFL_Base_Created_Spot:5 @ kucoin-qfl] KuCoin canceling orders: 
  id: 61b8874d225244000196a895
  symbol: DOGE-USDT
  opType: DEAL
  type: limit
  side: buy
  price: 0.15296
  size: 226.382
  funds: 0
  dealFunds: 0
  dealSize: 0
  fee: 0
  feeCurrency: USDT
  stp: 
  stop: 
  stopTriggered: false
  stopPrice: 0
  timeInForce: GTC
  postOnly: false
  hidden: false
  iceberg: false
  visibleSize: 0
  cancelAfter: 0
  channel: API
  clientOid: L1-6344623523-1-13
  remark: null
  tags: null
  isActive: true
  cancelExist: false
  createdAt: 1639483213974
  tradeType: TRADE
2021-12-14 22:59:49.875 SUCCESS [6352102139-1 => QFL_Base_Created_Spot:5 @ kucoin-qfl] KuCoin Buy order canceled! (L1) 
 Symbol: DOGE-USDT
 Price: 0.15296
 Stopprice: 0
 Side: buy
 Size: 226.382
 Type: limit
 TimeInForce: GTC
 Id: 61b8874d225244000196a895
 ClientOid: L1-6344623523-1-13,
2021-12-14 22:59:49.878 INFO [6352102139-1 => QFL_Base_Created_Spot:5 @ kucoin-qfl] Sent Telegram cancel notification!

The PV command:

12: delay=1.0

The PV log output:

2021-12-14 22:59:57.142 INFO [6352102139-1 => QFL_Base_Created_Spot:12 @ kucoin-qfl] 1 second delay

The PV command:

13: id=L1 type=limit book=buy quantity=6.12354% yield=equity price=@0.17407 error=-1 retries=3 notify=telegram:"L1 placed"

The PV log output:

2021-12-14 22:59:58.825 NOTICE [6352102139-1 => QFL_Base_Created_Spot:13 @ kucoin-qfl] KuCoin available balance(s): 
 USDT: {
  available: 443.99008893
  balance: 565.47996735
 },VRA: {
  available: 7.12204855
  balance: 7.12204855
 },2CRZ: {
  available: 0
  balance: 0
 },ADA: {
  available: 0
  balance: 0
 },ADA3L: {
  available: 0
  balance: 0
 },AXS: {
  available: 0
  balance: 0
 },CIRUS: {
  available: 0
  balance: 0
 },COTI: {
  available: 0
  balance: 0
 },ELON: {
  available: 0
  balance: 0
 },FTM: {
  available: 0
  balance: 0
 },GHX: {
  available: 0
  balance: 0
 },KCS: {
  available: 0
  balance: 0
 },LTC: {
  available: 0
  balance: 0
 },LUNA: {
  available: 0
  balance: 0
 },MATIC: {
  available: 0
  balance: 0
 },MHC: {
  available: 0
  balance: 0
 },NAKA: {
  available: 0
  balance: 0
 },NEAR: {
  available: 0
  balance: 0
 },ODDZ: {
  available: 0
  balance: 0
 },ONE: {
  available: 0
  balance: 0
 },SLP: {
  available: 0
  balance: 0
 },TEL: {
  available: 0
  balance: 0
 },UMB: {
  available: 0
  balance: 0
 },XDC: {
  available: 0
  balance: 0
 },XLM: {
  available: 0
  balance: 0
 },XPR: {
  available: 0
  balance: 0
 }
2021-12-14 22:59:58.830 INFO [6352102139-1 => QFL_Base_Created_Spot:13 @ kucoin-qfl] KuCoin placing order: 
 symbol: DOGE-USDT
 side: buy
 size: 198.9279
 type: limit
 price: 0.17407
 timeInForce: GTC
 clientOid: L1-6352102139-1-13
2021-12-14 22:59:59.194 SUCCESS [6352102139-1 => QFL_Base_Created_Spot:13 @ kucoin-qfl] KuCoin Buy order placed! (L1) 
 OrderID: 61b913ed2252440001d3caa7,
2021-12-14 22:59:59.199 INFO [6352102139-1 => QFL_Base_Created_Spot:13 @ kucoin-qfl] Sent Telegram order notification!
2021-12-14 22:59:59.202 INFO [6352102139-1 => QFL_Base_Created_Spot:13 @ kucoin-qfl] Custom Telegram notification sent: 
L1 placed
KuCoin

The orders placed in KuCoin:

Layer Cracked Alert
TV

On the 15th of December on 16:07 the QFL Indicator generated an alert that a layer was cracked.

PV

The alert that PV received is logged like this:

2021-12-15 16:07:30.148 NOTICE [6363102779] Received Alert for KUCOIN:DOGEUSDT 1h @ 12-15 16:00:00 / fired 12-15 16:07:44 (12.9% bar time, 0s slippage) => Commands to run: 
1: QFL_Layer_Cracked_Spot(ex=kucoin,acc=kucoin-qfl,TP:0.18312)
2021-12-15 16:07:30.153 INFO [6363102779-1 => QFL_Layer_Cracked_Spot] Attached parameters found:
 ex: kucoin
 custom1: kucoin
 acc: kucoin-qfl
 custom2: kucoin-qfl
 _tp: 0.18312
 custom3: 0.18312
2021-12-15 16:07:30.153 INFO [6363102779-1 => QFL_Layer_Cracked_Spot] Overriding symbol default: KUCOIN:DOGEUSDT
2021-12-15 16:07:30.154 INFO [6363102779-1 => QFL_Layer_Cracked_Spot] Overriding account default: kucoin-qfl

The log also shows that the commands in the PV alert are executed in a top-down order:

2021-12-15 16:07:30.155 NOTICE [6363102779-1 => QFL_Layer_Cracked_Spot] Commands to run (#99122812545): 
1: # QFL Layer Cracked
2: #account=0
3: # Cancel all open sell orders
4: cancel=order book=sell iferror=0 retries=3 timeout=3
5: delay=1.0
6: # Setup limit sell order to close position...
7: id=TP book=sell type=post quantity=100% price=@0.18312 notify=telegram:"Setup limit sell order to close position..."

The three main commands are the ones starting with “cancel”, “delay” and “id”.

Below I will only show the log output for one single layer as they are all the same for all the layers.

The PV command:

4: cancel=order book=sell iferror=0 retries=3 timeout=3

The PV log output:

2021-12-15 16:07:30.922 INFO [6363102779-1 => QFL_Layer_Cracked_Spot:4 @ kucoin-qfl] KuCoin no orders open!

The PV command:

5: delay=1.0

The PV log output:

2021-12-15 16:07:30.923 INFO [6363102779-1 => QFL_Layer_Cracked_Spot:5 @ kucoin-qfl] 1 second delay

The PV command:

7: id=TP book=sell type=post quantity=100% price=@0.18312 notify=telegram:"Setup limit sell order to close position..."

The PV log output:

2021-12-15 16:07:32.491 NOTICE [6363102779-1 => QFL_Layer_Cracked_Spot:7 @ kucoin-qfl] KuCoin available balance(s): 
 USDT: {
  available: 8.5840265
  balance: 456.18973703
 },EOSC: {
  available: 0
  balance: 5397.6391
 },DOGE: {
  available: 198.9279
  balance: 198.9279
 },VRA: {
  available: 7.12204855
  balance: 7.12204855
 },2CRZ: {
  available: 0
  balance: 0
 },ADA: {
  available: 0
  balance: 0
 },ADA3L: {
  available: 0
  balance: 0
 },AXS: {
  available: 0
  balance: 0
 },CIRUS: {
  available: 0
  balance: 0
 },COTI: {
  available: 0
  balance: 0
 },ELON: {
  available: 0
  balance: 0
 },FTM: {
  available: 0
  balance: 0
 },GHX: {
  available: 0
  balance: 0
 },KCS: {
  available: 0
  balance: 0
 },LTC: {
  available: 0
  balance: 0
 },LUNA: {
  available: 0
  balance: 0
 },MATIC: {
  available: 0
  balance: 0
 },MHC: {
  available: 0
  balance: 0
 },NAKA: {
  available: 0
  balance: 0
 },NEAR: {
  available: 0
  balance: 0
 },ODDZ: {
  available: 0
  balance: 0
 },ONE: {
  available: 0
  balance: 0
 },SLP: {
  available: 0
  balance: 0
 },TEL: {
  available: 0
  balance: 0
 },UMB: {
  available: 0
  balance: 0
 },XDC: {
  available: 0
  balance: 0
 },XLM: {
  available: 0
  balance: 0
 },XPR: {
  available: 0
  balance: 0
 }
2021-12-15 16:07:32.493 INFO [6363102779-1 => QFL_Layer_Cracked_Spot:7 @ kucoin-qfl] KuCoin placing order: 
 symbol: DOGE-USDT
 side: sell
 size: 198.9279
 type: limit
 price: 0.18312
 timeInForce: GTC
 postOnly: true
 clientOid: TP-6363102779-1-7
2021-12-15 16:07:32.757 SUCCESS [6363102779-1 => QFL_Layer_Cracked_Spot:7 @ kucoin-qfl] KuCoin Sell order placed! (TP) 
 OrderID: 61ba04c32252440001ffa16e,
2021-12-15 16:07:32.759 INFO [6363102779-1 => QFL_Layer_Cracked_Spot:7 @ kucoin-qfl] Sent Telegram order notification!
2021-12-15 16:07:32.761 INFO [6363102779-1 => QFL_Layer_Cracked_Spot:7 @ kucoin-qfl] Custom Telegram notification sent: 
Setup limit sell order to close position...
2021-12-15 16:07:32.762 INFO [6363102779-1 => QFL_Layer_Cracked_Spot:7 @ kucoin-qfl] Executed 3 commands in 2.61s – DONE!
2021-12-15 16:07:34.422 INFO Saving local data...
2021-12-15 16:07:35.482 ERROR Error sending Telegram notification: 400  (escape all single underscores in custom messages or use dashes instead!)
KuCoin

The orders placed in KuCoin:

Take Profit Alert
TV

On the 15th of December on 20:03 the QFL Indicator generated an alert that a tale profit was cracked.

PV

The alert that PV received is logged like this:

2021-12-15 20:03:30.193 NOTICE [6366389583] Received Alert for KUCOIN:DOGEUSDT 1h @ 12-15 20:00:00 / fired 12-15 20:03:44 (6.2% bar time, 0s slippage) => Commands to run: 
1: QFL_Take_Profit_Crossed_Spot(ex=kucoin,acc=kucoin-qfl)
2021-12-15 20:03:30.197 INFO [6366389583-1 => QFL_Take_Profit_Crossed_Spot] Attached parameters found:
 ex: kucoin
 custom1: kucoin
 acc: kucoin-qfl
 custom2: kucoin-qfl
2021-12-15 20:03:30.197 INFO [6366389583-1 => QFL_Take_Profit_Crossed_Spot] Overriding symbol default: KUCOIN:DOGEUSDT
2021-12-15 20:03:30.198 INFO [6366389583-1 => QFL_Take_Profit_Crossed_Spot] Overriding account default: kucoin-qfl

The log also shows that the commands in the PV alert are executed in a top-down order:

2021-12-15 20:03:30.204 NOTICE [6366389583-1 => QFL_Take_Profit_Crossed_Spot] Commands to run (#99122851425): 
1: # QFL Take Profit Crossed
2: #account=0
3: # Market sell any existing positions
4: book=sell type=market quantity=100% iferror=continue notify=telegram:"Market sell any existing positions."
5: delay=1.0
6: # Cancel all open buy orders
7: cancel=order book=buy retries=3 timeout=3

The three main commands are the ones starting with “book”, “delay” and “cancel”.

Below I will only show the log output for one single layer as they are all the same for all the layers.

The PV command:

4: book=sell type=market quantity=100% iferror=continue notify=telegram:"Market sell any existing positions."

The PV log output:

2021-12-15 20:03:30.771 NOTICE [6366389583-1 => QFL_Take_Profit_Crossed_Spot:4 @ kucoin-qfl] KuCoin available balance(s): 
 USDT: {
  available: 8.5840265
  balance: 416.2235482
 },DOGE: {
  available: 234.1991
  balance: 433.127
 },EOSC: {
  available: 0
  balance: 5397.6391
 },VRA: {
  available: 7.12204855
  balance: 7.12204855
 },2CRZ: {
  available: 0
  balance: 0
 },ADA: {
  available: 0
  balance: 0
 },ADA3L: {
  available: 0
  balance: 0
 },AXS: {
  available: 0
  balance: 0
 },CIRUS: {
  available: 0
  balance: 0
 },COTI: {
  available: 0
  balance: 0
 },ELON: {
  available: 0
  balance: 0
 },FTM: {
  available: 0
  balance: 0
 },GHX: {
  available: 0
  balance: 0
 },KCS: {
  available: 0
  balance: 0
 },LTC: {
  available: 0
  balance: 0
 },LUNA: {
  available: 0
  balance: 0
 },MATIC: {
  available: 0
  balance: 0
 },MHC: {
  available: 0
  balance: 0
 },NAKA: {
  available: 0
  balance: 0
 },NEAR: {
  available: 0
  balance: 0
 },ODDZ: {
  available: 0
  balance: 0
 },ONE: {
  available: 0
  balance: 0
 },SLP: {
  available: 0
  balance: 0
 },TEL: {
  available: 0
  balance: 0
 },UMB: {
  available: 0
  balance: 0
 },XDC: {
  available: 0
  balance: 0
 },XLM: {
  available: 0
  balance: 0
 },XPR: {
  available: 0
  balance: 0
 }
2021-12-15 20:03:30.775 INFO [6366389583-1 => QFL_Take_Profit_Crossed_Spot:4 @ kucoin-qfl] KuCoin placing order: 
 symbol: DOGE-USDT
 side: sell
 size: 234.1991
 type: market
 clientOid: 6366389583-1-4
2021-12-15 20:03:31.071 SUCCESS [6366389583-1 => QFL_Take_Profit_Crossed_Spot:4 @ kucoin-qfl] KuCoin Sell order placed! 
 OrderID: 61ba3c11145dda0001fa6975,
2021-12-15 20:03:31.074 INFO [6366389583-1 => QFL_Take_Profit_Crossed_Spot:4 @ kucoin-qfl] Sent Telegram order notification!
2021-12-15 20:03:31.076 INFO [6366389583-1 => QFL_Take_Profit_Crossed_Spot:4 @ kucoin-qfl] Custom Telegram notification sent: 
Market sell any existing positions.

The PV command:

5: delay=1.0

The PV log output:

2021-12-15 20:03:31.078 INFO [6366389583-1 => QFL_Take_Profit_Crossed_Spot:5 @ kucoin-qfl] 1 second delay
2021-12-15 20:03:31.146 ERROR Error sending Telegram notification: 400  (escape all single underscores in custom messages or use dashes instead!)

The PV command:

7: cancel=order book=buy retries=3 timeout=3

The PV log output:

2021-12-15 20:03:33.006 INFO [6366389583-1 => QFL_Take_Profit_Crossed_Spot:7 @ kucoin-qfl] KuCoin canceling orders: 
  id: 61b913fac1ef2f0001db4598
  symbol: DOGE-USDT
  opType: DEAL
  type: limit
  side: buy
  price: 0.09331
  size: 1095.4912
  funds: 0
  dealFunds: 0
  dealSize: 0
  fee: 0
  feeCurrency: USDT
  stp: 
  stop: 
  stopTriggered: false
  stopPrice: 0
  timeInForce: GTC
  postOnly: false
  hidden: false
  iceberg: false
  visibleSize: 0
  cancelAfter: 0
  channel: API
  clientOid: L7-6352102139-1-25
  remark: null
  tags: null
  isActive: true
  cancelExist: false
  createdAt: 1639519226408
  tradeType: TRADE
 },{
  id: 61b913f8e5edc900019ee13c
  symbol: DOGE-USDT
  opType: DEAL
  type: limit
  side: buy
  price: 0.11844
  size: 744.6866
  funds: 0
  dealFunds: 0
  dealSize: 0
  fee: 0
  feeCurrency: USDT
  stp: 
  stop: 
  stopTriggered: false
  stopPrice: 0
  timeInForce: GTC
  postOnly: false
  hidden: false
  iceberg: false
  visibleSize: 0
  cancelAfter: 0
  channel: API
  clientOid: L6-6352102139-1-23
  remark: null
  tags: null
  isActive: true
  cancelExist: false
  createdAt: 1639519224396
  tradeType: TRADE
 },{
  id: 61b913f69d93dd0001c35dc3
  symbol: DOGE-USDT
  opType: DEAL
  type: limit
  side: buy
  price: 0.14177
  size: 475.5001
  funds: 0
  dealFunds: 0
  dealSize: 0
  fee: 0
  feeCurrency: USDT
  stp: 
  stop: 
  stopTriggered: false
  stopPrice: 0
  timeInForce: GTC
  postOnly: false
  hidden: false
  iceberg: false
  visibleSize: 0
  cancelAfter: 0
  channel: API
  clientOid: L5-6352102139-1-21
  remark: null
  tags: null
  isActive: true
  cancelExist: false
  createdAt: 1639519222527
  tradeType: TRADE
 },{
  id: 61b913f434b3b90001a87f8b
  symbol: DOGE-USDT
  opType: DEAL
  type: limit
  side: buy
  price: 0.15612
  size: 357.2252
  funds: 0
  dealFunds: 0
  dealSize: 0
  fee: 0
  feeCurrency: USDT
  stp: 
  stop: 
  stopTriggered: false
  stopPrice: 0
  timeInForce: GTC
  postOnly: false
  hidden: false
  iceberg: false
  visibleSize: 0
  cancelAfter: 0
  channel: API
  clientOid: L4-6352102139-1-19
  remark: null
  tags: null
  isActive: true
  cancelExist: false
  createdAt: 1639519220593
  tradeType: TRADE
 },{
  id: 61b913f1145dda0001dcb488
  symbol: DOGE-USDT
  opType: DEAL
  type: limit
  side: buy
  price: 0.16509
  size: 283.5716
  funds: 0
  dealFunds: 0
  dealSize: 0
  fee: 0
  feeCurrency: USDT
  stp: 
  stop: 
  stopTriggered: false
  stopPrice: 0
  timeInForce: GTC
  postOnly: false
  hidden: false
  iceberg: false
  visibleSize: 0
  cancelAfter: 0
  channel: API
  clientOid: L3-6352102139-1-17
  remark: null
  tags: null
  isActive: true
  cancelExist: false
  createdAt: 1639519217650
  tradeType: TRADE
2021-12-15 20:03:34.230 SUCCESS [6366389583-1 => QFL_Take_Profit_Crossed_Spot:7 @ kucoin-qfl] KuCoin 5 Buy orders canceled! 
 Symbol: DOGE-USDT
 Price: 0.16509
 Stopprice: 0
 Side: buy
 Size: 283.5716
 Type: limit
 TimeInForce: GTC
 Id: 61b913f1145dda0001dcb488
 ClientOid: L3-6352102139-1-17,
2021-12-15 20:03:34.233 INFO [6366389583-1 => QFL_Take_Profit_Crossed_Spot:7 @ kucoin-qfl] Sent Telegram cancel notification!
2021-12-15 20:03:34.233 INFO [6366389583-1 => QFL_Take_Profit_Crossed_Spot:7 @ kucoin-qfl] Executed 3 commands in 4.03s – DONE!
2021-12-15 20:03:34.243 ERROR Error sending Telegram notification: 400  (escape all single underscores in custom messages or use dashes instead!)
KuCoin

The orders placed in KuCoin:

Tools

Quantity Percentage Calculator

The PV alert syntax in the examples above are using the “percentage” quantity of your total portfolio (PF) to work with.

When you are only trading on one single market/coin this works perfectly. With trading you want to make multiple trades with multiple coins, as you want to spreas your chances of winning. This also means that the “percentage” quantity setting will not work because if your PF is allocated in one single trade and stuck in buy limit orders, you will not be able to use your PF in other markets/coins.

For this reason it is important to divide your percentages with the amount of markets/coins you are trading with.

I have created a simple calculator that will take the default QFL buy in percentages per DCA Layer, and with this information you can specify your PF and the number of markets/coins you want to trade on and the calculator will show you exactly what DCA percentage you should use in the PV Alert QFL_Base_Created_Spot.

This calculator can he found here:

https://docs.google.com/spreadsheets/d/1LQJyMP3DPuJ0Gcpr-NqEP64eD87Ns7PRJeouW2R-FAk/edit#gid=1889642464

In the default example I am trading on 4 coins/markets with a portfolio (PF) of $10.000:

With the above calculation my PV Alert “QFL_Base_Created_Spot” syntax would look like this:

# QFL Base Created
#account=[_acct]
#acc=KuCoin
# Cancel all open buy orders
cancel=order book=buy id=L1 iferror=continue
cancel=order book=buy id=L2 iferror=continue
cancel=order book=buy id=L3 iferror=continue
cancel=order book=buy id=L4 iferror=continue
cancel=order book=buy id=L5 iferror=continue
cancel=order book=buy id=L6 iferror=continue
cancel=order book=buy id=L7 iferror=continue
delay=1.0
id=L1 type=limit book=buy quantity=1.53% yield=equity price=@[_l1] error=-1 retries=3 notify=telegram:"L1 placed"
delay=1.0
id=L2 type=limit book=buy quantity=1.77% yield=equity price=@[_l2] error=-1 retries=3 notify=telegram:"L2 placed"
delay=1.0
id=L3 type=limit book=buy quantity=2.07% yield=equity price=@[_l3] error=-1 retries=3 notify=telegram:"L3 placed"
delay=1.0
id=L4 type=limit book=buy quantity=2.47% yield=equity price=@[_l4] error=-1 retries=3 notify=telegram:"L4 placed"
delay=1.0
id=L5 type=limit book=buy quantity=2.98% yield=equity price=@[_l5] error=-1 retries=3 notify=telegram:"L5 placed"
delay=1.0
id=L6 type=limit book=buy quantity=3.90% yield=equity price=@[_l6] error=-1 retries=3 notify=telegram:"L6 placed"
delay=1.0
id=L7 type=limit book=buy quantity=4.52% yield=equity price=@[_l7] error=-1 retries=3 notify=telegram:"L7 placed"
delay=1.0

Optional: Sending Notifications to Telegram

The above PV Syntax includes the option to send information about the PV Alerts when triggered to Telegram.

In order to configure this you need to follow the steps below:

  1. Create a new bot using @BotFather
  2. Specify a “Bot Name”
    • The name I have used here is “profitview”
  3. Specify a “Bot username”
    • The name I have used here is “<removed>_profitview_bot”
  4. An HTTP API will be generated
    • The HTTP API is “2005<removed>:AAE<removed>”

5. Retrieve your Telegram “chat id” by adding @RawDataBot and start a conversation

o The Telegram ID that I have is “487<removed>”

6. Configure PV and test the bot

Select “Yes” to perform the test.

Click on “OK“.

When the test is successful you should see the following output in your Telegram App.

Send me an email when this page has been updated

Leave a Reply

Your email address will not be published.