Crypto backtesting
Loading...
Searching...
No Matches
trade.h File Reference
#include "constants.h"
#include "core.h"
#include "ohlc.h"
#include <cassert>
#include <ranges>
#include <vector>
Include dependency graph for trade.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fx
 Core routines that don't depend on any other fx routines.

Functions

constexpr auto fx::to_atr (auto &&series)
 Calculate ATR of a series.
constexpr auto fx::to_atr2 (auto &&series)
 Calculate ATR of a series.
constexpr double fx::to_atr3 (auto &&series)
 Calculate ATR of a series.
constexpr double fx::to_vwap (std::ranges::range auto &&xs)
 Calculate VWAP rolling average.
constexpr double fx::to_vwap2 (std::ranges::range auto &&xs)
 Calculate VWAP rolling average.
auto fx::is_recent_dip2 (auto &&series)
 Test if there has been a recent minimum.

Variables

constexpr auto fx::to_average_func
constexpr auto fx::to_average_func2
constexpr auto fx::to_spot
 Calculate spot value, note we don't average all of the OHLC prices.
constexpr auto fx::to_average_volume
 Calculate average volume over a series.
constexpr auto fx::to_average_volume2
 Calculate average volume over a series.
auto fx::to_exit
 Find an exit in a series.
auto fx::to_exit2
 Find an exit in a series.
auto fx::is_entry
 Calculate if the final price is an entry.
auto fx::is_entry2
 Calculate if the final price is an entry.