dokang

POA

dokang Cập nhật   
Library "POA"
This library is a client script for making a webhook signal formatted string to POABOT server.

entry_message(password, percent, leverage, kis_number)
  Create a entry message for POABOT
  Parameters:
    password: (string) The password of your bot.
    percent: (float) The percent for entry based on your wallet balance.
    leverage: (int) The leverage of entry. If not set, your levereage doesn't change.
    kis_number: (int) The number of koreainvestment account.
  Returns: (string) A json formatted string for webhook message.

close_message(password, percent, kis_number)
  Create a close message for POABOT
  Parameters:
    password: (string) The password of your bot.
    percent: (float) The percent for close based on your wallet balance.
    kis_number: (int) The number of koreainvestment account.
  Returns: (string) A json formatted string for webhook message.

exit_message(password, percent)
  Create a exit message for POABOT
  Parameters:
    password: (string) The password of your bot.
    percent: (float) The percent for exit based on your wallet balance.
  Returns: (string) A json formatted string for webhook message.

in_trade(start_time, end_time)
  Create a trade start line
  Parameters:
    start_time: (int) The start of time.
    end_time: (int) The end of time.
  Returns: (bool) Get bool for trade based on time range.
Phát hành các Ghi chú:
v2

업데이트됨
entry_message(password, percent, leverage, kis_number, exchange, base, quote, side, qty)
  Create a entry message for POABOT
  Parameters:
    password: (string) The password of your bot.
    percent: (float) The percent for entry based on your wallet balance.
    leverage: (int) The leverage of entry. If not set, your levereage doesn't change.
    kis_number: (int) The number of koreainvestment account.
    exchange
    base
    quote
    side
    qty
  Returns: (string) A json formatted string for webhook message.

close_message(password, percent, kis_number, exchange, base, quote, side, qty)
  Create a close message for POABOT
  Parameters:
    password: (string) The password of your bot.
    percent: (float) The percent for close based on your wallet balance.
    kis_number: (int) The number of koreainvestment account.
    exchange
    base
    quote
    side
    qty
  Returns: (string) A json formatted string for webhook message.

exit_message(password, percent, kis_number, exchange, base, quote, side, qty)
  Create a exit message for POABOT
  Parameters:
    password: (string) The password of your bot.
    percent: (float) The percent for exit based on your wallet balance.
    kis_number
    exchange
    base
    quote
    side
    qty
  Returns: (string) A json formatted string for webhook message.
Phát hành các Ghi chú:
v3

add manual_message function
manual_message(password, exchange, base, quote, side, qty, price, percent, leverage, kis_number, order_name)
  Create a manual message for POABOT
  Parameters:
    password: (string) The password of your bot.
    exchange: (string) The exchange
    base: (string) The base
    quote: (string) The quote of order message
    side: (string) The side of order messsage
    qty: (float) The qty of order message
    price: (float) The price of order message
    percent: (float) The percent for order based on your wallet balance.
    leverage: (int) The leverage of entry. If not set, your levereage doesn't change.
    kis_number: (int) The number of koreainvestment account.
    order_name: (string) The name of order message
  Returns: (string) A json formatted string for webhook message.

update
entry_message(password, percent, leverage, kis_number)
  Create a entry message for POABOT
  Parameters:
    password: (string) The password of your bot.
    percent: (float) The percent for entry based on your wallet balance.
    leverage: (int) The leverage of entry. If not set, your levereage doesn't change.
    kis_number: (int) The number of koreainvestment account.
  Returns: (string) A json formatted string for webhook message.

close_message(password, percent, kis_number)
  Create a close message for POABOT
  Parameters:
    password: (string) The password of your bot.
    percent: (float) The percent for close based on your wallet balance.
    kis_number: (int) The number of koreainvestment account.
  Returns: (string) A json formatted string for webhook message.

exit_message(password, percent, kis_number)
  Create a exit message for POABOT
  Parameters:
    password: (string) The password of your bot.
    percent: (float) The percent for exit based on your wallet balance.
    kis_number
  Returns: (string) A json formatted string for webhook message.
Phát hành các Ghi chú:
v4

update: qty param is optional
manual_message(password, exchange, base, quote, side, qty, price, percent, leverage, kis_number, order_name)
  Create a manual message for POABOT
  Parameters:
    password: (string) The password of your bot.
    exchange: (string) The exchange
    base: (string) The base
    quote: (string) The quote of order message
    side: (string) The side of order messsage
    qty: (float) The qty of order message
    price: (float) The price of order message
    percent: (float) The percent for order based on your wallet balance.
    leverage: (int) The leverage of entry. If not set, your levereage doesn't change.
    kis_number: (int) The number of koreainvestment account.
    order_name: (string) The name of order message
  Returns: (string) A json formatted string for webhook message.

in_trade(start_time, end_time, overlay, min, max)
  Create a trade start line
  Parameters:
    start_time: (int) The start of time.
    end_time: (int) The end of time.
    overlay: (bool) The overlay of line
    min: (float) The min value of overlay range
    max: (float) The max value of overlay range
  Returns: (bool) Get bool for trade based on time range.
Phát hành các Ghi chú:
v5, Update in_trade function to work in non-overlay mode
in_trade(start_time, end_time)
  Create a trade start line
  Parameters:
    start_time: (int) The start of time.
    end_time: (int) The end of time.
  Returns: (bool) Get bool for trade based on time range.
Phát hành các Ghi chú:
v6
BINANCE PERPETUAL FUTURES prefix change (PERP -> .P)
Phát hành các Ghi chú:
v7, add strategy wrapper.
Phát hành các Ghi chú:
V8, update entry/order method
Phát hành các Ghi chú:
v9, update entry/order method
Phát hành các Ghi chú:
v10

업데이트됨
entry_message(password, percent, leverage, margin_mode, kis_number)
  Create a entry message for POABOT
  Parameters:
    password (string): (string) The password of your bot.
    percent (float): (float) The percent for entry based on your wallet balance.
    leverage (int): (int) The leverage of entry. If not set, your levereage doesn't change.
    margin_mode (string): (string) The margin mode for trade(only for OKX). "cross" or "isolated"
    kis_number (int): (int) The number of koreainvestment account. Default 1
  Returns: (string) A json formatted string for webhook message.

order_message(password, percent, leverage, margin_mode, kis_number)
  Create a order message for POABOT
  Parameters:
    password (string): (string) The password of your bot.
    percent (float): (float) The percent for entry based on your wallet balance.
    leverage (int): (int) The leverage of entry. If not set, your levereage doesn't change.
    margin_mode (string): (string) The margin mode for trade(only for OKX). "cross" or "isolated"
    kis_number (int): (int) The number of koreainvestment account. Default 1
  Returns: (string) A json formatted string for webhook message.

close_message(password, percent, margin_mode, kis_number)
  Create a close message for POABOT
  Parameters:
    password (string): (string) The password of your bot.
    percent (float): (float) The percent for close based on your wallet balance.
    margin_mode (string): (string) The margin mode for trade(only for OKX). "cross" or "isolated"
    kis_number (int): (int) The number of koreainvestment account. Default 1
  Returns: (string) A json formatted string for webhook message.

exit_message(password, percent, margin_mode, kis_number)
  Create a exit message for POABOT
  Parameters:
    password (string): (string) The password of your bot.
    percent (float): (float) The percent for exit based on your wallet balance.
    margin_mode (string): (string) The margin mode for trade(only for OKX). "cross" or "isolated"
    kis_number (int): (int) The number of koreainvestment account. Default 1
  Returns: (string) A json formatted string for webhook message.

manual_message(password, exchange, base, quote, side, qty, price, percent, leverage, margin_mode, kis_number, order_name)
  Create a manual message for POABOT
  Parameters:
    password (string): (string) The password of your bot.
    exchange (string): (string) The exchange
    base (string): (string) The base
    quote (string): (string) The quote of order message
    side (string): (string) The side of order messsage
    qty (float): (float) The qty of order message
    price (float): (float) The price of order message
    percent (float): (float) The percent for order based on your wallet balance.
    leverage (int): (int) The leverage of entry. If not set, your levereage doesn't change.
    margin_mode (string): (string) The margin mode for trade(only for OKX). "cross" or "isolated"
    kis_number (int): (int) The number of koreainvestment account.
    order_name (string): (string) The name of order message
  Returns: (string) A json formatted string for webhook message.

real_qty(qty, precision, leverage, contract_size)
  Get exchange specific real qty
  Parameters:
    qty (float): (float) qty
    precision (float): (float) precision
    leverage (int): (int) leverage
    contract_size (float): (float) contract_size
  Returns: (float) exchange specific qty.

method set(this, password, start_time, end_time, leverage, margin_mode, contract_size, kis_number, entry_percent, close_percent, exit_percent, fixed_qty, fixed_cash, real, auto_alert_message, hide_trade_line)
  Set bot object.
  Namespace types: bot
  Parameters:
    this (bot)
    password (string): (string) password for poabot.
    start_time (int): (int) start_time timestamp.
    end_time (int): (int) end_time timestamp.
    leverage (int): (int) leverage.
    margin_mode (string): (string) The margin mode for trade(only for OKX). "cross" or "isolated"
    contract_size (float)
    kis_number (int): (int) kis_number for poabot.
    entry_percent (float): (float) entry_percent for poabot.
    close_percent (float): (float) close_percent for poabot.
    exit_percent (float): (float) exit_percent for poabot.
    fixed_qty (float): (float) fixed qty.
    fixed_cash (float): (float) fixed cash.
    real (bool): (bool) convert qty for exchange specific.
    auto_alert_message (bool): (bool) convert alert_message for exchange specific.
    hide_trade_line (bool): (bool) if true, Hide trade line. Default false.
  Returns: (void)
Phát hành các Ghi chú:
v11
fix oca order script
Phát hành các Ghi chú:
v12
Support default_qty_type and default_qty_value
Phát hành các Ghi chú:
v13
The part regarding the decimal point limitation of quantities has been improved in the real_qty() function.

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

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

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

[유튜브]
gojdk.com/youtube

[디스코드]
gojdk.com/discord
Thư viện Pine

Với tinh thần TradingView thực sự, tác giả đã xuất bản mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác từ cộng đồng của chúng tôi có thể sử dụng lại nó. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này một cách riêng tư hoặc trong các ấn phẩm mã nguồn mở khác, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy chung.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng thư viện này?

Sao chép văn bản vào khay nhớ tạm và dán nó vào tập lệnh của bạn.