[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 523
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
Question: who has this EA opening both Buy and Sell orders?
Or maybe I'm misunderstanding something, but I'm getting error 138.
https://www.mql5.com/ru/code/8177
For five digits, the slippage must be increased
>> Thank you. Now I see why it used to work and now it doesn't. I didn't think of that.Preferably not an eternal loop, but the execution of the program a certain number of times.
Here is a simple example -
int tick=OrderSend("GBPUSD",OP_BUY,0.01,Ask,3,Bid-30*Point,Bid+30*Point);
How do I place the loop statement so that when a stop order triggers, the same (for example) position is opened immediately?
циклов не надо, программа и так зациклена на вызов при каждом тике. Запомните тикет ордера, а потом проверяйте каждый раз OrderCloseTime(). Если оно не 0, значит ордер закрылся. Как именно - по тейку или стопу - можно узнать, проанализировав OrderProfit().
What if the stop was at breakeven, etc.?
а если стоп стоял в безубытке и т.п.?
If only mushrooms could grow in your mouth.
если б да кабы, да во рту росли б грибы.
Can't you think of anything cleverer? Answer the question properly.
Подскажите как зациклить выполнение всей программы?
Желательно не вечный цикл, а выполнение программы определенное количество раз.
Вот простой пример -
int tick=OrderSend("GBPUSD",OP_BUY,0.01,Ask,3,Bid-30*Point,Bid+30*Point);
Как расположить оператор цикла чтобы при срабатывании стоп приказа сразу происходило бы открытие этой же (например) позиции?
Not quite clear, paraphrase.
Не совсем понятно, перефразируйте.
It is better to describe in words what you want to get and not to refer to cycles and all that. For example to open one order by RSI reading, if it will be closed by stop, immediately open the next one, etc.
Хороший код, за полторы секунды откроет пятнадцать ордеров в зависимости от показаний RSI.
Лучше описать словами то что хочется получить и не надо ссылаться на циклы и все такое. к примеру открыть один ордер по показаниям RSI, если он будет закрыт по стопу сразу открыть следующий и т.п.
=))
I don't mind, I don't mind.
I agree "Better described in words"!