Advanced features of PT Feeder

Trading View Alerts

Introduction

If the technical analysis functionality of ProfitTrailer is not enough, PT Feeder can be setup to react on strategies that you have setup in Trading View but you will need a paid for subscription after a certain number of alerts.

PT Feeder reacts on email alerts that are sent from Trading View went conditions are met. This is because Trading View does not provide an api to listen to these alerts. This does mean there are some pros and cons of using PT Feeder for trading view alerts versus something like AutoView

PT Feeder Pros

  • Use Profit Trailer trailing to buy
  • Runs in the background without needing any Chrome window open
  • Re-confirm buy using ProfitTrailer indicators
  • Ability to change every ProfitTrailer property based on the alert
  • Combine a ProfitTrailer strategy with alerts in one bot (e.g scalp with TradingView and swing trade with ProfitTrailer)

PT Feeder Cons

  • Delay. As PT Feeder uses email, there will be a bigger delay in reacting to the alerts (see below)
  • Dependent on the latency of your email provider as a middleman.
  • Intentional frequency of writing ProfitTrailer config files every 10 seconds as not to overload ProfitTrailer detecting config changes.

AutoView Pros

  • Direct connection to the exchange so quicker reaction
  • No other middle man like your email provider as a point of failure

AutoView Cons

  • Need to keep Chrome open
  • Cannot validate buy. Buy happens when the alert is triggered.

A couple of notes on the above.

Intentionally, there is nothing on the sell strategy in these pros and cons. PT Feeder will revert back to your normal sell strategies after the period set in 'SignalLength' in your hostsettings, and this is minutes. This is because if you are using trading view to also alert your sell, then there is no need to use ProfitTrailer. You can fully use AutoView as ProfitTrailer is redunant in this scenario.

Second comment is on delay. From speaking to people who use AutoView, the delay in a buy seems to be about 10 seconds. From testing PT Feeder and using Gmail as a email provider, the alert comes into Profit Trailer within 20 seconds. This is however dependent on the delay of you mail provider.

An example is outlined here

Due to this, my personal recommendation is that if you use 1 min candles on trading view, then PT Feeder is not the best tool for you. For anything above, I feel the fact that you get trailing buys, outweighs any latency that you may encounter.

Setup

  1. Setup a new Gmail account here

Note that PT Feeder searches for unread mail as a new alert so a new email which isn't being checked is required.

  1. Enable IMAP access on your email account like below:

Imap enable

  1. Setup PT Feeder hostsettings to access email like below as an example:
  "Email": {
    "ImapServer": "imap.gmail.com",
    "ImapPort": 993,
    "ImapUsername": "EMAIL ADDRESS",
    "ImapPassword": "PASSWORD",
    "FromAddress": "noreply@tradingview.com",
    "Subject": "TradingView Alert" 
  },
  1. Setup your appsettings to change settings based on a signal. Below is an example.
  "TradingViewSignalsGrouping": {
    "Condition": "[pair.SignalDetected] == true",
    "Configs": [
      {
        "MinBuyVolumeOffset": "-75",
        "TrailingProfitOffset": "100",
        "InitialCostPercentageOffset": "100",
        "Override": {
          "DcaRebuyTimeout": "30",
          "RebuyTimeout": "120",
          "ABuyStrategy": "RSI",
          "ABuyValue": "45",
          "BBuyStrategy": "DISABLED",
          "CBuyStrategy": "DISABLED",
          "Weight": "100"
        }
      }
    ]
  },
  1. Setup your alerts on Trading View. The alert message can be just the name of the pair in the format, EXCHANGE:QUOTEBASE, for example BINANCE:QTUMBTC and you can add the word SET and specify alert specific PT properties.

An example of an alert message

BINANCE:QTUMBTC
SET
ABuyStrategy=RSI
ABuyValue=55
BBuyStrategy=DISABLED
Weight=150

OR

BINANCE:QTUMBTC

alerts

The alerts are valid for how long you set SignalLength in your hostsettings.json (default is 15 mins) After this time, the setting for that coin will revert back to the DEFAULT settings or any other pair overrides you have.

Alert strategies

We have tested Trading View alerts with the following paid for strategies. Please let us know if you find any other good ones and we can add them to this list

Gnome Alerts Pro

Bitcoin Ninja's (mention that you want to use with PT Feeder)

QuickAlerts

A chrome plugin is available which is highly reccomended. It manages your alerts via CSV file so you upload mutiple alerts in one go and and edit them via Excel or another spreadsheet programme. It works with both the signal scripts below. It can be found here

Create your own groupings

Introduction

When using pair specific groupings like PriceTrendChangeGrouping, there is a condition behind the scenes that needs to be true for overrides and offsets to be applied. In this case, the price change over MinutesToMeasureTrend has to be lower than the trigger, MaxPriceTrendPercentageChange, for the condition to be true.

But you can create your own custom conditions based on the properties the are available to you.

Below are the properties available

Pair Properties Available

pair.DcaEnabled
pair.SellOnlyModeEnabled

pair.BaseCurrency
pair.QuoteCurrency
pair.FirstSeen

pair.Volume //24 hour volume
pair.LastPrice

pair.PercentageChange //over MinutesToMeasureTrend
pair.LongerTermTrendPercentageChange
pair.MediumTermTrendPercentageChange

pair.VolumePercentageChange //over MinutesToMeasureTrend
pair.LongerTermVolumeTrendPercentageChange
pair.MediumTermVolumeTrendPercentageChange

pair.HighLowPercentageChange
pair.HighLowPercentageChangeLongTerm
pair.HighLowPercentageChangeMediumTerm

pair.HighLowVolumePercentageChange
pair.HighLowVolumePercentageChangeLongTerm

// This is the Downside Volatility calculation
pair.ActualTrailingBuy //over MinutesToMeasureTrend
pair.MediumTermActualTrailingBuy
pair.LongerTermActualTrailingBuy

// This is the Upside Volatility calculation
pair.ActualTrailingProfit //over MinutesToMeasureTrend
pair.MediumTermActualTrailingProfit
pair.LongerTermActualTrailingProfit

pair.TrailingProfit
pair.TrailingBuy

Market Properties Available

market.TopCoinsChange,
market.MediumTermTopCoinsChange,
market.LongTermCoinsChange,

market.VwapChange,
market.MediumTermVwapChange,
market.LongTermVwapChange,

market.BaseCoinPriceChange,
market.MediumTermBaseCoinPriceChange,
market.LongTermBaseCoinPriceChange

Worked Example

Lets say we wanted to create a grouping that reacted on the relative percentage change of a coin compared to its base coin.

  1. Firstly we create the grouping. It can be called anything as long as it ends with Grouping.
"WikiExampleGrouping": {
    "Configs": [
      {
        
      },
    ]
  },
  1. We then need to add the condition element.

 







"WikiExampleGrouping": {
    "Condition": "",
    "Configs": [
      {
        
      },
    ]
  },
  1. The properties available need to be in square brackets and any operators need to be standard C# operators. A simple list can be found here under Arithmetic, Relational and Logical. We want to take the base coin change and subtract the price change of coin. If this value is less than the trigger, then we want to act.

The trigger is created using [config.TriggerName].


 







"WikiExampleGrouping": {
    "Condition": "[market.BaseCoinPriceChange] - [pair.PercentageChange] <= [config.TriggerName] ",
    "Configs": [
      {
        "TriggerName": "-1",
      },
    ]
  },
  1. Then we can apply offsets and overrides as we normally do
"WikiExampleGrouping": {
    "Condition": "[market.BaseCoinPriceChange] - [pair.PercentageChange] <= [config.TriggerName] ",
    "Configs": [
      {
        "TriggerName": "-1",
        "TrailingProfitOffset": "100",
        "InitialCostPercentageOffset": "100",
        "Override": {
          "DcaRebuyTimeout": "30",
          "DcaBuyTrigger": "-5",
          "RebuyTimeout": "120",
          "TrailingBuy": "0",
          "ABuyStrategy": "RSI",
          "ABuyValue": "45",
          "BBuyStrategy": "DISABLED",
          "CBuyStrategy": "DISABLED",
          "Weight": "100"
        }
      },
    ]
  },

Thoughts on how this can be used

The possiblities are endless. Send me a direct message on how you have used this and I will add in here including examples.

  • Look at the difference between different time trends.
  • Look at the difference between different volume trends.
  • Action if the coin is a paticular coin name
  • Only action if the market is going down and the coin is going down
  • Only action if the coin is going up but the market is going down
  • Compare different volatility calculations