50% Retracement Rule. + Indicator.

 

I read many reports on Intraday exhustion of currency movements.

The idea works mainly for GBP/usd : After the currency makes a day H and aday L - check for mid/end Us/Euro Session - if the currency retraced more than 50% of the last H/L - it will not come back to it in the same day.

Agood way to find realtime peaks h/l is not to use a predicting indicator(like pivots - but to use an indicator which "knows" when a peak was made - this is mainly done by a FAST Retracement from a previous H/L. To this I use would use this (just compile and run in MQ4 - and use a setting of 15 min - 10 steps ).

What do u think guys, can we make an EA out of this?

The code:

// Peaks Power - For the 50% retracement rule - gbp - usd

#include

#include

#include

//---- initialize my global variables

double BidVar;

datetime InitTime;

datetime LastTime;

double LastPrice;

datetime CurrentTime;

int ElapsedMins;

int ElapsedSecs;

int LastAlertMins;

int AlertMins = 5; // the number of minutes between alerts

int Idx;

int Diff;

string Direction;

double PriceMin[60];

int PriceMinIdx;

string AlertCaption = "Peaks Power Expert Advisor";

int Response;

int Factor = 10000;

string AlertMsg;

string OutVal;

int Places;

string LastPriceStr;

string BidVarStr;

//---- User Interface input parameters

extern int Threshold_Pips=8; // minimum movement to alert

extern int Threshold_Mins=15; // how far back to look

extern string Alert_By_Email="Yes"; // only sends Email if = Yes, instead of popup message box

extern int Alert_Pause_Mins=10; // the number of minutes between alerts

//+------------------------------------------------------------------+

//| expert initialization function |

//+------------------------------------------------------------------+

int init()

{

ArrayInitialize(PriceMin,0);

InitTime = CurTime(); LastTime = InitTime;

Places = Digits;

if (Places != 4) { Factor = 100; }

if (Threshold_Mins > 60) {

Threshold_Mins = 60;

AlertMsg = "Threshold Minutes now set to Maximum 60 Minutes";

Response = MessageBox(AlertMsg, AlertCaption, MB_OK|MB_ICONEXCLAMATION);

}

if (Threshold_Mins < 5) {

Threshold_Mins = 5;

AlertMsg = "Threshold Minutes now set to Minimum 5 Minutes";

Response = MessageBox(AlertMsg, AlertCaption, MB_OK|MB_ICONEXCLAMATION);

}

if (Threshold_Pips < 3) {

Threshold_Pips = 3;

AlertMsg = "Threshold Pips now set to Minimum 3 Pips";

Response = MessageBox(AlertMsg, AlertCaption, MB_OK|MB_ICONEXCLAMATION);

}

//

// loop to here as in real time

//

while(True) {

ElapsedSecs = (CurTime() - LastTime);

if (ElapsedSecs >= 60) {

LastTime = CurTime();

ElapsedMins = ElapsedMins + 1;

PriceMinIdx = PriceMinIdx + 1;

if (PriceMinIdx > 60) { PriceMinIdx = 1; }

BidVar = MarketInfo(Symbol(),MODE_BID);

PriceMin[PriceMinIdx] = BidVar;

if (ElapsedMins > Threshold_Mins) {

Idx = PriceMinIdx - Threshold_Mins;

if (Idx < 1) { Idx = 60 - Threshold_Mins + PriceMinIdx; }

LastPrice = PriceMin;

if (LastPrice != 0) {

Direction = "Same";

if (BidVar > LastPrice) { Direction = "Up"; }

if (BidVar < LastPrice) { Direction = "Down"; }

Diff = MathAbs((BidVar * Factor) - (LastPrice* Factor));

LastPriceStr = DoubleToStr(LastPrice,Places);

BidVarStr = DoubleToStr(BidVar,Places);

if (Diff >= Threshold_Pips) {

Print(" Previous Price= ", LastPriceStr," Current Price= ",BidVarStr," Direction= ",Direction," ",Diff," Pips");

if (LastAlertMins <= 0) {

AlertMsg = Symbol() + " " + Direction+" " + Diff + " Pips from " + LastPriceStr;

if (Alert_By_Email == "Yes") {

SendMail("Jumpy Alert", AlertMsg);

} else {

MessageBox(AlertMsg, AlertCaption, MB_OK|MB_ICONEXCLAMATION);

}

LastAlertMins = Alert_Pause_Mins + 1;

}

}

}

LastAlertMins = LastAlertMins - 1;

}

}

}

return(0);

}

//+------------------------------------------------------------------+

//| expert deinitialization function |

//+------------------------------------------------------------------+

int deinit()

{

return(0);

}

//+------------------------------------------------------------------+

//| expert start function, called on price tick |

//+------------------------------------------------------------------+

int start()

{

return(0);

}

 

There are several EAs related to this subject.

tttttt EA in this section for example.

 

Just for information:

- tttttt EA testing within this elite section: EA determines HH and LL for the current day, determine average range H-L for the last 7 days (days2check), open buy order at HH+avgrange/2 or sell order at LL-avgrange/2 (offsetK=2) and profit is avgrange/2 (profitK=2), stop is avgrange/2 (lossK=2).

- there is some indicator breakout of H/L channel of 55 EMA. MT3 only.

- some EA on breakout from Igorad.

- the other good thread about breakout (and EA).

- EAs with similar with ideas with yours.

- EA trading on Friday only.

- Day Breakout EA from Igorad. the thread is here. EA and some backtesting results on EURUSD and GBPUSD are attached.

 

And there is some manual trading system of two indicators (mainly).

 

Which is the best EA to use for Daily gains newdigital? I'm asking questions here and no one seems to answer. Isn't anyone having any joy with these EA's? Because I don't seem to be getting any results like you've been posting here and I'm not sure why the backtesting isn't showing these results on the strategy tester.

 
newdigital:
Just for information:

- tttttt EA testing within this elite section: EA determines HH and LL for the current day, determine average range H-L for the last 7 days (days2check), open buy order at HH+avgrange/2 or sell order at LL-avgrange/2 (offsetK=2) and profit is avgrange/2 (profitK=2), stop is avgrange/2 (lossK=2).

- there is some indicator breakout of H/L channel of 55 EMA. MT3 only.

- some EA on breakout from Igorad.

- the other good thread about breakout (and EA).

- EAs with similar with ideas with yours.

- EA trading on Friday only.

- Day Breakout EA from Igorad. the thread is here. EA and some backtesting results on EURUSD and GBPUSD are attached.

Cheers for the reply,

But my meaning of the "indicator" : is as an Exit strategy - to determine when NOT to enter the market, and if you must, than beware of peaks on gbp/usd . We have plenty of ways to enter the market ...

P.S - is there an ema dedicated to the Big Ben Strategy on cable? ie Frankfurt/London open Breakout?

 

There are many EAs working on breakout.

Different breakout, different strategies: many EAs created by russians/ukrainians are not using any ema/lwma/ma/sma etc (they don't believe in this indicator in EA). Some EAs are using. They are very different.

But there are a lot of them.

Plenty.

And one EA was tested only (i am talking about forward testing) - ttttt EA. Any other EAs have been forgotten: somebody did backtest and nothing. It was not tested properly. But there are plenty of them.

I think it will be very good to have indicator (not EA). Because using the indicator the people may see the strategy or system visually. And they will use this indicator in many systems.

Many traders are trading manually and using some EAs for confirmation of the entrance or exit.