Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1558
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
You're welcome, but I don't seem to have done anything...
Here
Thank you, and thenAlexey Viktorov too!
Try it
you can edit the "Signal to open an order" function
Try,
you can edit the "Signal to open order" function.
Wow, what a huge code this has become.
Thank you very much - will be trying it out today!
Professionals, a tip... I've made a button on the chart.
I am trying to make it so that when the button is pressed instead of alert, a script named K1 will run, when pressed again the script will be deleted, but it fails. Thank you.
Professionals, a tip... I've made a button on the chart.
Trying to make it so that when the button is pressed instead of alert, a script named K1 will run, when pressed again the script will be deleted, but no luck. Thank you.
Try,
the "Signal to open order" function you can edit
tried owls in the tester. everything works perfectly.
but i have a couple of questions:
1. as i understood from the tests, owls keep track of the current profit/loss according to the parameters specified to it, and it doesn't make any difference to it how many trades for it to happen,
i want to know if i have reached specified profit/loss in one trade or in three consecutive trades?
2. I asked my Expert Advisor for a drawdown of 25$, but it failed with a drawdown of 40$ on a large lot - is it normal for a tester? Maybe it is impossible to run a test at maximum speed?
3. is it possible to make the tracking of current profit/loss be reset after each trade, no matter by which signal it was closed (tp/sl or after reaching specified profit/loss in money )?
tried owls in the tester. everything works perfectly.
But I have a couple of questions:
1. as i understood from the tests, owl tracks the current profit/loss according to the parameters specified to it, and it does not make any difference how many trades will happen for it,
i want to know if i have reached specified profit/loss in one trade or in three consecutive trades?
2. I asked my Expert Advisor for a drawdown of 25$, but it failed with a drawdown of 40$ on a large lot - is it normal for a tester? Maybe it is impossible to run a test at maximum speed?
3. is it possible to make the tracking of current profit/loss to be reset after closing each deal, no matter by which signal it was closed (tp/sl or after reaching specified profit/loss)?
1) At high speed or if not on ticks in the tester, it will close at the first available price.
2)You have a lot increase going on and with a big lot 1 point may be more than the allowable level.
3)I don't understand what you want, what do you need to track if zeroing after every trade?
Good afternoon gentlemen programmers!!!
Please help a newbie with a function.
The function counts the total profit by history.
The problem is that it works for one broker and it doesn't want to work for another one.
It works on Hercic but not on RoboForex. I have an ECN account on RoboForex.
I don't know what the problem is. Here is the code:
double lastloss()
{
int typ = -1,cnt = 0;
double lastloss = 0;
for(int i = OrdersHistoryTotal()-1; i>=0; i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY))
{
if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic)
{
if(cnt == 0) typ = OrderType();
if(cnt > 0 && OrderType()!= typ) break;
lastlos += OrderProfit() + + OrderSwap() + OrderCommission();
cnt++;
}
}
}
return(lastlos);
}