Crypto backtesting
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1#pragma once
2
3namespace fx {
4
5/// The number of prices in a trading window
6constexpr auto win{68uz};
7constexpr auto win2{34uz};
8constexpr auto win4{17uz};
9
10/// Close position if price has increased by this percentage
11constexpr auto take_profit{3.0};
12
13/// Close position if price has decreased by this percentage
14constexpr auto stop_loss{take_profit * 2.0};
15
16/// Minimum price to consider a trade
17constexpr auto minimum_entry{4.3};
18
19/// Minimum (normalised) ATR to consider a trade
20constexpr auto minimum_atr{take_profit / 6.0};
21
22/// Number of cells in a row of price data
23constexpr auto cells{6uz};
24
25/// Furthest back in time to consider a trade
26constexpr auto earliest_entry_epoch{1689798790};
27} // namespace fx
Core routines that don't depend on any other fx routines.
Definition constants.h:3
constexpr auto stop_loss
Close position if price has decreased by this percentage.
Definition constants.h:14
constexpr auto minimum_entry
Minimum price to consider a trade.
Definition constants.h:17
constexpr auto take_profit
Close position if price has increased by this percentage.
Definition constants.h:11
constexpr auto earliest_entry_epoch
Furthest back in time to consider a trade.
Definition constants.h:26
constexpr auto win4
Definition constants.h:8
constexpr auto win
The number of prices in a trading window.
Definition constants.h:6
constexpr auto cells
Number of cells in a row of price data.
Definition constants.h:23
constexpr auto minimum_atr
Minimum (normalised) ATR to consider a trade.
Definition constants.h:20
constexpr auto win2
Definition constants.h:7