Well you're in the right place to learn. Go ahead and write it.
CB
Why doesn´t MQL4 have a method that does this?
MQL4 is a programming framework - providing facilities which are applicable (horizontally) across all traders.
It is not a collection of prebuilt strategies and partial strategies - which may be appropriate (vertically) only to some traders.
CB
Yes I know, but this functionallity seems to be more usable than an ordinary order that react emidietly when the price it hit. I´m just a beginner in MQL4.
Have you checked all that can be done with the numerous flavours of order that can be opened with OrderSend() - ie. OP_BUY, OP_BUYSTOP, OP_BUYLIMIT along with StopLoss and TakeProfit params?
CB
Have you checked all that can be done with the numerous flavours of order that can be opened with OrderSend() - ie. OP_BUY, OP_BUYSTOP, OP_BUYLIMIT along with StopLoss and TakeProfit params?
CB
Yes I have checked it. OrderSend() uses entry, stoploss and limit params that reacts emidietly. If you what the orders not to react under a certain movement, i think you have to make it by yourself.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I want a script that enters the market after X pip (like 25pip) and leave the market at X+1pip+spread or at X-50pip+spread. The script should be able to take both long and short positions. I also want it to enter and leave the market on negative trend, is shall not react on a negativ trend under a certain level, say under 0,5pip.
After leaving the market it shall wait for a few minutes (decided by a random number) before start counting to X pip again.