laden Rakic: If you used indicator that you attached, save them without "_" in their names (replace "_" with " " - empty space) and it will work
Dear Mladen,
Some EAs do not react to optimization and produce no results (everything is done correctly)
What is the reason of this?
PS: Some EAs do not produce optimization results outside of a certain time interval. For example, some EAs produce results for up to 1 year, while 2-year optimization does not. I wonder why?
The all produce results, in your case all losers. Right click -> show useless results and rerun.
As you mentioned, but the results are not shown!
Sometimes some EAs produce results but do not give results when you repeat the same test a second time, although all the settings are the same! Absolutely interesting!
Hello everybody, actually I am using this EA to close at a profit level and deleting all Pending Orders placed left on Terminal.
It works perfectly but I would like to add this functions:
1) Delete Pending Orders True/False options,to activate or de-activate
and a
2)"Value of Total Orders" filter to Close at profit:
Condition: if total orders open are >= “value”
-----------------------> close (and delete)
if total orders open are < “value”
-----------------------> don't do anything
for Total Orders I mean: if only OP_SELL or only OP_BUY or (OP_SELL +
OP_BUY) are >= of “Value” still proceed to close ( and delete if activated) otherwise if < of
“Value” don't do anything.
ex. : 1 lot OP_BUY + 0.8 lot
OP_SELL + 2.5 lot OP_BUY = 3 orders --------> enable to close (and delete)
This is the code actually I am using.
externdouble My_Money_Profit_Target=100; //The amount of money profit at which you want to close ALL open trades.externstring Profit_Target= "Enter above To Close all OPEN trades when amount of profit is Reached in Account and not per OPEN trade! ";
int Slippage=5;
int i;
//+------------------------------------------------------------------+//| expert initialization function |//+------------------------------------------------------------------+int init()
{
//----//----return(0);
}
//+------------------------------------------------------------------+//| expert deinitialization function |//+------------------------------------------------------------------+int deinit()
{
//----//----return(0);
}
//+------------------------------------------------------------------+//| expert start function |//+------------------------------------------------------------------+int start()
{
if (AccountProfit()>= My_Money_Profit_Target)
{
for(i=OrdersTotal()-1;i>=0;i--)
{
OrderSelect(i, SELECT_BY_POS);
int type = OrderType();
bool result = false;
switch(type)
{
//Close opened long positionscaseOP_BUY : result = OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),Slippage,Blue);
break;
//Close opened short positionscaseOP_SELL : result = OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),Slippage,Red);
break;
//Close pending orderscaseOP_BUYLIMIT :
caseOP_BUYSTOP :
caseOP_SELLLIMIT :
caseOP_SELLSTOP : result = OrderDelete( OrderTicket() );
}
if(result == false)
{
Sleep(0);
}
}
Print ("Account Profit Reached. All Open Trades Have Been Closed");
return(0);
}
Comment("Balance: ",AccountBalance(),", Account Equity: ",AccountEquity(),", Account Profit: ",AccountProfit(),
"\nMy Account Profit Target: ",My_Money_Profit_Target);
return(0);
}
Dear friends, The attachment indicator does not work correctly or does not work on the latest version mt4. I am very happy if you are to solve the problem.
Dear friends, The attachment indicator does not work correctly or does not work on the latest version mt4. I am very happy if you are to solve the problem.
Best.
It works - change the step size from 0 to some other number - the "automatic" mode is messed up though
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.
If you used indicator that you attached, save them without "_" in their names (replace "_" with " " - empty space) and it will work
Dear Mladen,
Some EAs do not react to optimization and produce no results (everything is done correctly)
What is the reason of this?
PS:
Some EAs do not produce optimization results outside of a certain time interval.
For example, some EAs produce results for up to 1 year, while 2-year optimization does not. I wonder why?
The all produce results, in your case all losers. Right click -> show useless results and rerun.
The all produce results, in your case all losers. Right click -> show useless results and rerun.
As you mentioned, but the results are not shown!
Sometimes some EAs produce results but do not give results when you repeat the same test a second time, although all the settings are the same!
Absolutely interesting!
Add True/false option and Orders Total to EA
Hello everybody, actually I am using this EA to close at a profit level and deleting all Pending Orders placed left on Terminal.
It works perfectly but I would like to add this functions:
1) Delete Pending Orders True/False options,to activate or de-activate
and a
2)"Value of Total Orders" filter to Close at profit:
ex. : 1 lot OP_BUY + 0.8 lot OP_SELL + 2.5 lot OP_BUY = 3 orders --------> enable to close (and delete)
This is the code actually I am using.
Many many thanks for your precious time.
Greetings, LorenzoPlease use the </> button to insert your code.
Please use the </> button to insert your code.
Hello, post updated thanks :-)
Dear friends,
The attachment indicator does not work correctly or does not work on the latest version mt4.
I am very happy if you are to solve the problem.
Best.
Dear friends,
The attachment indicator does not work correctly or does not work on the latest version mt4.
I am very happy if you are to solve the problem.
Best.
It works - change the step size from 0 to some other number - the "automatic" mode is messed up though
Dear Mladen,
Sorry but I did not understand it clearly and that's why I have some questions.
1- Is "0" automatic mode?
(If "0" automatic mode does this mode work correctly or not?)
2- "0" is auto mode, but it works wrong! Therefore, we must write values greater than 0 here. (Is this argument correct?)