Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 952

 
Vinin:
The only way is to specify in the terminal settings the minimum number of bars to be displayed
If I understand correctly what you suggest, this option is not suitable for me.
What I am saying is to limit the last 0-2000 bars (2000 for example). When a new bar appears, we should overwrite the values of the buffers and add a new bar to the 0-th buffer and remove the last removed bar accordingly. However, this cycle will put some load on CPU.
 
atztek:
If I understand correctly what you suggest, this variant is not suitable for me.
I am limiting myself to the last 0-2000 bars (2000 for example). When I get a new bar I have to overwrite the values of the buffers and add a new bar to the 0-th buffer and remove the last removed bar accordingly. However, this cycle will put some load on CPU.

If for calculations, you can use a circular buffer. then there is no need to overwrite the buffer values. Only store the current position and move to the next item when a new bar appears.

You need standard dynamic arrays for rendering.

 
Vinin:

If for calculations, you can use a circular buffer. then there is no need to overwrite the buffer values. Only store the current position and move to the next item when a new bar appears.

For rendering, you need standard dynamic arrays.

The data corresponding to the zero bar must be stored in the zero element of the buffer for the line to be drawn correctly.
 
on eurusd,gpbusd,usdchf,usdjpy,audusd,nzdusd in the tester completely works.
And in the case of usdrub,xauusd,audcad,audchf,chfjpy oil, gas in the log - Ordersend error 131
(to check for all kinds of errors, I also used one program action - OrderSend Sell. still - not working).
all currency quotes were loaded the same way. and there is no difference between symbols in symbol properties...
 
Is it possible to control the Tester's Pause button from the code? -
i.e., can I create my own button, place it on the screen and use it to switch the Tester to Pause/Work mode?
PS Earlier on the forum they wrote about the possibility of intercepting some MT4 commands.
 
Testing the advisor from Kovalev's tutorial on the platforms of two different brokers. Should enter with 10 percent of the deposit, as in the tutorial. When testing at one broker trades are executed with 0.4 lot, at another one - 0.08. MODE_MINLOT, MODE_MINSIZE are equal to 0.01. Why is it happening?
 
JoinDoe:
Testing the advisor from Kovalev's tutorial on the platforms of two different brokers. Should enter with 10 percent of the deposit, as in the tutorial. When testing at one broker, trades are executed with 0.4 lots, while at another one - 0.08. MODE_MINLOT, MODE_MINSIZE are equal to 0.01. Why is it happening?
Is the leverage the same?
 
AlexeyVik:
Is the leverage the same?
Is it in my account settings at the brokers to look at? As for the leverage in the program, the program is the same, so the leverage is set the same from the program. And so, in the "Result" of the tester shows 0.4 and 0.08 respectively. Yes, and the points in the same "Results" tab are equal in value to 1 dollar(EURUSD pair), then it means that the leverage is the same.
 
JoinDoe:
Is it in my account settings at the brokers to look at? As for the leverage in the program, it is the same in the program, therefore the same leverage is set from the program. And so, in the "Result" of the tester shows 0.4 and 0.08 respectively. Yes, and the points in the same "Result" tab are equal in value to 1 dollar (EURUSD pair), then it means that the leverage is the same.

YES.

Search engine to help you, read what is "leverage" in forex and you'll find out everything. It is the leverage, AccountLeverage() is used in the program when calculating the lot as a % of the deposit.

 
Please tell me if this is off-topic.
has anyone gone through the variation process with a broker. i am asked for a scan of my passport and registration
Reason: