Skip to content

Commit

Permalink
Adds logs to chart comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Nov 7, 2021
1 parent 112eba5 commit ce6b57e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/EA31337-Libre.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ void OnDeinit(const int reason) { DeinitVars(); }
*/
void OnTick() {
EAProcessResult _result = ea.ProcessTick();
if (_result.stg_processed > 0) {
if (_result.stg_processed_periods > 0) {
if (EA_DisplayDetailsOnChart && (Terminal::IsVisualMode() || Terminal::IsRealtime())) {
string _text = StringFormat("%s v%s by %s (%s)\n", ea_name, ea_version, ea_author, ea_link);
_text += SerializerConverter::FromObject(ea, SERIALIZER_FLAG_INCLUDE_DYNAMIC).ToString<SerializerJson>();
_text += ea.GetLogger().ToString();
Comment(_text);
}
}
Expand Down

0 comments on commit ce6b57e

Please sign in to comment.