Join our fan page
- Views:
- 4343
- Rating:
- Published:
- 2024.12.21 01:32
- Updated:
- 2024.12.23 14:19
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
A simple demonstration to show how it's possible to code profit and loss labels for the most recently closed deals.
This EA will place dummy trades, so you can see how it looks in the strategy tester. The labels will only form on deals from now onwards (not on trade history).
I coded a solution using the Canvas library, and also the standard library. There are two inputs which can give you the option between using Canvas vs. using text and rectangle objects from the standard library. Feel free to improve upon the code if you think there's yet again a better solution.
Using canvas:
Using standard objects:

Price increase Indicator

MarketPredictor for MetaTrader 5 The MarketPredictor is an innovative Expert Advisor (EA) for MetaTrader 5 that leverages mathematical models such as sine functions, Fast Fourier Transform (FFT), sigmoid functions, and Monte Carlo simulations to analyze and predict market movements. This project is designed for developers, math enthusiasts, and traders interested in combining technological and financial innovations. Feel free to suggest, discuss, and implement code ideas directly in this thread. Whether it’s new features, improvement suggestions, or strategies – every contribution is welcome to further develop and optimize the MarketPredictor. You’re also welcome to add me to clarify questions privately, collaborate on the GitHub project, or send me your feedback directly. Let’s cook up something amazing together and take this project to the next level!

Prototype for data collection. Dummy buffers for the data window (for data collection purposes) for the hour of the day, and an additional buffer for the hour of the day. Comments the hour of the day.

Copy these into any EA you are busy coding and you"ll have a trailing sl the only things you'll need to change would probably be InpMagic for your magic number or you could just copy my code as is , Remember to add COrderinfo ord; and CPositionInfo pos;