[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 132
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
Then I guess that's it:
Is that right?
Now I get it.
Thank you.
there is no such built-in function, you have to write it yourself, I showed an example here:https://www.mql5.com/ru/forum/131277/page113
thanks
There is no such a built-in function, you have to write it yourself, I showed an example here:https://www.mql5.com/ru/forum/131277/page113
And how to prescribe that the Expert Advisor has only this one condition for opening trades.
alsu:
Then you don't need size-1, otherwise the first run will index 0-1 and the array size will be zero.
Then it should be like this:
Then you don't need size-1, otherwise the indexing will be 0-1 and the array size will be zero on the first run.
Then it goes like this:
There initialization at the beginning of the program int size=1;
there is no such a built-in function, you have to write it yourself, I showed an example here:https://www.mql5.com/ru/forum/131277/page113
Why when I attach this code it opens an unbelievably large number of trades?
There's an initialisation at the beginning of the program int size=1;
Why is it that when I attach this code it opens an unbelievably large number of trades?
It can't be, because in the code:
no trades https://book.mql4.com/ru/trading/ordersend
it can't be the same because in the code:
no trades https://book.mql4.com/ru/trading/ordersend
I've inserted
if(profit == 0 &&time == 0){//actions if history is clean
OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,Bid-6*Point);
return;
}
if(profit >= 0){// action if last order was profitable, or zero
OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Bid-12*Point,Bid+12*Point);
return;
}
if(profit < 0 ){//actions if(profit < 0 ){/actions if last order was unprofitable
OrderSend(Symbol(),OP_SELL,0.1,Bid,3,Bid+15*Point,Bid-15*Point);
return;
}
return(0);
}