Posts

Showing posts from July, 2022

Backtest support line bounce based indicator accuracy

Image
  If need setup assistance leave a comment below, or send a message via Request Service form.   Sections Intro Revised Accuracy (updated at 13.10.2022, 21.10.2022) Idea behind expert advisor and experimenting with dataset Support line indicator is based on repetitive extremum points. If say few times in a row price has dropped at some value and then got up. That value is defined as support line. It's likely that it comes close to support line again the pattern will repeat. We are to place an order when this occurs. Stop loss equals support line value. Take profit equals +1% of the entry price. To avoid amount of false positives, we are to use some extra margin like 0.1% during comparisons. So that if price fluctuates around support line +-0.1% we are to wait, until it is either <-0.1% or >0.1% to take the action. If the value drops below support line, indicator didn't work in this case. Otherwise, we are placing an order.

Feed Saxo Bank instruments price into sqlite database

Image
Though Saxo Bank has dropped MetaTrader support back in 2015. Open API allows to implement a custom broker. We are going to consider read-only mode, when price of instruments is continuously put into sqlite database. Authentication is required prior. A user friendly token generator allows to use a single header instead. def k1(uic, asset_type, token): assert re.compile(r'[a-zA-Z]+').match(asset_type) with requests.get( 'https://gateway.saxobank.com/sim/openapi/ref/v1/instruments/details/%d/%s' % ( uic, asset_type ), headers=dict( authorization='Bearer %s' % token, ), ) as p: market_info = p.json() assert 'Symbol' in market_info return market_info token is generated at https://www.developer.saxo/openapi/token/current Available instruments vary between forex, stocks and derivatives. Price mo

Trade binance futures with freqtrade

Image
Fig 1. market tickers with strategy indicators and actions For a strategy, checkout support line . If need setup assistance leave a comment below, or send a message via Request Service form.   A short walkthrough on freqtrade configuration.   Freqtrade is a standalone platform. It supports data acquisition, indicators and expert advisors (strategies). You may use backtest with fixed parameters as well as apply optimization to boost the performance. Spot market as well as derivatives usage has been built in. Beginners may rely on functional web interface. Advanced users may utilize command line interface. Check config.json to be configured for futures: 1. trading mode "trading_mode": "futures", "margin_mode": "isolated", 2. exchange pairs "exchange": { "name": "binance", "sandbox": true, "key": "your_exchange_k