[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 191

 
Pyro:

Can you tell me how to insert the MA into the EA? I know how to use values, but the curve itself is not rendered

It is not drawn where? In the Strategy Tester there is a button "Open Strategy".
 
Pyro:

Can you tell me how to insert the MA into the EA? I know how to use values, but the curve itself is not rendered

The Expert Advisor does not draw the indicators unless it is specifically intended to do so, e.g., with trend lines. In any case, it cannot use indicator buffers.
 

Zhunko


THX. What are the ways to automatically attach the indicator when the EA starts? Not drag and drop it by hand all the time:)

 
Pyro:

Zhunko


THX. What are the ways to automatically attach the indicator when the EA starts? Not drag and drop it by hand all the time:)

Library. There, in the MQL4 program section, there are functions for indicators, scripts and experts.
 

Gran merci!


UPD: I'll probably start by using trendline. Easier and more suitable for my tasks:) And the library is interesting in itself, thanks for the link.

 
I have a question. If owl closes many orders (by loop) and it may not have time to close all orders before a new quote arrives, how will it close the remaining orders? Will it continue to execute start with a cycle or will it reset and call it again? (I am using RefreshRates)
 
Skydiver:
I have a question. If owl closes many orders (by loop) and it may not have time to close all orders before a new quote arrives, how will it close the remaining orders? Will it continue to execute start with a cycle or will it reset and call it again? (I am using RefreshRates)

The start() function works until it finishes its work. Ticks can be skipped
 
Vinin:

The start() function runs until it finishes its work. Ticks can be skipped.

Thank you very much.
 
korinf:

OrderCloseBy.

Who can explain why this is the case.

The upper order, which is the blue line Buy - 0.01
The second order of the bottom Sell - 0.02
At the point where ordersCloseBy() was called, there is a yellow arrow on the chart. On the first order it was -3 on the second order +4.
After the function has been called, I expect the first order to be closed at 0 and the second one to be +1.
But it turns out that

The first order closed in 0 - line 6. And the second order closed at -1.10.
Where did this -1.10 come from? I closed the whole minus as the total profit of two orders is + in +1 in the example!


Can anyone tell me why?
 

There is a need to use two types of Fibo levels: extended (with many levels) and basic, where only the major levels are set. For this purpose, I wrote a script that uses functions WindowPriceOnDropped() and WindowTimeOnDropped() to get coordinates for the first price and time points and then, using the specified formula, gets the second points.

After that, I decided to develop the idea and add the estimated price value for each level to the comments of the Fibo levels and created an indicator for that purpose. It was only after I had created it that I realized that this technology of getting coordinates does not work in indicators.

How can I get coordinates in pixels? How can I translate them into price and time? What functions are available to solve this problem?