Forum

Are Built-In Indicators Pre-computed in Strategy Tester?

As the title says, are built-in indicators pre-computed in the strategy tester ? I was wondering if the only overhead for theses indicator functions (i.e iMA) is just extracting the values from the buffer? I couldn't find anything the documentation, but I don't want to assume things

Is there static cast in MQL4?

I was looking in the documentation and I only find run-time casting (<dynamic_cast>) but I was wondering if static_cast is available in MQL4? If not, is there a workaround to implement static polymorphism in MQL4

What Makes Indicators So Fast

I am curious, MT4 indicators seem to use slow algorithms. For example, Ichimoku computes the maxes and mins by just looking back at the given input look back period as opposed to having an efficient data structure do it. It also keeps many buffers that are O(n) size where n is the number of bars in

Finding Performance Bottlenecks in EAs

My question is when developing an EA in MQL4, what are the best ways to finding the things in your code that are slowing backtesting the most? For example, can I see which lines are causing the CPU the most problem (I know something so literal might not exist, but what about a workaround)

How to Clean up Static Pointer Attributes

So I am trying to implement a class (whose incomplete code can be seen below). In its implementation, I want to use a static pointer to help with static operations. However, I don't know what would be the best way to delete that pointer's memory upon de-initialization (I know I can implicitly delete

Declaring Template Class Variables

Hey, I have implemented this Queue that takes any type. I want to use like this since I don't know the max size at time of initialization: Queue< double > q; // Work q = Queue< double >( 20 ); // Where 20 is the max size of the queue This causes the following errors: " '>'- unexpected token", " '20'

Sequential Backtest Optimization

To my knowledge MT4 runs on a single-thread. Is this assumption correct with respect to the strategy tester , that it does not start another combination of parameters until the current one is finished running

Memory Management With Created Classes

Background I am current trying to use MQL4's AlgLib library made by MetaQuotes, albeit with some slight edits. I am making some changes to the CMatrixDouble Class to in the matrix.mqh file to make the CMatrixDouble class easier to use. Current Changes to class declaration

Ongoing Indicator Calculations vs Using Indicator Functions

I have been asking myself if I could really save run time with a current project I am working on. This project utilizing many indicators, and I was wondering if I really should be utilizing the the in-built functions and the custom indicator functions I created for myself or should I calculate the

Recursive Functions

I am trying to use Merge Sort to manually sort an array variable. The reason, I am not using the ArraySort() function is because I am going to edit the code so that I can sort a few other arrays based on the first array. However, I want to make sure the base algorithm was implemented properly. This