TradingView
dokang
2022年9月27日午前4時17分

PineHelper 

Bitcoin / TetherUSBinance

詳細

Library "PineHelper"
This library provides various functions to reduce your time.

recent_opentrade_entry_bar_index()
  get a recent opentrade entry bar_index
  Returns: (int) bar_index

recent_closedtrade_entry_bar_index()
  get a recent closedtrade entry bar_index
  Returns: (int) bar_index

recent_closedtrade_exit_bar_index()
  get a recent closedtrade exit bar_index
  Returns: (int) bar_index

all_opnetrades_roi()
  get all aopentrades roi
  Returns: (float) roi

bars_since_recent_opentrade_entry()
  get bars since recent opentrade entry
  Returns: (int) number of bars

bars_since_recent_closedtrade_entry()
  get bars since recent closedtrade entry
  Returns: (int) number of bars

bars_since_recent_closedtrade_exit()
  get bars since recent closedtrade exit
  Returns: (int) number of bars

recent_opentrade_entry_id()
  get recent opentrade entry ID
  Returns: (string) entry ID

recent_closedtrade_entry_id()
  get recent closedtrade entry ID
  Returns: (string) entry ID

recent_closedtrade_exit_id()
  get recent closedtrade exit ID
  Returns: (string) exit ID

recent_opentrade_entry_price()
  get recent opentrade entry price
  Returns: (float) price

recent_closedtrade_entry_price()
  get recent closedtrade entry price
  Returns: (float) price

recent_closedtrade_exit_price()
  get recent closedtrade exit price
  Returns: (float) price

recent_opentrade_entry_time()
  get recent opentrade entry time
  Returns: (int) time

recent_closedtrade_entry_time()
  get recent closedtrade entry time
  Returns: (int) time

recent_closedtrade_exit_time()
  get recent closedtrade exit time
  Returns: (int) time

time_since_recent_opentrade_entry()
  get time since recent opentrade entry
  Returns: (int) time

time_since_recent_closedtrade_entry()
  get time since recent closedtrade entry
  Returns: (int) time

time_since_recent_closedtrade_exit()
  get time since recent closedtrade exit
  Returns: (int) time

recent_opentrade_size()
  get recent opentrade size
  Returns: (float) size

recent_closedtrade_size()
  get recent closedtrade size
  Returns: (float) size

all_opentrades_size()
  get all opentrades size
  Returns: (float) size

recent_opentrade_profit()
  get recent opentrade profit
  Returns: (float) profit

all_opentrades_profit()
  get all opentrades profit
  Returns: (float) profit

recent_closedtrade_profit()
  get recent closedtrade profit
  Returns: (float) profit

recent_opentrade_max_runup()
  get recent opentrade max runup
  Returns: (float) runup

recent_closedtrade_max_runup()
  get recent closedtrade max runup
  Returns: (float) runup

recent_opentrade_max_drawdown()
  get recent opentrade maxdrawdown
  Returns: (float) mdd

recent_closedtrade_max_drawdown()
  get recent closedtrade maxdrawdown
  Returns: (float) mdd

max_open_trades_drawdown()
  get max open trades drawdown
  Returns: (float) mdd

recent_opentrade_commission()
  get recent opentrade commission
  Returns: (float) commission

recent_closedtrade_commission()
  get recent closedtrade commission
  Returns: (float) commission

qty_by_percent_of_equity(percent)
  get qty by percent of equtiy
  Parameters:
    percent: (series float) percent that you want to set
  Returns: (float) quantity

qty_by_percent_of_position_size(percent)
  get size by percent of position size
  Parameters:
    percent: (series float) percent that you want to set
  Returns: (float) size

is_day_change()
  get bool change of day
  Returns: (bool) day is change or not

is_in_trade()
  get bool using number of bars
  Returns: (bool) allowedToTrade

discord_message(name, message)
  get json format discord message
  Parameters:
    name: (string) name of bot
    message: (string) message that you want to send
  Returns: (string) json format string

telegram_message(chat_id, message)
  get json format telegram message
  Parameters:
    chat_id: (string) chatId of bot
    message: (string) message that you want to send
  Returns: (string) json format string

リリースノート

v2
Change comparision operation ">0" to "!="

リリースノート

v3

Add helper functions

is_first_day()
  Check if today is the first day
  Returns: (bool) true if today is the first day, false otherwise

is_last_day()
  Check if today is the last day
  Returns: (bool) true if today is the last day, false otherwise

is_trade_open()
  Check if trade is open
  Returns: (bool) true if trade is open, false otherwise

is_trade_closed()
  Check if trade is closed
  Returns: (bool) true if trade is closed, false otherwise

リリースノート

v4

Add helper functions.
is_trade_win()
  Check if trade is win
  Returns: (bool) true if trade is win, false otherwise

is_trade_loss()
  Check if trade is loss
  Returns: (bool) true if trade is loss, false otherwise

リリースノート

v5

더해짐
real_qty(qty)
  Get exchange specific real qty
  Parameters:
    qty: (float) qty

リリースノート

change function name.
コメント
sanj4y7
How to create alert for new array??
sanj4y7
@sanj4y7, can i mail u my script
wonoh1925
kseyomg
감사합니다 도강님!
詳細