Kembali ke Indeks

Perdagangan Algoritma

Draft:

  1. Cari strat
  2. Berlatih sebulan guna cara manual
    1. penting utk faham strat behavior
  3. Scripting
    1. Convert ke algorithm
    2. Convert ke pinescript/python
  4. Backtest di Tradingview/python lib
    1. Guna alert utk tengok keberkesanan
      1. sebab past backtest =/= future
      2. penting untk faham strat behavior guna past data
  5. Live trade
    1. python/js/c
      1. ccxt, etc
      2. diy coding
    2. basic code structure
      1. get historical data
      2. stream candle
      3. while checking algorithm
      4. execute trades if algo checks
      5. logging

Backtest

  • tradingview
  • python diy

Bahasa skrip

  • pine script
  • python
  • js
  • c
import lib

global var
local var

create_order():

handle_sell():

handle_buy():

get_asset():

get_ust():

calc_pnl():

broadcast():

calc_strategy():
   

candle_data():

   # websocket should give current candle data here

   if is_candle_closed:
      signal = calc_strategy(last_price)
      if signal is buy:
         create_order(side=buy)
      elif signal is sell:
         create_order(side=sell)
connect_websocket():

main():

see @r5d2_trades for info
https://t.me/intredasting/1952