Skip to main content
Latest Crypto Fear & Greed Index


New Pine Script Stratgey: Buy on Whale Signal


This startegy is adapted from an indicator, Multiple Strategies by Lupown. There were many indicators on this script originally, but i have simplified it to only Whale detector, which is thanks to BLACKCAT1404. 

Startegy Description: It places buy order when then whale detector bar reaches certain threshold level which you can adjust as well as the Take Profit and Stop Loss.

Recommended Settings:

Pair: BTCUSDT (Binance)

Time frame: 7min

Initial Capital: 100

Base Currency: Default

Order Size: 95% equity

Pyramiding: 1 order

Commission: 0.1 %

Each pair of token has different threshold, suitable time frame, TP and SL. Aa a matter of fact, Even different CEX may produce result for the same coin. You have to test one by one to get the best result. Do share your best strategy setting in the comment. 

*credit to LUPOWN and BLACKCAT1404   


//@version=4
strategy("WHALE pump signal [credit to Lupown,Blackcat1404]", overlay=false, initial_capital = 100, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent , commission_value=0.1)

// Desc: Best setting ETH TF7min Thres 30 TP6 SL3 Scale1000

// Input parameters
whale_threshold = input(30, title="Whale Threshold")
profit_target_percent = input(6, title="Profit Target (%)")
stop_loss_percent = input(3, title="Stop Loss (%)")
scale = input(1000, title="Scale Factor")
show_whale = input(true,title = "Show Whale detector")

/////////////////WHALE BY BLACKCAT1404

//functions
xrf(values, length) =>
    r_val = float(na)
    if length >= 1
        for i = 0 to length by 1
            if na(r_val) or not na(values[i])
                r_val  :=  values[i]
                r_val
    r_val

xsa(src,len,wei) =>
    sumf = 0.0
    ma = 0.0
    out = 0.0
    sumf  :=  nz(sumf[1]) - nz(src[len]) + src
    ma  :=  na(src[len]) ? na : sumf/len
    out  :=  na(out[1]) ? ma : (src*wei+out[1]*(len-wei))/len
    out

//trend follower algorithm
var2 = xrf(low,1)
var3 = xsa(abs(low-var2),3,1)/xsa(max(low-var2,0),3,1)*100
var4 = ema(iff(close*1.2,var3*10,var3/10),3)
var5 = lowest(low,30)
var6 = highest(var4,30)
var7 = iff(lowest(low,58),1,0)
var8 = ema(iff(low<=var5,(var4+var6*2)/2,0),3)/618*var7

//plotcandle(0,var8 * (close/scale) ,0,var8* (close/scale),color= var8 > 0 and show_whale ?color.yellow:na)

plot(show_whale? var8 * (close/scale) : na, title = "whale" , style = plot.style_columns,color=color.yellow, transp=80)


    // Define whale pump condition
whale_pump_condition = var8 * (close/scale) > whale_threshold

// Strategy logic
if (whale_pump_condition)
    strategy.entry("Buy", strategy.long)
   
// Calculate profit target and stop loss levels
entry_price = strategy.position_avg_price
profit_target = entry_price * (1 + profit_target_percent / 100)
stop_loss = entry_price * (1 - stop_loss_percent / 100)

// Exit conditions
strategy.exit("Take Profit/Stop Loss", "Buy", limit=profit_target, stop=stop_loss)


*updated 22/4/2024

*Do share strategy in the comments section

Comments

  1. // Tested: TF7min
    //BTC Binance Thres 30 TP6 SL3 Scale 1000
    //ETH Binance - Not suitable
    //SEI Binance Thres 133 TP11 SL5 Scale 1
    //MATIC Bincane Thres 141 TP11 SL5 Scale 1
    //FET Binance Thres 30 TP13 SL3 Scale 10
    //RNDR Binance Thres 40 TP9 SL3 Scale 10

    //Tested : 3min
    //BTC Binance Thres 30 TP6 SL3 Scale 1000 (lower lost but lower profit)

    ReplyDelete
  2. //AGIX ByBit Thres 12 TP9 SL3 Scale 1
    //RSS3 ByBit Thres 30 TP9 SL3 Scale 1
    //WLD ByBit - not suitable

    ReplyDelete

Post a Comment

Popular posts from this blog

How to use trading bots?

 This video here explains how to install trading bot using TradingView and Trader Adaptor TraderAdapter link:  https://tradeadapter.com/ More detailed explanation and walk through updated on this page here.. How to start your own trading bots

Reserve Audit vs Exchange Reserves Data

If  you look into this top crypto exchanger list, there are some with Reserve Audit and some with the latter. Some with none at all. The list here by CoinMarketCap   https://coinmarketcap.com/rankings/exchanges/   What is Reserve Audit? A reserve audit is a process that involves verifying and validating the financial reserves held by a cryptocurrency exchange. It is conducted to ensure that the exchange has sufficient funds to cover its customers' deposits and withdrawals. The audit typically involves independent third-party firms or auditors who examine the exchange's bank accounts and cryptocurrency wallets to confirm the existence and accuracy of the declared reserves. The purpose of a reserve audit is to enhance transparency and instill confidence in the exchange's operations. What is Exchange Reserves Data? Exchange reserve data refers to the information or data related to the reserves held by a cryptocurrency exchange. This data can include details about the types and

Comparison between 2 Smart Rebalance Bot

Smart rebalance is one of the kinda new features offered by many Centralized exchanger (CEX). And it has come to my liking during bull run u can cover many tokens than just run 1 single token with 1 bot. Because most tokens/coins price do not move parallel to each other, it will automatically buy at low, sell at high each coins in order to rebalance the proportion that you have preset.  But this strategy works best during bullrun. During bearish period, when all coins go down, u will still see decline of the portfolio worth. Usually i use this bot for coins that i have high convictions on them i would HODL them for long.  Here, I just wanna share smart rebalance bots from 2 different CEX. They are from Kucoin and BitGet. The following are the snapshots of the running bot after 60days. BitGet Smart Rebalance Bot Kucoin Smart Rebalance Bot I started out with Bitget first, then after several hours, i decided to make comparison with Kucoin. I ran them for two months.  I chose BTC, ETH, LIN