PIP Entry Filter For MT-4

 
Does anybody have the code, or how to add a PIP filter to MT-4. For example when sma crosses wma wait 5 pips before opening trade.

Thanks
Mike
 
Simple method for this is to calculate difference between two MA - result is in PIPS. Perhaps it is not exactly what you want but it's easy to code.

regards

Rafael
 
Simple method for this is to calculate difference between two MA - result is in PIPS. Perhaps it is not exactly what you want but it's easy to code.

regards

Rafael



Do you mean bars back???

Thank you
Mike
 
Does anybody have the code, or how to add a PIP filter to MT-4. For example when sma crosses wma wait 5 pips before opening trade.

Thanks
Mike


I understand that you want to wait for price move 5 pips from the moment of cross of indicators. This is complex to calculate, but calculation of MA1(i)-MA2(i)>5pips is simple. Similar technique is provided with MACD expert example .
 
1) get the price ant the moment of the cross and save it in avarable X

2) put an IF condition that open the trade when price (bid or ask depend if the order short or long) price==X+5;

i hope i helped you
 
1) get the price ant the moment of the cross and save it in avarable X

2) put an IF condition that open the trade when price (bid or ask depend if the order short or long) price==X+5;

i hope i helped you



Thank You Much

Mike
Reason: