[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 134
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
Hello all.
I have an Expert Advisor that works on history (for analysis). I manually set a parameter in it - the time (hours, minutes) of placing orders. I run the EA within the set date range, change the order times and run it again. I do it 96 times (after 15 min) a day. How can I loop it so that it does this by itself?
Once again I ask: When exactly do you want to place the order? Do not answer with your code (I don't want to understand it - we have enough of our own codes for analysis), but just in words,
e.g.: I want to put a pause above/below the MA at that distance, provided that ... ...yada yada yada yada ...
For the second time I'm asking you to explain. We would have solved your problem long ago.
At the moment the problem is this: fastMa crossed slowMa up... ...so we're looking for where to buy. Then we wait until the price i.e. Ask (since we consider buying) will reach fastMa ( well, I guess there will be no exact value, we need +- some deviation, it is renamed i_thresholdFromMa) and as soon as the price reaches fastMa +- i_thresholdFromMa , Expert Advisor should place BUYSTOP at (fastMa + buyHear * pt).
What I have come up with does not work in one terminal and does not always work in another one. Something is wrong in general.
The last variant of buyHear function here:
Here are the input parameters:Errors can be seen on the screenshot (in OrderSend() the price is fed above the red bead, while the order as seen on the screenshot is below....):
And another thing: if you have fastMA and slowMA defined as global, why do you pass them into functions? All functions can see them anyway, without passing their parameters to the called function.
And before they were not global, they were declared in specific functions, not in start. But since they were used in none of the functions, getting them every time was somehow, let's say, a sign of "bad manners as a programmer" and it's not comfortable to have identical lines of code in different functions.
Artyom, do you think I get the right wrist at the start? I mean, that on each tick the value will be received. Isn't it too expensive? Because I'm not a programmer by education, these questions sometimes occur to me...
The answer is not quite clear to me, so let me ask again. Did I understand you correctly that when setting trading conditions
You should use the MA value for the corresponding number of bars backwards, but not the value marked with a yellow arrow in the picture.
I drew the figure as I understood your answer.
Actually the question is a bit off. The matter is not the shift of the curve but the value at which bar the Expert Advisor needs to get from the buffer. This is what needs to be understood. And there is NO correspondence between the bias and getting the value from the buffer.
hello
first question
A=true
if the Imacd value(Main Line) 15 minutes ago is less than 30 minutes ago
hello
first question
A=true
if the Imacd value (Main Line) 15 minutes ago is less than 30 minutes ago
The question here is
if I understand it correctly
number of what periods?
or how do I get the value of the macd from the previous bar instead of the current one?
int start ()
{
bool A=trueif
Click on thechart periods and see which periods! And find the previous bar(shift = 1) to the current bar(shift = 0) in the last place:
Or better yet, start studying S. Kovalev's textbook!Hello again.
Please advise how to solve the following problem.
There is an indicator in compiled form. The code is not available. The indicator reflects price levels in the main chart window. I want to use these levels for my EA but it's impossible to call the indicator using the iCustom() function - the displayed levels are graphical objects. Is it possible to read the data otherwise, for example, through the object names and time? The names of all the levels are known (available in the indicator settings), the objects are updated once a week.
I want to say right away that I am not very experienced in programming, I would be very grateful for a useful reply.
Something like this.
Please advise: in the test mode by "open prices", does the tester use only the open, close, high and low prices?
Yes, only open prices, that's why it's important to consider it when analyzing the EA. For example, if the tail of the candle breaks your channel, then the EA may not notice it, but you can write this in the program logic and solve the problem.