PINE LIBRARY

PineHelper

已更新
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.
alertsformattinghelperhelperfunctionpinehelperstrategies

Pine腳本庫

在真正的TradingView精神中,作者將這段Pine程式碼發佈為開源程式庫,以便我們社群的其他Pine程式設計師可以重複使用它。請向作者致敬!您可以私下使用這個函式庫,或在其他開源出版品中使用,但在出版物中再次使用這段程式碼將受到網站規則的約束。


알고리즘 트레이딩, 파인스크립트, 자동매매를 다루고 있습니다

[파인스크립트 무료강의]
gojdk.com/pinescript-start

[파인스크립트 with 자동매매]
gojdk.com/pinescript-tradinghook

[유튜브]
gojdk.com/youtube

[디스코드]
gojdk.com/discord

免責聲明