ROOT_Application
2.0
C++ Core modules and GUIStock
|
utilities functions for ListDataStock templates More...
Functions | |
template<template< class > class Policy1, template< class > class Policy2, template< class > class Policy3, template< class > class Policy4> | |
int | TransformTimeScale (const ETime new_tmscl, const ListDataStock< DataCSV, Policy1 > &list_csv_in, const ListDataStock< SimpleData, Policy2 > &list_vol_in, ListDataStock< DataCSV, Policy3 > &list_csv_out, ListDataStock< SimpleData, Policy4 > &list_vol_out) |
Transform StockCSV and Volume from M5 into a StockCSV with larger TimeScale, typical DAY to WEEK, DAY to MONTH. More... | |
template<template< class > class Policy1, template< class > class Policy2, template< class > class Policy3, template< class > class Policy4> | |
int | TransformTimeScale (const ETime new_tmscl, const ListDataStock< SimpleData, Policy1 > &list_csv_in, const ListDataStock< SimpleData, Policy2 > &list_vol_in, ListDataStock< DataCSV, Policy3 > &list_csv_out, ListDataStock< SimpleData, Policy4 > &list_vol_out) |
Transform instantaneous data (StockInst) to StockCSV with TimeScale M5, M10 or H1. More... | |
utilities functions for ListDataStock templates
int ListDataStock_Utils::TransformTimeScale | ( | const ETime | new_tmscl, |
const ListDataStock< DataCSV, Policy1 > & | list_csv_in, | ||
const ListDataStock< SimpleData, Policy2 > & | list_vol_in, | ||
ListDataStock< DataCSV, Policy3 > & | list_csv_out, | ||
ListDataStock< SimpleData, Policy4 > & | list_vol_out | ||
) |
Transform StockCSV and Volume from M5 into a StockCSV with larger TimeScale, typical DAY to WEEK, DAY to MONTH.
Return a list of DataCSV for values in candlesticks and a list of SimpleData for the volume
Because volume is always loaded with the values, it is transformed at the same time by default
Other indicators must be recomputed
Types of the data is enforced, but they can have any chronological policy
new_tmscl | new TimeScale to transform to, must be >= ETime::WEEK |
list_csv_in | input list of type DataCSV |
list_vol_in | input list for volume of type SimpleData |
list_csv_out | output list with candlesticks |
list_vol_out | output list with volume |
Definition at line 535 of file ListDataStock_timpl.h.
References ListDataStock< T, PolicyChronologic >::AddData(), DataCSV::AdditionData(), DataStock::GetDate(), DataStock::GetDateTm(), ListDataStockBase::GetName(), DataCSV::GetOpen(), ListDataStock< T, PolicyChronologic >::GetSize(), ListDataStockBase::GetTimeScale(), SimpleData::GetValue(), H1, M10, M30, M5, ShortName::MakeShortName(), MONTH, NO_CHRONO, ListDataStock< T, PolicyChronologic >::NoChronologicAt(), not_a_time, ListDataStock< T, PolicyChronologic >::Order(), ListDataStock< T, PolicyChronologic >::Reserve(), ListDataStock< T, PolicyChronologic >::SetDates(), ListDataStockBase::SetName(), ListDataStockBase::SetTimeScale(), Indicator::StockCSV, ListDataStock< T, PolicyChronologic >::Swap(), TRIM, Indicator::Volume, WEEK, and YEAR.
Referenced by Stock::Transform_TimeScale().
int ListDataStock_Utils::TransformTimeScale | ( | const ETime | new_tmscl, |
const ListDataStock< SimpleData, Policy1 > & | list_csv_in, | ||
const ListDataStock< SimpleData, Policy2 > & | list_vol_in, | ||
ListDataStock< DataCSV, Policy3 > & | list_csv_out, | ||
ListDataStock< SimpleData, Policy4 > & | list_vol_out | ||
) |
Transform instantaneous data (StockInst) to StockCSV with TimeScale M5, M10 or H1.
Return always lists of DataCSV for the data, SimpleData for the volume
Identical than previous, except the first input list is of type SimpleData (Indicator::Inst)
new_tmscl | TimeScale to transform to, e.g., ETime::M30 |
list_csv_in | input list of type SimpleData |
list_vol_in | input list for volume of type SimpleData |
list_csv_out | output list with the candlesticks |
list_vol_out | output list with volume |
Definition at line 845 of file ListDataStock_timpl.h.
References ListDataStock< T, PolicyChronologic >::AddData(), DAY, DataStock::GetDate(), DataStock::GetDateTm(), ListDataStockBase::GetName(), ListDataStock< T, PolicyChronologic >::GetSize(), ListDataStockBase::GetTimeScale(), SimpleData::GetValue(), H1, INST, M10, M30, M5, ShortName::MakeShortName(), NO_CHRONO, ListDataStock< T, PolicyChronologic >::NoChronologicAt(), not_a_time, ListDataStock< T, PolicyChronologic >::Order(), ListDataStock< T, PolicyChronologic >::Reserve(), ListDataStock< T, PolicyChronologic >::SetDates(), ListDataStockBase::SetName(), ListDataStockBase::SetTimeScale(), Indicator::StockCSV, and Indicator::Volume.