[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 651
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Evening riddles from metha:
I imported quotes from the quote archive, it says in 1 minute: Database: 0 / 3665972, window is empty - what can it mean ?
When I open standalone EURUSD,M1 chart - it shows big letters: "Pending Update" - what can it mean ?
I am running a test - TestGenerator: no history data 'EURUSD1'.
Reload the terminal. If everything was done correctly, it should appear.
where to read how an indicator with the following parameters is drawn
SetIndexStyle(0,DRAW_HISTOGRAM, 0, 1, color1)
SetIndexStyle(1,DRAW_HISTOGRAM, 0, 1, color2)
I do not understand why sometimes it draws sometimes not - I understand it very well if you draw a normal line DRAW_LINE - the indicator buffer value will set the y-axis, but the element number corresponds to the number of bars on the chart
why the horizontal segment on the bar appears when two indicator buffers are on the same bar, but when one of the indicator buffers is EMPTY_VALUE - nothing, and I don't understand the coloring logic
Reload the terminal. If everything has been done correctly, it should appear.
I've already done all this, even rebooted the system, that's the point.
I've already done all that, even rebooted the system, that's the point.
Have you imported quotes from where?
If you could explain exactly what you were doing, step by step, then you would be more likely to get help here.
Good people, have mercy - I can't get: buy/sell after another peak of smoothed CCI.
I tried to declare the second buffer (it makes more sense to me), no errors, the log is silent, the printer, apparently, I'm putting it like a goat - I don't understand anything.
Attachment contains the entire Expert Advisor. After testing in visualization, CCI is drawn both in this and old version (it is plotted in the attached file), but smoothed one is not and therefore trades are not opened.
Old variant:
I understand no one has time to clean up the others, advise me at least where exactly to insert the Print and where to look for feedback in the journal or logs and what you need to pay attention to.
Good afternoon!
I have a question about partial closing, because each brokerage company has its own rules. I do not understand how to do the order accounting correctly:
The problem: We need to find a tick of a newly placed order in this particular TS without using a magician.
1) I have noticed that a partly closed order has a comment, you should be able to read the comment // I am not sure that all brokerage companies write comments
2) search by date of order opening // not sure if it will work for all brokerage companies
3) look for a new tick right after a partial closing and check the volume, etc. to see if it is the right order
4) something else
how to do the order counting better:
comment - Order comment text. The last part of the comment can be changed by the trade server.
magic - The magic number of the order. Can be used as a user-defined identifier.
Magic is a good way to help you
To search for an order, do the following
if (OrderType() == OP_BUY && OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
.......
Please advise where exactly Print should be inserted and where to look for feedback in the logbook or log files and what you need to pay attention to.
Print where you want to check the situation (for example, if you place an order - print the fact of placing or an error of placing the order in the journal).
If you are not sure that your function can be called, i.e. the function call condition will never be met, add the Print to the input of the function.
Print read in the terminal in the "Experts" tab
where to read how an indicator with the following parameters is drawn
SetIndexStyle(0,DRAW_HISTOGRAM, 0, 1, color1)
SetIndexStyle(1,DRAW_HISTOGRAM, 0, 1, color2)
I don't understand why sometimes it draws sometimes not - I understand if you draw a normal line DRAW_LINE - the indicator buffer value will set the y-axis, but the number of the element corresponds to the number of bars on the chart
what are the parameters in the indicator buffer when its type is DRAW_HISTOGRAM?? why when two indicator buffers end up on one bar, a horizontal segment on the bar appears, but when one of the indicator buffers is equal to EMPTY_VALUE - nothing, and I do not understand the coloring logic
Thestyle of DRAW_HISTOGRAM is not fundamentally different from other styles of drawing lines, the X-axis is represented by bar numbers, the Y-axis - by the values of the indicator array, but as they say, there is a nuance.
Let's take a simple indicator as an example:
One indicator array, separate window, all elements are assigned value 1. Throw it on the chart, and what do we see (Figure 1 on the left):
The "Data Window" shows the indicator readings, but there is nothing in its window. This is the nuance, MT4 just doesn't know 1 is how high? How high should the bar be drawn? It has nothing to draw from, i.e. simply put, there is no division price for the bars. As you have noticed, there is no separate parameter that sets the height of the bars, their height is set automatically, relative to other elements. Let us help MT4 and set the division price, we can do it programmatically:
You can simply fix minima (say 0) and maxima (say 2) in the indicator settings.
And everything instantly falls into place (Fig. 2, right), now the terminal knows how high the bar should be drawn, 1 is in the middle between 0 and 2 :))) In this example, the indicator array has one value (especially for showing "nuance") and we should indicate to the terminal how much or little it is. If we replace the array data with 1, for example Close[shift], the terminal will not set any hard constraint and will draw a picture "ala MAKD".
A little different picture, if we draw the bar chart in general, not in a separate window. Let's leave the value of Close[shift] for the first indicator array, just change the parameter:
We get the same picture again (Fig. 3, left). The values are present but not displayed.
The terminal needs some basis for automatic calculation of the bar height, and since minimums and maximums cannot be fixed in the general window, the second indicator array will appear. We add the second line and set it to 0.
Indicator arrays start to display relative to each other. And everything will be as it should be (Fig 4, right). The columns are drawn from SIMPLE[shift] to SIMPLE2[shift].
And finally, there is the code of indicator which fills in the candles, blue if it is up and pink if it is down. Again two arrays for each colour (the drawing is from home to end (from Open to Close)).
read the help there:
comment - Order comment text. The last part of the comment can be changed by the trade server.
magic - The magic number of the order. Can be used as a user-defined identifier.
Use magic to help you
To check for an order, do the following:
if (OrderType() == OP_BUY && OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
.......
Task: You need to find the tick of a newly appeared order for this particular TS without using a magik .