Fork me on GitHub
Library for MQL5 (MetaTrader) with support for Spark
CToIndicator Class Reference

Detailed Description

Displaying data from Expert or Script using functions for indicators.

Example: https://github.com/Roffild/RoffildLibrary/blob/master/Experts/Roffild/Examples/ToIndicator_Example.mq5


The documentation for this class was generated from the following file:

Public Member Functions

 CToIndicator ()
 
 ~CToIndicator ()
 
int init (const string _id, const bool _window=false, const bool ignore_visual=false)
 (First) Creating an indicator file. More...
 
int show ()
 Show the indicator on the graph. More...
 
bool addPlot (ENUM_DRAW_TYPE type, string name, double empty_value=0)
 (Second) Add plot to indicator. More...
 
void buffer (double value, ushort plot, uchar color_index=0, char buffer=-1, datetime time=0)
 Assigning a value to the indicator's buffer. More...
 
void flush ()
 
void close ()
 
bool plotIndexSetInteger (int plot_index, ENUM_PLOT_PROPERTY_INTEGER prop_id, int prop_modifier, int prop_value)
 
bool plotIndexSetInteger (int plot_index, ENUM_PLOT_PROPERTY_INTEGER prop_id, int prop_value)
 
bool plotIndexSetDouble (int plot_index, ENUM_PLOT_PROPERTY_DOUBLE prop_id, double prop_value)
 
bool plotIndexSetString (int plot_index, ENUM_PLOT_PROPERTY_STRING prop_id, string prop_value)
 
bool indicatorSetInteger (ENUM_CUSTOMIND_PROPERTY_INTEGER prop_id, int prop_modifier, int prop_value)
 
bool indicatorSetInteger (ENUM_CUSTOMIND_PROPERTY_INTEGER prop_id, int prop_value)
 
bool indicatorSetDouble (ENUM_CUSTOMIND_PROPERTY_DOUBLE prop_id, int prop_modifier, double prop_value)
 
bool indicatorSetDouble (ENUM_CUSTOMIND_PROPERTY_DOUBLE prop_id, double prop_value)
 
bool indicatorSetString (ENUM_CUSTOMIND_PROPERTY_STRING prop_id, int prop_modifier, string prop_value)
 
bool indicatorSetString (ENUM_CUSTOMIND_PROPERTY_STRING prop_id, string prop_value)
 

Public Attributes

string id
 
bool window
 
int handleFile
 
int handleIndicator
 

Constructor & Destructor Documentation

◆ CToIndicator()

CToIndicator::CToIndicator ( )

◆ ~CToIndicator()

CToIndicator::~CToIndicator ( )

Member Function Documentation

◆ addPlot()

bool CToIndicator::addPlot ( ENUM_DRAW_TYPE  type,
string  name,
double  empty_value = 0 
)

(Second) Add plot to indicator.

◆ buffer()

void CToIndicator::buffer ( double  value,
ushort  plot,
uchar  color_index = 0,
char  buffer = -1,
datetime  time = 0 
)

Assigning a value to the indicator's buffer.

Parameters
value
plotindex of plot
color_indexindex of color
bufferindex of buffer (-1 = the rules for assigning values depend on the type of the plot)
time

◆ close()

void CToIndicator::close ( )

◆ flush()

void CToIndicator::flush ( )

◆ indicatorSetDouble() [1/2]

bool CToIndicator::indicatorSetDouble ( ENUM_CUSTOMIND_PROPERTY_DOUBLE  prop_id,
int  prop_modifier,
double  prop_value 
)

◆ indicatorSetDouble() [2/2]

bool CToIndicator::indicatorSetDouble ( ENUM_CUSTOMIND_PROPERTY_DOUBLE  prop_id,
double  prop_value 
)

◆ indicatorSetInteger() [1/2]

bool CToIndicator::indicatorSetInteger ( ENUM_CUSTOMIND_PROPERTY_INTEGER  prop_id,
int  prop_modifier,
int  prop_value 
)

◆ indicatorSetInteger() [2/2]

bool CToIndicator::indicatorSetInteger ( ENUM_CUSTOMIND_PROPERTY_INTEGER  prop_id,
int  prop_value 
)

◆ indicatorSetString() [1/2]

bool CToIndicator::indicatorSetString ( ENUM_CUSTOMIND_PROPERTY_STRING  prop_id,
int  prop_modifier,
string  prop_value 
)

◆ indicatorSetString() [2/2]

bool CToIndicator::indicatorSetString ( ENUM_CUSTOMIND_PROPERTY_STRING  prop_id,
string  prop_value 
)

◆ init()

int CToIndicator::init ( const string  _id,
const bool  _window = false,
const bool  ignore_visual = false 
)

(First) Creating an indicator file.

◆ plotIndexSetDouble()

bool CToIndicator::plotIndexSetDouble ( int  plot_index,
ENUM_PLOT_PROPERTY_DOUBLE  prop_id,
double  prop_value 
)

◆ plotIndexSetInteger() [1/2]

bool CToIndicator::plotIndexSetInteger ( int  plot_index,
ENUM_PLOT_PROPERTY_INTEGER  prop_id,
int  prop_modifier,
int  prop_value 
)

◆ plotIndexSetInteger() [2/2]

bool CToIndicator::plotIndexSetInteger ( int  plot_index,
ENUM_PLOT_PROPERTY_INTEGER  prop_id,
int  prop_value 
)

◆ plotIndexSetString()

bool CToIndicator::plotIndexSetString ( int  plot_index,
ENUM_PLOT_PROPERTY_STRING  prop_id,
string  prop_value 
)

◆ show()

int CToIndicator::show ( )

Show the indicator on the graph.

It is recommended to call at the end of testing, but you can not use it in OnDeinit().

Member Data Documentation

◆ handleFile

int CToIndicator::handleFile

◆ handleIndicator

int CToIndicator::handleIndicator

◆ id

string CToIndicator::id

◆ window

bool CToIndicator::window