This code example shows how to submit stop-loss, take-profit, and combined one-cancels-the-other orders through the OKX V5 algorithmic-order endpoint. It provides separate helpers for long and short positions, setting the closing side and position side…
Βιβλιοθήκη γνώσης
Συνόψεις και κύριες ιδέες από βιβλία, μελέτες, άρθρα και κώδικα που διαβάζουν οι AI agents μας, γραμμένες από τον ερευνητικό agent της Stratmill. Κάθε σελίδα παραπέμπει στο πρωτότυπο.
Αναζήτηση στη βιβλιοθήκη
7,910 έγγραφα
The strategy uses a fast and a slow moving average to follow directional moves. A cross of the fast average above the slow average opens a long position, while a cross below opens a short position. The description also gives exit rules based on price or the…
This trend-following system uses a 9-period and 21-period EMA crossover as its directional trigger, then filters long entries with RSI above 50, volume above its 20-period average, and ADX above 25. Its sell rule is triggered by a downward EMA crossover, RSI…
This example shows how to constrain a moving-average crossover strategy by both calendar dates and intraday sessions. User inputs define a start and end date, plus separate permitted sessions for entries and exits. The date predicate compares each bar’s…
The document describes a trend-following method built around MACD crossovers: a buy signal occurs when the MACD line crosses above its signal line, and a sell signal when it crosses below. Its written overview also presents KDJ as an overbought and oversold…
This strategy combines Ichimoku levels, MACD, and fast and slow Hull moving averages to identify entries and exits. Long entries require the Hull averages to indicate an upward move, price above the slower Hull average, MACD above its signal line, and either…
This system combines a trend filter, a volatility threshold, and a three-candle momentum pattern. It permits longs only above a trend EMA and shorts only below it. For either direction, three consecutive candles must move in the same direction, their closes…
This strategy uses Average True Range (ATR) to set dynamic breakout levels around recent highs and lows. A confirmed close crossing above the prior bar’s upper level triggers a long signal; a cross below the lower level triggers a short signal. The system…
This calendar-spread style strategy trades the ratio between copper and aluminum futures. It multiplies each contract’s close by its volume multiplier, computes a rolling historical mean and standard deviation, and converts the current ratio to a z-score.…
This strategy combines short EMAs of the high and low prices as bands with a longer EMA of closing prices and a Stochastic oscillator. It signals a long when the close is below the lower band, the open is below the bands’ midpoint, price is below the…
This long-only dollar-cost-averaging approach combines EMA trend structure, Bollinger Band position, MACD, and RSI conditions for initial entries. When price falls below average entry cost, it can add progressively larger amounts after increasingly deep…
This BTC futures strategy combines Bollinger Bands with a configurable simple or exponential moving average. The bands use a 20-period simple moving average as their midpoint and extend by a chosen multiple of standard deviation. A long signal occurs when…
This document outlines a multi-indicator system combining Bollinger Bands, Woodies CCI, moving averages, on-balance volume, and ATR. The described concept uses the bands to frame volatility, short and long moving averages to represent trend, and smoothed…
This strategy combines a MACD histogram color filter with a linear regression curve and a price action channel formed from exponential averages of highs, lows, and closes. Long signals require the regression curve to cross above the channel’s lower band and…
This strategy identifies fair value gaps from price relationships across three candles and uses the gap size relative to price as an entry threshold. It is described for a 15-minute chart, with long and short signals taken from bullish and bearish gaps. The…
The document explains gamma scalping through a modeled long straddle and dynamic hedging of its changing delta. It describes Black–Scholes Greeks, emphasizing gamma’s potential to create gains from repeated rebalancing and theta decay as a cost. The proposed…
The Elder Ray indicator frames the exponential moving average as a reference for market value, then measures buying and selling pressure relative to it. Bull power is the high minus the EMA, while bear power is the low minus the EMA. The described strategy…
This inventory-based strategy trades one asset around a reference price, such as a moving average or the midpoint of recent highs and lows. It begins with a partial position, then signals buys or sells when price moves sufficiently far from the reference or…
This futures pairs strategy estimates a changing hedge ratio between two SHFE contracts with a Kalman filter. It updates the ratio from hourly closing prices, forms a spread by subtracting the hedged X price from Y, then standardizes that spread against a…
This Pine strategy excerpt defines a moving average framework using configurable fast and slow simple moving averages, set by default to 20 and 200 periods. It offers buy-only, sell-only, or two-way trading and three entry strictness choices: entering at a…
This strategy combines a Gaussian-filtered price channel with StochRSI to seek long entries during upward trends. It calculates a smoothed price line and a volatility-based band from a selected price source. Reduced-lag and fast-response options adjust the…
This long-only strategy enters when price crosses above an exponential moving average and exits on a cross below. It adds a stop-loss level, a profit target, and a trailing-stop level, with example defaults of a 20-period EMA, a 1% stop, a 2% target, and a…
This document presents a price-channel strategy intended as a simple, rule-based approach for investors who cannot monitor markets continuously. It calculates the highest high and lowest low over a rolling lookback window, set to 21 periods by default. The…
This cryptocurrency strategy combines the Money Flow Index, Relative Strength Index, and Stochastic RSI to identify extreme readings. It proposes entering long when all three indicators are in oversold territory and entering short when they are all…