gentlemen, can you tell me... if i want to test the inputs separately in a system... so i should aim for 51% of hits or higher in the result to consider that these inputs will work well in combination with the rest of the system? well, obviously there should be SL=TP in the inputs operation.
Folks, help me find a bug. Why isn't the buzzer working in the turkey? It is there as far as I understand. I've got Alert on in the settings but no beep. The arrow appears on the whole indyuk works fine but the beeper for some reason that glitches((( Thanks in advance all!
Folks, help me find a bug. Why isn't the buzzer working in the turkey? It is there as far as I understand. I've got Alert on in the settings but no beep. The arrow appears on the whole indyuk works fine but the beeper for some reason that glitches((( Thanks in advance all!
Holy crap...everything is glitchy)))) I've posted twice... It just popped up a message that - you can't add a comment because there's too much text))) But it did add))
//---- input parameters extern int period_ma=21; extern int period_adx=10; extern int filt=5; double muv; int t; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //----
//---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //----
//---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- if (OrdersTotal()==0) { muv=(iMA(Symbol(),PERIOD_M15,period_ma,0,MODE_LWMA,PRICE_CLOSE,1)-(High[1]-((High[1]-Low[1])/2)))*(-1)*100; double adx_main=iADX(Symbol(),PERIOD_M15,period_adx,PRICE_CLOSE,MODE_MAIN,0); double adx_min=iADX(Symbol(),PERIOD_M15,period_adx,PRICE_CLOSE,MODE_MINUSDI,0); double adx_plus=iADX(Symbol(),PERIOD_M15,period_adx,PRICE_CLOSE,MODE_PLUSDI,0); if (muv<0 && MathAbs(muv)>0.1 && adx_main>adx_min && adx_min>adx_plus) { t=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,NULL,NULL,"My order #",16384,0,Green); Print (GetLastError()); } }
if (OrdersTotal()>0) { if (muv>0) { OrderSelect(t,SELECT_BY_TICKET,MODE_TRADES); OrderClose(t,0.1,Ask,3,Red); Print (GetLastError()); } } return(0); } //+------------------------------------------------------------------+
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Is it possible to declare an array with a set of different data types? Apparently not. "Test" question... so to speak...
Is it possible to declare an array with a set of different data types? Apparently not. "Test" question... so to speak...
Check answer. No.
How can I get the owl to work only at the times specified, i.e. from T1 to T2?
How can I get the owl to work only at the specified times, i.e. from T1 to T2?
How can I get the owl to work only at the times specified, i.e. from T1 to T2?
Also here... >> 'MetaEditor: Relying on the power of templates'.
What's the problem?
//+------------------------------------------------------------------+
//| ad+muv.mq4 |
//| Evgenio |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Evgenio"
#property link "http://www.metaquotes.net"
//---- input parameters
extern int period_ma=21;
extern int period_adx=10;
extern int filt=5;
double muv;
int t;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
if (OrdersTotal()==0)
{
muv=(iMA(Symbol(),PERIOD_M15,period_ma,0,MODE_LWMA,PRICE_CLOSE,1)-(High[1]-((High[1]-Low[1])/2)))*(-1)*100;
double adx_main=iADX(Symbol(),PERIOD_M15,period_adx,PRICE_CLOSE,MODE_MAIN,0);
double adx_min=iADX(Symbol(),PERIOD_M15,period_adx,PRICE_CLOSE,MODE_MINUSDI,0);
double adx_plus=iADX(Symbol(),PERIOD_M15,period_adx,PRICE_CLOSE,MODE_PLUSDI,0);
if (muv<0 && MathAbs(muv)>0.1 && adx_main>adx_min && adx_min>adx_plus)
{
t=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,NULL,NULL,"My order #",16384,0,Green);
Print (GetLastError());
}
}
if (OrdersTotal()>0)
{
if (muv>0)
{
OrderSelect(t,SELECT_BY_TICKET,MODE_TRADES);
OrderClose(t,0.1,Ask,3,Red);
Print (GetLastError());
}
}
return(0);
}
//+------------------------------------------------------------------+
should close here