Only take a position on a negative trend?

 

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.

Thanks.
 

Well you're in the right place to learn. Go ahead and write it.


CB

 
cloudbreaker wrote >>

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?

 
Per:

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.
 
Per:
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

 
cloudbreaker wrote >>

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.

Reason: