Page 5 of 44
Re: Simple Expert Advisors (EA's) for MT4
Posted: Mon Mar 13, 2017 8:55 am
by mrtools
mrtools wrote:This a simple non lag ma EA my main focus on back testing was on the filter and the EA seemed to perform better when using the filter, but that's just preliminary testing. The non lag ma is the indicator used by the EA it needs to be in mt4 indicators folder.
Re: Simple Expert Advisors (EA's) for MT4
Posted: Fri Mar 17, 2017 11:51 pm
by borgesr
Hi Mrtoosl / Mladen,
I would like to use EA Simple non lag ma ea in the offline graph generated by the HA smoothed offline 3.09 indicator
Is it necessary to make the adjustment so that a EA works in Offline chart?
Do you have any EA specifically made for Renko Chart?
Thank you,
Rogério
Re: Simple Expert Advisors (EA's) for MT4
Posted: Sat Mar 18, 2017 2:17 am
by mrtools
borgesr wrote:Hi Mrtoosl / Mladen,
I would like to use EA Simple non lag ma ea in the offline graph generated by the HA smoothed offline 3.09 indicator
Is it necessary to make the adjustment so that a EA works in Offline chart?
Do you have any EA specifically made for Renko Chart?
Thank you,
Rogério
Rogerio, far as I'm aware of, it will work on ha offline charts, best to try it on a demo account first though
Re: Simple Expert Advisors (EA's) for MT4
Posted: Fri Apr 07, 2017 3:47 am
by mntiwana
Hi borgesr
In response to your post
here is one version ,i have not tried but i think it is what you looking for,some description here and the rest users can read PDF (included)
Re: Simple Expert Advisors (EA's) for MT4
Posted: Fri Apr 07, 2017 4:31 am
by borgesr
Hi mntiwana,
Do you have the code for this EA?
I'm just looking at the photo.Thank you,
Rogério
mntiwana wrote:Hi borgesr
In response to your post
here is one version ,i have not tried but i think it is what you looking for,some description here and the rest users can read PDF (included)
Re: Simple Expert Advisors (EA's) for MT4
Posted: Fri Apr 07, 2017 5:04 am
by mntiwana
borgesr wrote:Hi mntiwana,
Do you have the code for this EA?
I'm just looking at the photo.Thank you,
Rogério
But i can see there is code and pdf
Re: Simple Expert Advisors (EA's) for MT4
Posted: Fri Apr 07, 2017 5:16 am
by borgesr
Hi,
I have not found the code for partial closing on more than 1 level.
See the example below for only 1 partial close
Code: Select all
// ----- Partial Closeextern string ptcInputs = "===== Partial Close settings: =====";
extern double PartCloseTgt = 15; // Partial Close Target in pips
extern double PartClosePct = 50; // Partial Close Position Percent
Pct1 = 0.01*PartClosePct;
Tgt1 = PartCloseTgt;void PartClose()
{
double Profit, pLots = 0;
lot_step = MarketInfo(Symbol(),MODE_LOTSTEP);
for(int cnt=0;cnt<OrdersTotal();cnt++)
{
if(!OrderSelect(cnt, SELECT_BY_POS)) continue;
if(OrderSymbol() != Symbol() || OrderMagicNumber() != ipiMagic) continue;
if(OrderType() == OP_BUY)
{
Profit = (MarketInfo(Symbol(),MODE_BID) - OrderOpenPrice())/gldPoint;
if(Profit >= Tgt1 && Tgt1 > 0)
{
pLots = MathMin(OrderLots(),MathCeil(Pct1 * OrderLots()/lot_step)*lot_step);
if(pLots >= lot_min)
{
CloseAtMarket(OrderTicket(),pLots,Aqua);
}
}
}
if (OrderType() == OP_SELL)
{
Profit = (OrderOpenPrice() - MarketInfo(Symbol(),MODE_ASK))/gldPoint;
if(Profit >= Tgt1 && Tgt1 > 0)
{
pLots = MathMin(OrderLots(),MathCeil(Pct1*OrderLots()/lot_step)*lot_step);
if(pLots >= lot_min)
{
CloseAtMarket(OrderTicket(),pLots,Pink);
}
}
}
}
}
bool CloseAtMarket(int ticket,double lot,color clr)
{
bool result = false;
double price;
int tries=0;
while(!result && tries < TriesNum)
{
RefreshRates();
price = NormalizeDouble(OrderClosePrice(),Digits);
result = OrderClose(ticket,lot,price,dRatio*Slippage,clr);
if (!result)
{
Print("Error closing order : ",ErrorDescription(GetLastError())," ticket=",ticket," lot=",lot," Price=",price);
Sleep(5000);
}
tries++;
}
return(result);
}
Re: Simple Expert Advisors (EA's) for MT4
Posted: Fri Apr 07, 2017 6:01 am
by mntiwana
What i told you according to pdf,already told you i have not tried it,i don't have code (mq4),if you have code that is good so you knows better than me,if it do not help you forget it and search some thing next.
regards
Re: Simple Expert Advisors (EA's) for MT4
Posted: Sun Apr 23, 2017 9:55 pm
by Klesenza
You can add the 38 types of average values in these EAs. Is that possible?
Re: Simple Expert Advisors (EA's) for MT4
Posted: Sun Apr 23, 2017 11:42 pm
by chirvasamar
Dear all!
In addition to Klesenza question, is there any simple EA to test "averages - mtf - alerts 8.4.ex4" and "stepma averages 4_4 mtf.ex4" ?
Thank you!