Artificial price drop for testing the behavior of a grid trading system
Shuffled price curves for a reality check algorithm
TRADES | Detrend trade results. The trade return is corrected by a factor derived from the average price slope of the current WFO cycle. This removes trend bias from a WFO test while keeping the properties of the price curve. |
PRICES | Detrend trade results and price functions, as well as indicators derived from them. A corrrection factor as above is added to the returned prices. This ensures that any WFO cycle starts and ends at the same price, and detrends indicators and signals based on series generated with price() calls. |
CURVE | Detrend historical price data on loading. The curve is tilted so that the end and the start of the historical data are at the same level. This also affects the displayed price curve in the chart. |
RECIPROCAL | Replace historical prices with their reciprocal values. This it can be used for creating an artifical asset as the reciprocal of an existing forex or crypto pair (f.i. convert BTC/USD to USD/BTC). |
INVERT | Similar to RECIPROCAL, but keep the price range while inverting the price curve. This reverses all trends in the curve, and can be used for a reality check of a system that is symmetric in long and short positions. |
SHAPE | Bend the price curve to a predefined shape for testing strategy behavior under certain conditions such as sudden price drops or trend reverals, even when they don't appear in the original curve.The desired shape can be set up with the Shape array (see below). |
NOPRICE | Do not process the historical data by detecting gaps or fixing invalid prices or outliers on loading. For data files that contain no prices, but other types of data. |
SHUFFLE | Randomize the price curve by shuffling the price ticks without replacement. Keeps its overall trend from start to end, but removes any short-term trends and correlations between the prices. Used for reality checks. Requires historical data in .t6 format. |
SHUFFLE+PEAK SHUFFLE+VALLEY |
Randomize the price curve as above, but generate a curve that does not exceed the highest peak or/and the lowest valley of the original price curve. Use this for keeping the original price range. Can be slow on curves with large price ranges. |
BOOTSTRAP | Randomize the price curve by shuffling the price ticks with replacement. Keeps its overall trend from start to end, but removes any short-term trends and correlations between the prices. Used for reality checks. |
BOOTSTRAP+PEAK BOOTSTRAP+VALLEY |
Randomize the price curve as above, but generate a curve that does not exceed twice the maximum of the orginal price curve, or/and does not fall below zero. Can be slow on curves with large price ranges. |
RANDOMWALK | Generate a random walk price curve by moving the price in random steps that depend on original volatility. Removes any market inefficiency out of the price curve. |
RANDOMWALK+PEAK RANDOMWALK+VALLEY |
Generate a random walk price curve that does not exceed twice the maximum of the orginal price curve, or/and does not fall below zero. Can be slow on curves with large volatility. |
// detrend the price curve for training only if(is(TRAINMODE)) Detrend = CURVE; // apply a rectangular shape to the curve var SuddenDrop[50] = { 1.5, 1.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.5, 1.5, 0 }; Shape = SuddenDrop; Detrend = SHAPE;
► latest version online