Skip to content

Visualize virtual profit of indicator based trade signals#58

Merged
rosasurfer merged 40 commits intomasterfrom
57-signal-performance
Mar 26, 2026
Merged

Visualize virtual profit of indicator based trade signals#58
rosasurfer merged 40 commits intomasterfrom
57-signal-performance

Conversation

@rosasurfer
Copy link
Copy Markdown
Owner

@rosasurfer rosasurfer commented Mar 26, 2026

For the requirements see #57

Implemented using the ZigZag indicator as an example:

  • The indicator has a new input parameter TrackVirtualProfit. If enabled it analyzes virtual PnL of ZigZag reversal signals for the configured MaxBarsBack periods.
  • Then the indicator creates a custom symbol stored in a second MT4 terminal, and writes the generated PnL timeseries to the price history of that custom symbol, using the history API. All timeframes are auto-generated from the source (here M1).
  • The indicator updates the custom symbol in the second terminal in realtime.

Example ZigZag(50) on M1:
BTCUSDM1

Inputs for above example with 200'000 bars back:
image

Created custom symbol:
image

Generated chart. That's a regular chart, not a single offline chart:
image

@rosasurfer rosasurfer linked an issue Mar 26, 2026 that may be closed by this pull request
@rosasurfer rosasurfer self-assigned this Mar 26, 2026
@rosasurfer
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 997276cf03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mql40/experts/ZigZag EA.mq4 Outdated
Comment thread mql40/indicators/ZigZag.mq4
Comment thread mql40/indicators/ZigZag.mq4
@rosasurfer
Copy link
Copy Markdown
Owner Author

rosasurfer commented Mar 26, 2026

Current issue: As the History API is implemented in MQL the performance is rather bad.
Solution: Move the History API to the MT4Expander DLL which would make it more than 10 times faster.

For the moment it's important to have this working implementation. Improvements will come later.

@rosasurfer rosasurfer merged commit 0e1c1c2 into master Mar 26, 2026
1 check passed
@rosasurfer rosasurfer removed their assignment Mar 26, 2026
@rosasurfer rosasurfer deleted the 57-signal-performance branch March 26, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visualize performance of indicator based trade signals

1 participant