Requests & Ideas, the beginning - page 8

 
jamfl_1999:
I am not new to this forum but new to the elite section. I have been following earnestly and must say...you guys rock!

I recently opened a standard account. I would ike your advice on which ea or combination of ea would be a good bet. I would need to nkow which one does good with 10lot orders and possibly 20lots per order. I am not concerned with making 1000 pips per week...only 20 per day, but with 10 lots ($100 per pip).

Again i do apprecite you taking the time to help.

PS i understand that whichever ea i choose i must test it with my broker for a period of time (interbank). Thanks.

I think the members will answer.

I just want to inform only.

We have this thread about portfolio https://www.mql5.com/en/forum/general

It is not finished yes because we have some new EAs which should be forward tested before this portfolio.

Besides this thread may help https://www.mql5.com/en/forum

And all 4 thread which you see in the beginning of each page may help also.

 

Hi,

That's a mighty tall order, and I'm not here to offer advice on any particular EA. I'd just like to share what I've noticed, because I do have a fascination with them.

All of them have their good and bad points. Some are good in one market condition, but not the other. All of them will lose money here and there. Some have huge draw-downs, but make money in the long run.

The idea of an EA that's capable of working full time with very little human supervision is a myth who's time has not yet arrived.

Look at the contest's weekly results and take your picks. However, there are many purely manual methods here that show very good results, and I'm not sure the time spent testing and managing a number of EA's would be less than the time it would take to learn to call your own signals.

Good luck and the best to you,

moneyline

 

hello,as i ve,tested all indecator and EA.belive or not nothing work.i ve,lostahuge amount.i found only really work news,you have to trade the news ,don,t rellay on indicators and EA. check out this site http://www.forexfactory.com/?page=calendar

best wishes

 

Extreme sudden movement Indicator

Guys,

Does anyone have an Indicator that shows extreme sudden movement in a pair?

What I mean is : An indicator which detects a sudden "explosion" in pips , either long or short ,it does not matter what time frame it is on.

I am thinking a renko variation, and have this attached indicator which detects consecutive movements in any given direction, but it does not recognize a sudden burst.

Tnx

Files:
jumpy.mq4  6 kb
 

Working with previous order data

Can someone please help me figure this one out?

I am trying to retrieve the Opening Price of the last closed trade and then add 80 pips to it and if that value is less than 1.9000, it will pass on to the next step in the EA. I can't get this to work but here is what I have:

if(OrderSelect("Last Trade Open",SELECT_BY_POS,MODE_HISTORY)==True)

Print("Open price for the order",OrderOpenPrice());

else

Print("OrderSelect failed error code is",GetLastError());

if((OrderOpenPrice()+0.0080) < 1.9000)

What am I doing wrong ???

thanks,

Monty

 

Hi Monty,

I've written function for your needs.

double pastprice[]; - put it before expert initialization

void PastTradePrice()

{

int total=HistoryTotal(), n=0;

ArrayResize(pastprice,total);

for (int cnt=total-1;cnt>=0;cnt--)

{

if ( OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)

{

if (!OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY) && OrderType() > OP_SELL ) continue;

if (OrderType()==OP_BUY)

{n = n+1;

pastprice[n] = OrderOpenPrice();}

if (OrderType()==OP_SELL)

{n = n+1;

pastprice[n] = OrderOpenPrice();}

}

}

}

n - number of trades counting from last.

So pastprice[1] mean last trade price, pastprice[2] - second from the end and so on.

With this function you can retrieve any OrderOpenPrice for past trades.

Igor

 

IGOR, Thank you very much for taking the time to do this for me!

I appreciate your help with this. I'm not sure how to integrate this into the next step though. I wish to take the resulting value from the last trade and evaluate it to give two different results. Result 'A' will be to place a BUY order, result 'B' will be to simply move on to the next part of the EA. But I can't figure out how to work with the code you gave me. How do I get it to work with the "pastprice/OrderOpenPrice" and then add 80 pips and if that value is less than 1.9000, it places a BUY order??? I have been fighting with this concept for over a week now so if you can help me finish this I would really appreciate it.

Thanks again Igor,

Monty

pastprice[n] = OrderOpenPrice();}

}

}

}

if((OrderOpenPrice()+0.0080) < 1.9000) //this is what i have but it doesn't work

BuyOrder=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,"Magic",0,0,White);

 

Hi,

Place these parts of code in your EA:

double pastprice[]; // before expert initialization function

int init()

{

return(0);

}

.

.

.

void PastTradePrice() // before expert deinitialization function

{

int total=HistoryTotal(), n=0;

ArrayResize(pastprice,total);

for (int cnt=total-1;cnt>=0;cnt--)

{

if ( OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)

{

if (!OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY) && OrderType() > OP_SELL ) continue;

if (OrderType()==OP_BUY)

{n = n+1;

pastprice[n] = OrderOpenPrice();}

if (OrderType()==OP_SELL)

{n = n+1;

pastprice[n] = OrderOpenPrice();}

}

}

}

int deinit()

{

return(0);

}

// after expert start function

int start()

{

.

.

.

PastTradePrice();

if(pastprice[1]+0.0080) < 1.9000) //this is what i have but it doesn't work

BuyOrder=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0, "Magic",0,0,White);

Igor

 

Hello,

I'm newbie here & i need help with some coding that i adjusted. Can someone here help cause when i compile it, i got an error :

'}' - unbalanced parentheses D:\Program Files\MetaTrader 4\experts\indicators\test.mq4 (141, 1)

[/code]

[code]

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 GreenYellow

#property indicator_color2 Red

extern int MA_Period=10;

extern int MA_Shift=0;

extern int MA_Method=0;

extern int AllBars=250;

extern bool Alert_On_Crossing = true;

extern string NameFileSound1 = "alert.wav";

extern string NameFileSound2 = "alert1.wav";

double ExtMapBuffer[];

double CrossUp[];

double CrossDown[];

extern int FasterEMA = 1;

extern int SlowerEMA = 4;

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

//| Custom indicator initialization function |

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

int init()

{

int draw_begin;

string short_name;

//---- drawing settings

SetIndexStyle(0,DRAW_LINE);

SetIndexShift(0,MA_Shift);

IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));

if(MA_Period<2) MA_Period=13;

draw_begin=MA_Period-1;

//---- indicators

SetIndexStyle(0, DRAW_ARROW, EMPTY);

SetIndexArrow(0, 233);

SetIndexBuffer(0, CrossUp);

SetIndexStyle(1, DRAW_ARROW, EMPTY);

SetIndexArrow(1, 234);

SetIndexBuffer(1, CrossDown);

//---- indicator short name

switch(MA_Method)

{

case 1 : short_name="EMA("; draw_begin=0; break;

case 2 : short_name="SMMA("; break;

case 3 : short_name="LWMA("; break;

default :

MA_Method=0;

short_name="SMA(";

}

IndicatorShortName(short_name+MA_Period+")");

SetIndexDrawBegin(0,draw_begin);

//---- indicator buffers mapping

SetIndexBuffer(0,ExtMapBuffer);

//---- initialization done

return(0);

}

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

//| Custom indicator deinitialization function |

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

int deinit()

{

//----

//----

return(0);

}

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

//| Custom indicator iteration function |

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

int start() {

int i, counter;

double fasterEMAnow, slowerEMAnow, fasterEMAprevious, slowerEMAprevious, fasterEMAafter, slowerEMAafter, cu;

double Range, AvgRange;

int counted_bars=IndicatorCounted();

//---- check for possible errors

if(counted_bars<0) return(-1);

//---- last counted bar will be recounted

if(counted_bars>0) counted_bars--;

int limit = Bars-counted_bars-1;

if (limit > AllBars) limit = AllBars;

for(i=limit; i > 0; i--) {

counter=i;

Range=0;

AvgRange=0;

for (counter=i ;counter<=i+9;counter++)

{

AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);

}

Range=AvgRange/10;

fasterEMAnow = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i);

fasterEMAprevious = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i+1);

fasterEMAafter = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i-1);

slowerEMAnow = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, i);

slowerEMAprevious = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, i+1);

slowerEMAafter = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, i-1);

if ((fasterEMAnow > slowerEMAnow) && (fasterEMAprevious slowerEMAafter)) {

CrossUp = Low - Range*0.5;

if (Alert_On_Crossing==true)PlaySound ("alert.wav");

Alert("EMA Cross for "+Symbol()+" on the "+Period()+" minute chart.");

}

// if(limit<=2)

// {

// Alert (Symbol()," ",Period(),"-Min. BUY Crossed Up at ", CrossUp);

// }

}

else if ((fasterEMAnow slowerEMAprevious) && (fasterEMAafter < slowerEMAafter)) {

CrossDown = High + Range*0.5;

if (Alert_On_Crossing==true)PlaySound ("alert1.wav");

Alert("EMA Cross for "+Symbol()+" on the "+Period()+" minute chart.");

}

// if(limit<=2)

// {

// Alert (Symbol()," ",Period(),"-Min. SELL Crossed Down at ", CrossDown);

// }

}

return(0);

}

 
nimzoindy:
Hello,

I'm newbie here & i need help with some coding that i adjusted. Can someone here help cause when i compile it, i got an error :

'}' - unbalanced parentheses D:\Program Files\MetaTrader 4\experts\indicators\test.mq4 (141, 1)

[/code]

[code]

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 GreenYellow

#property indicator_color2 Red

extern int MA_Period=10;

extern int MA_Shift=0;

extern int MA_Method=0;

extern int AllBars=250;

extern bool Alert_On_Crossing = true;

extern string NameFileSound1 = "alert.wav";

extern string NameFileSound2 = "alert1.wav";

double ExtMapBuffer[];

double CrossUp[];

double CrossDown[];

extern int FasterEMA = 1;

extern int SlowerEMA = 4;

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

//| Custom indicator initialization function |

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

int init()

{

int draw_begin;

string short_name;

//---- drawing settings

SetIndexStyle(0,DRAW_LINE);

SetIndexShift(0,MA_Shift);

IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));

if(MA_Period<2) MA_Period=13;

draw_begin=MA_Period-1;

//---- indicators

SetIndexStyle(0, DRAW_ARROW, EMPTY);

SetIndexArrow(0, 233);

SetIndexBuffer(0, CrossUp);

SetIndexStyle(1, DRAW_ARROW, EMPTY);

SetIndexArrow(1, 234);

SetIndexBuffer(1, CrossDown);

//---- indicator short name

switch(MA_Method)

{

case 1 : short_name="EMA("; draw_begin=0; break;

case 2 : short_name="SMMA("; break;

case 3 : short_name="LWMA("; break;

default :

MA_Method=0;

short_name="SMA(";

}

IndicatorShortName(short_name+MA_Period+")");

SetIndexDrawBegin(0,draw_begin);

//---- indicator buffers mapping

SetIndexBuffer(0,ExtMapBuffer);

//---- initialization done

return(0);

}

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

//| Custom indicator deinitialization function |

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

int deinit()

{

//----

//----

return(0);

}

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

//| Custom indicator iteration function |

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

int start() {

int i, counter;

double fasterEMAnow, slowerEMAnow, fasterEMAprevious, slowerEMAprevious, fasterEMAafter, slowerEMAafter, cu;

double Range, AvgRange;

int counted_bars=IndicatorCounted();

//---- check for possible errors

if(counted_bars<0) return(-1);

//---- last counted bar will be recounted

if(counted_bars>0) counted_bars--;

int limit = Bars-counted_bars-1;

if (limit > AllBars) limit = AllBars;

for(i=limit; i > 0; i--) {

counter=i;

Range=0;

AvgRange=0;

for (counter=i ;counter<=i+9;counter++)

{

AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);

}

Range=AvgRange/10;

fasterEMAnow = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i);

fasterEMAprevious = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i+1);

fasterEMAafter = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i-1);

slowerEMAnow = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, i);

slowerEMAprevious = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, i+1);

slowerEMAafter = iMA(NULL, 0, SlowerEMA, 0, MODE_EMA, PRICE_CLOSE, i-1);

if ((fasterEMAnow > slowerEMAnow) && (fasterEMAprevious slowerEMAafter)) {

CrossUp = Low - Range*0.5;

if (Alert_On_Crossing==true)PlaySound ("alert.wav");

Alert("EMA Cross for "+Symbol()+" on the "+Period()+" minute chart.");

}

// if(limit<=2)

// {

// Alert (Symbol()," ",Period(),"-Min. BUY Crossed Up at ", CrossUp);

// }

}

else if ((fasterEMAnow slowerEMAprevious) && (fasterEMAafter < slowerEMAafter)) {

CrossDown = High + Range*0.5;

if (Alert_On_Crossing==true)PlaySound ("alert1.wav");

Alert("EMA Cross for "+Symbol()+" on the "+Period()+" minute chart.");

}

// if(limit<=2)

// {

// Alert (Symbol()," ",Period(),"-Min. SELL Crossed Down at ", CrossDown);

// }

}

return(0);

}

No error now.

And your EA is placing arrows and having alarm.

But I am not sure that it is what you needed.

Files:
nimzoindy.mq4  5 kb
Reason: