должно получиться 6 результатов оптимизации - приложите логи журнала тестера стратегий. то проведите оптимизацию отдельно в течении часа - интересно сопоставить расчетное время на оптимизацию с реальным. По поводу журнала - вероятно не стоит галка - ставиться по нажатию ПКМ во вкладке Тестера стратегий
Please help me to understand what I am doing wrong!
As soon as I paste a comment into the below attached code - my robot stops working.
Without the comment - everything works. I change the account to normal and fake.
What am I doing wrong?
You forgot the parentheses in the if. If not equal to the score, then comment and then retourn. And if it is not equal to the score, it goes on and hits retourn.
voidOnTick()
{
if(AccountInfoInteger(ACCOUNT_LOGIN) != 12345678)
{
Comment("На этом счете - робот не работает");
return;
}
}
Please advise an example of using this function in EA.
You can look here.
Hello!
https://www.mql5.com/ru/search#!keyword=ACCOUNT_LOGIN&module=mql5_module_forum
Hello!
You forgot the parentheses in the if. If not equal to the score, then comment and then retourn. And if it is not equal to the score, it goes on and hits retourn.
And after that OnTick finishes and waits for the next tick. It doesn't go any further!!!!
Thanks !!! Got it all figured out, fixed it and it works now.
It was just a glitch that went to my head.
Can you tell me if it is possible to make a call from the Expert Advisor
void OnTradeTransaction()
from an external file ?
I created a test file *mqh and added it there.
In the Expert Advisor I added this file
#include <тест.mqh>But OnTradeTransaction is not called from the Expert Advisor.
How to do it correctly ?
How to do it correctly ?
I would do the opposite. In the .mqh file write a class, for example CTest in the file test.mqh.
Connecting the class
#include <test.mqh> CTest onTest;And from the EA from the OnTradeTransaction function call my function
I would do the opposite. In the .mqh file I would write a class, for example CTest in the file test.mqh.
Connecting the class
And from the EA from the OnTradeTransaction function call my function
I have dared to try a first simple EA and it works flawlessly.
But when I upload it to MQL in the market, I get an error message:
Why is that? Is it due to the netting account?
I have already read some forum posts about this, but I don't understand the problem.
The volume is fixed by the EA. Even 0.01 lot etc. does not work.
Would be grateful for someone to help me out.
Why is that? Is it due to the netting account?
I have already read some forum posts about this, but I don't understand the problem.
The volume is fixed by the EA. Even 0.01 lot etc. does not work.
Would be grateful for someone to help me out.
It's because of how you calculate the volume (lots) - but without code?
Fixed lot size is probably not a solution, I guess you check with high and low account balance and different margin charges...