I am putting an EA (working) in the Market. MT4 platform. I can display a single file. A file of the Expert Advisor. It should pass the validity, but it cannot because it is an EA without indicators. They are in separate files. The Expert Advisor works with four indicators. They have to be somehow attached to the Expert Advisor. You have to specify the path, i.e., write them in the Expert Advisor. What? and Where? Please advise which form and how to do this.
From what I understand, we have to use the "Resources" . I do not know how to register it correctly in the Expert Advisor. Maybe you know some other solutions.
Thank you .
Here's what it says when validity fails
2016.04.01 00:00:00 cannot open file 'MQL4\indicators\Heiken_Ashi_Smoothed1lime.ex4' [2] 2016.04.01 00:00:00 cannot open file 'MQL4\indicators\Heiken_Ashi_Smoothed1lime.ex4' [2]01 00:00:00 cannot open file 'MQL4\indicators\MA in Color_wAppliedPrice.ex4' [2] 2016.04.01 00:00:00 cannot open file 'MQL4\indicators\MA in Color_wAppliedPrice.ex4' [2] 2016.04.01 00:00:00 cannot open file 'MQL4\indicators\HA_Smooth.ex4' [2] 2016.04.01 00:00:00 cannot open file 'MQL4\indicators\HA_Smooth.ex4' [2] 2016.04.01 00:00:00 cannot open file 'MQL4\indicators\TrendLord.ex4' [2] 2016.04.01 00:00:00 cannot open file 'MQL4\indicators\TrendLord.ex4' [2] 2016.04.01 00:00:05 cannot open file 'MQL4\indicators\Heiken_Ashi_Smoothed1lime.ex4' [2] 2016.04.01 00:00:05 cannot open file 'MQL4\indicators\Heiken_Ashi_Smoothed1lime.ex4' [2] 2016.04.01 00:00:0504.01 00:00:05 cannot open file 'MQL4\indicators\MA in Color_wAppliedPrice.ex4' [2] 2016.04.01 00:00:05 cannot open file 'MQL4\indicators\MA in Color_wAppliedPrice.ex4' [2] 2016.04.0101 00:00:05 cannot open file 'MQL4\indicators\HA_Smooth.ex4' [2] 2016.04.01 00:00:05 cannot open file 'MQL4\indicators\HA_Smooth.ex4' [2] 2016.04.01 00:00:05 cannot open file 'MQL4\indicators\TrendLord.ex4' [2] 2016.04.0101 00:00:05 cannot open file 'MQL4\indicators\TrendLord.ex4' [2] 2016.04.01 00:00:10 cannot open file 'MQL4\indicators\Heiken_Ashi_Smoothed1lime.ex4' [2] 2016.04.01 00:00:10 cannot open file 'MQL4\indicators\Heiken_Ashi_Smoothed1lime.ex4' [2] 2016.04.01 00:00:10 cannot open file 'MQL4\indicators\MA in Color_wAppliedPrice.ex4' [2] 2016.04.01 00:00:10 cannot open file 'MQL4\indicators\MA in Color_wAppliedPrice.ex4' [2]
I am putting an EA (working) in the Market. MT4 platform. I can display a single file. A file of the Expert Advisor. It should pass the validity, but it cannot because it is an EA without indicators. They are in separate files. The Expert Advisor works with four indicators. They have to be somehow attached to the Expert Advisor. You have to specify the path, i.e., write them in the Expert Advisor. What? and Where? Please advise which form and how to do this.
From what I understand, we have to use the "Resources" . I do not know how to register it correctly in the Expert Advisor. Maybe you know some other solutions.
A new tick should assign the value of input parameterSlippage to the variableSlippage1,outputthe value ofSlippage1 in a comment and show"Parameters changed"in the log.
What it does not work with: WhenSlippage1!=Slippage, the"Parameters changed" option is not printed in the log.
A new tick should assign the value of input parameterSlippage to the variableSlippage1,outputthe value ofSlippage1 in a comment and show"Parameters changed"in the log.
What it does not work with: WhenSlippage1!=Slippage, the"Parameters changed" option is not printed in the log.
Question: What am I doing wrong?
If an input parameter is changed, then the Slippage1 variable is assigned the value of Slippag in OnInit.Accordingly, they cannot be unequal.
externint Slippage=29;
int Slippage1 = 0;
intOnInit()
{
//---//Slippage1=Slippage;//---return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| Expert deinitialization function |//+------------------------------------------------------------------+voidOnDeinit(constint reason)
{
//---
}
//+------------------------------------------------------------------+//| Expert tick function |//+------------------------------------------------------------------+voidOnTick()
{
if(Slippage1!=Slippage){Slippage1=Slippage; Print("Параметры изменены");}
//---Comment(Slippage1);
}
Hello, please help me with the error that occurs in the tester when I try to modify an order (transfer to Breakeven): I put the OrderOpenPrice() function instead of SL, but the tester shows error1 (according to the documentation it means that there is an attempt to passunchanged values as parameters to the function). I attach the code! Thank you in advance!
void DeleteOrderFunction2() //function that deletes the second pending order and saves the second order to Breakeven on a certain evening
{
bool flag = false;
if (FlagDeleteSecondOrder2 == true)
{
if(DayOfWeek() == DAYOFWEEK && //if a weekday is selected
Hour() == 22 //if evening
)
{
if(BuyCount() == 1 && if(there is an open Buy order
SellStopCount() == 1 //and there is a sell pending order
)
{
for( int i = 0; i < OrdersTotal(); i++) //create orders
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.
That's a nice touch. Removed from the code.
Stop is now twitching at every tick )))))
Add it.
Good evening again. Full gist of the question.
I am putting an EA (working) in the Market. MT4 platform. I can display a single file. A file of the Expert Advisor. It should pass the validity, but it cannot because it is an EA without indicators. They are in separate files. The Expert Advisor works with four indicators. They have to be somehow attached to the Expert Advisor. You have to specify the path, i.e., write them in the Expert Advisor. What? and Where? Please advise which form and how to do this.
From what I understand, we have to use the "Resources" . I do not know how to register it correctly in the Expert Advisor. Maybe you know some other solutions.
Thank you .
Here's what it says when validity fails
Good evening again. Full gist of the question.
I am putting an EA (working) in the Market. MT4 platform. I can display a single file. A file of the Expert Advisor. It should pass the validity, but it cannot because it is an EA without indicators. They are in separate files. The Expert Advisor works with four indicators. They have to be somehow attached to the Expert Advisor. You have to specify the path, i.e., write them in the Expert Advisor. What? and Where? Please advise which form and how to do this.
From what I understand, we have to use the "Resources" . I do not know how to register it correctly in the Expert Advisor. Maybe you know some other solutions.
Thank you .
Here is what it says if validity is not passed
I think it's sad that you have written an EA and cannot add indicators to it.
It's sad that you wrote an EA and can't add indicators to it to make it work.
Greetings.
A new tick should assign the value of input parameterSlippage to the variableSlippage1,outputthe value ofSlippage1 in a comment and show"Parameters changed"in the log.
What it does not work with: WhenSlippage1!=Slippage, the"Parameters changed" option is not printed in the log.
Question: What am I doing wrong?
Greetings.
A new tick should assign the value of input parameterSlippage to the variableSlippage1,outputthe value ofSlippage1 in a comment and show"Parameters changed"in the log.
What it does not work with: WhenSlippage1!=Slippage, the"Parameters changed" option is not printed in the log.
Question: What am I doing wrong?
If an input parameter is changed, then the Slippage1 variable is assigned the value of Slippag in OnInit.Accordingly, they cannot be unequal.
If the input parameter is changed, the Slippage1 variable is set to Slippag in OnInit.Accordingly, they cannot be unequal.
Yes, thank you. I just got it.
Hello, please help me with the error that occurs in the tester when I try to modify an order (transfer to Breakeven): I put the OrderOpenPrice() function instead of SL, but the tester shows error1 (according to the documentation it means that there is an attempt to passunchanged values as parameters to the function). I attach the code! Thank you in advance!
void DeleteOrderFunction2() //function that deletes the second pending order and saves the second order to Breakeven on a certain evening
{
bool flag = false;
if (FlagDeleteSecondOrder2 == true)
{
if(DayOfWeek() == DAYOFWEEK && //if a weekday is selected
Hour() == 22 //if evening
)
{
if(BuyCount() == 1 && if(there is an open Buy order
SellStopCount() == 1 //and there is a sell pending order
)
{
for( int i = 0; i < OrdersTotal(); i++) //create orders
{
OrderSelectX(i, SELECT_BY_POS, MODE_TRADES;)
switch(OrderType())
{
case OP_BUY: if(OrderProfit() > 0 &&
Bid > OrderOpenPrice()
)
{
OrderModifyX(OrderTicket(),OrderOpenPrice(),OrderTakeProfit(),0,Arrow_Color);
flag =true;
}
break;
case OP_SELLSTOP: if(flag==true)
{
OrderDeleteX(OrderTicket(), Arrow_Color);
}
break;
}
}
}
if(SellCount() == 1 && // if there is an open Sell order
BuyStopCount() == 1 //and there is a Buy pending order
)
{ Print("IS!!!!");
for( int i = 0; i < OrdersTotal(); i++) //create orders
{
OrderSelectX(i, SELECT_BY_POS, MODE_TRADES;)
switch(OrderType())
{
case OP_SELL: if (OrderProfit() > 0 &&
Ask < OrderOpenPrice()
)
{
OrderModifyX(OrderTicket(), OrderOpenPrice(),OrderTakeProfit(),0, Arrow_Color);
flag = true;Print("flag =", flag);
}
break;
case OP_BUYSTOP: if(flag == true)
{
Print("flag =", flag);
OrderDeleteX(OrderTicket(), Arrow_Color);
}
break;
}
}
}
}
}
}