Skip to content

Commit

Permalink
Fixing MQL4 errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
nseam committed Feb 24, 2023
1 parent ee07184 commit 4ac1f12
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Candle.struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ struct CandleOCTOHLC : CandleOHLC<T> {
// Virtual destructor. Required because of Emscripted warning, despite structure has no virtual methods:
// warning: destructor called on non-final 'CandleOCTOHLC<double>' that has virtual functions but non-virtual
// destructor [-Wdelete-non-abstract-non-virtual-dtor]
#ifndef __MQL__
virtual ~CandleOCTOHLC() {}
#endif

/**
* Initializes candle with a given start time, lenght in seconds, first tick's timestamp and its price.
Expand Down Expand Up @@ -370,7 +372,11 @@ struct CandleTOHLC : CandleOHLC<T> {

/* Method to serialize CandleEntry structure. */
template <typename T>
#ifdef __MQL__
SerializerNodeType CandleOHLC::Serialize(Serializer &s) {
#else
SerializerNodeType CandleOHLC<T>::Serialize(Serializer &s) {
#endif
// s.Pass(THIS_REF, "time", TimeToString(time));
s.Pass(THIS_REF, "open", open, SERIALIZER_FIELD_FLAG_DYNAMIC);
s.Pass(THIS_REF, "high", high, SERIALIZER_FIELD_FLAG_DYNAMIC);
Expand All @@ -381,7 +387,11 @@ SerializerNodeType CandleOHLC<T>::Serialize(Serializer &s) {

/* Method to serialize CandleEntry structure. */
template <typename T>
#ifdef __MQL__
SerializerNodeType CandleTOHLC::Serialize(Serializer &s) {
#else
SerializerNodeType CandleTOHLC<T>::Serialize(Serializer &s) {
#endif
s.Pass(THIS_REF, "time", time);
s.Pass(THIS_REF, "open", THIS_ATTR open, SERIALIZER_FIELD_FLAG_DYNAMIC);
s.Pass(THIS_REF, "high", THIS_ATTR high, SERIALIZER_FIELD_FLAG_DYNAMIC);
Expand All @@ -392,7 +402,11 @@ SerializerNodeType CandleTOHLC<T>::Serialize(Serializer &s) {

/* Method to serialize CandleEntry structure. */
template <typename T>
#ifdef __MQL__
SerializerNodeType CandleOCTOHLC::Serialize(Serializer &s) {
#else
SerializerNodeType CandleOCTOHLC<T>::Serialize(Serializer &s) {
#endif
s.Pass(THIS_REF, "is_complete", is_complete, SERIALIZER_FIELD_FLAG_DYNAMIC);
s.Pass(THIS_REF, "open_timestamp_ms", open_timestamp_ms, SERIALIZER_FIELD_FLAG_DYNAMIC);
s.Pass(THIS_REF, "close_timestamp_ms", close_timestamp_ms, SERIALIZER_FIELD_FLAG_DYNAMIC);
Expand Down
1 change: 1 addition & 0 deletions Tick/Tick.struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

// Includes.
#include "../DateTime.extern.h"
#include "../Std.h"

#ifndef __MQL__
/**
Expand Down

0 comments on commit 4ac1f12

Please sign in to comment.