Finding PIPS difference?

 

Hello,

I use EMA 288.

when the price moves upward of EMA288 place buy order at the same time place sell order when price moves downwards to EMA288.

I use additional filter MACD above 0 for buy and below 0 for sell.

The problom i need to solve is:

sometime the price moves upwards to EMA288,but waiting for signal MACD to go above 0. where i need to filter that when 2 conditions met the price should not be more than 20-30 pips above EMA288 and for sell price should not be below 20-30 pips EMA288.

how to find the PIP difference to validate?

Thank you in Advance

Sheriff

 
sheriffonline:

Hello,

I use EMA 288.

when the price moves upward of EMA288 place buy order at the same time place sell order when price moves downwards to EMA288.

I use additional filter MACD above 0 for buy and below 0 for sell.

The problom i need to solve is:

sometime the price moves upwards to EMA288,but waiting for signal MACD to go above 0. where i need to filter that when 2 conditions met the price should not be more than 20-30 pips above EMA288 and for sell price should not be below 20-30 pips EMA288.

how to find the PIP difference to validate?

Thank you in Advance

Sheriff


A  ==>>>   first  find with coding the value of EMA288 for last bar      (How Do you do that  ??)

for Buy   price has to be smaller then  A +  20-30 pips

for Sell    price has to be greater then  A -  20-30 pips    (and How Do you do that  ??)

 

Show your attempt I'm helping not coding for you 

 
sheriffonline:how to find the PIP difference to validate?
if( priceCur - priceEMA > 20 * pips2dbl) ...
or
double pipDifference = (priceCurr - priceEMA) / pips2dbl;
Reason: