Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 104

 
Artyom Trishkin:
You can't do it programmatically on pure mql. The window and date should be searched through WinAPI, I think.
It's a pity that MQL does not have such a feature
 
Money_Maker:
It's a pity MQL doesn't have this feature
Are you doing this to speed up testing? If so, just programmatically set a time interval, within which the data is relevant to the EA, and those before that date will be blocked. The order history in the tester slows down the work greatly - the more positions are closed, the larger is the history and the longer is the order search cycle.
 
Artyom Trishkin:
Are you doing this to speed up testing? If so, just programmatically set a time interval, within which the data is relevant to the EA, and cut off those data which are earlier. The order history in the tester slows down the work greatly - the more positions are closed, the greater is the history, and the longer is the order search cycle.
No, this is not testing, this is for analyzing past trades
 
Money_Maker:
No, it's not testing, it's for analyzing past trades
So go through the history once and then analyse what you've gathered from it into an array.
 
Is it realistic to redesign the overall colour scheme and interface? Change fonts, put icons and other fun customisation things? If so, links on the subject would be greatly appreciated.
 

Gentlemen programmers, please help me with a difficult question.

The first difficulty is that I have very little programming experience. I have tried some simple things in MQL4. However, I don't have any experience in MQL5. But I need to use 5 now.

The goal is to build the indicator. What it will show, I am only guessing)). Of course, I still don't know if it will be useful. But walk and thee shall reach the right road and therefore it is necessary to begin to do something.

The essence of the indicator is to build a line, the points of which will be calculated by the price of the 1st candle at the moment of opening of the 0th candle. It will be some weighted average value based on the OHLC of the candle. I.e. not for some period in the past, but only a certain value of a certain candle.

The second step is to draw this line at a certain distance from the candlesticks.

The third one is to forbid it to be calculated at certain patterns on the chart, and then to resume the calculation if the pattern is no longer active.

------

Now my main question is if I take an ordinary МАшаша indicator as a base and start sawing it in accordance with what I have imagined? Or would it be better to start from scratch? MA contains the calculation of the line for the period, and I do not need it.

 
Andrey Koldorkin:

Gentlemen programmers, please help me with a difficult question.

The first difficulty is that I have very little programming experience. I have tried some simple things in MQL4. However, I don't have any experience in MQL5. But I need to use 5 now.

The goal is to build the indicator. What it will show, I am only guessing)). Of course, I still don't know if it will be useful. But walk and thee shall reach the right road and therefore it is necessary to begin to do something.

The essence of the indicator is to build a line, the points of which will be calculated by the price of the 1st candle at the moment of opening of the 0th candle. It will be some weighted average value based on the OHLC of the candle. I.e. not for some period in the past, but only a certain value of a certain candle.

The second step is to draw this line at a certain distance from the candlesticks.

The third one is to forbid it to be calculated at certain patterns on the chart, and then to resume the calculation if the pattern is no longer active.

------

Now my main question is if I take an ordinary МАшаша indicator as a base and start sawing it in accordance with what I have imagined? Or would it be better to start from scratch? MA contains the calculation of the line for the period, and I do not need it.

The indicators in 4/5 are not much different internally, so you don't care which one to start with. And don't take MA's one - it has a lot of redundant code that you don't need.
 
Nehrome:
Is it realistic to redesign the overall colour scheme and interface? Change fonts, put icons and other fun customisation things? If so, links on the subject would be greatly appreciated.
You can select only the colour scheme of an individual chart, or customise the colours individually for different properties of an individual chart. All you have to do is call up the chart's properties window either by pressing F8 or by right-clicking the context menu.

You cannot adjust the appearance of fonts or buttons on the terminal itself. You can only change the position of the individual control blocks by dragging the block with the mouse to a new location.
 
Andrey Koldorkin:

Gentlemen programmers, please help me with a difficult question.

The first difficulty is that I have very little programming experience. I have tried some simple things in MQL4. However, I don't have any experience in MQL5. But I need to use 5 now.

The goal is to build the indicator. What it will show, I am only guessing)). Of course, I still don't know if it will be useful. But walk and thee shall reach the right road and therefore it is necessary to begin to do something.

The essence of the indicator is to build a line, the points of which will be calculated by the price of the 1st candle at the moment of opening of the 0th candle. It will be some weighted average value based on the OHLC of the candle. I.e. not for some period in the past, but only a certain value of a certain candle.

The second step is to draw this line at a certain distance from the candlesticks.

The third one is to forbid it to be calculated at certain patterns on the chart, and then to resume the calculation if the pattern is no longer active.

------

Now my main question is if I take an ordinary МАшаша indicator as a base and start sawing it in accordance with what I have imagined? Or would it be better to start from scratch? MA contains the calculation of the line for the period, and I do not need it.

Start by building a template: in the editor, right-click in the navigator window on Indicators and select create a folder. Name it something - it will contain your indicators.

Next, also click on this new folder and select New File. An assistant window will open, where you will select the type of program to be created - User Indicator. You will have to go through all the steps of the wizard, add the input parameters, the type of display, etc. You will have to try and figure this out on your own. Once you get to the end, the new indicator template will be created. All you have to do is to fill it with the necessary code, but this is the next step...
 

Greetings.

Can you tell me how to specify the condition, so that if the current candle has already been opened by the specified conditions and closed manually, it will not open before the new one?

Reason: