PineForge v0.13.1-379-g9b50973
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
magnifier.hpp File Reference
#include <vector>
#include "bar.hpp"
Include dependency graph for magnifier.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  pineforge
 

Enumerations

enum class  pineforge::MagnifierDistribution {
  pineforge::UNIFORM ,
  pineforge::COSINE ,
  pineforge::TRIANGLE ,
  pineforge::ENDPOINTS ,
  pineforge::FRONT_LOADED ,
  pineforge::BACK_LOADED
}
 

Functions

double pineforge::path_at (double t, double p0, double p1, double p2, double p3, double len0, double len1, double len2, double total)
 Maps parameter t in [0,1] to a price on the 3-segment path.
 
std::vector< double > pineforge::sample_price_path (const Bar &bar, int n_samples, MagnifierDistribution dist=MagnifierDistribution::ENDPOINTS)
 Sample n_samples points along the OHLC price path of the bar.
 
void pineforge::sample_price_path (const Bar &bar, int n_samples, MagnifierDistribution dist, std::vector< double > &out)
 Out-parameter overload of sample_price_path.
 
std::vector< double > pineforge::sample_price_path_volume_weighted (const Bar &bar, int base_samples, double mean_volume, int min_samples=2, int max_samples=64, MagnifierDistribution dist=MagnifierDistribution::ENDPOINTS)
 Sample n_samples points along the OHLC price path, weighting the sample density by the ratio of this bar's volume to a reference mean_volume.
 
void pineforge::sample_price_path_volume_weighted (const Bar &bar, int base_samples, double mean_volume, int min_samples, int max_samples, MagnifierDistribution dist, std::vector< double > &out)
 Out-parameter overload of sample_price_path_volume_weighted.