I am also getting the error : Memory handler : cannot allocate 630892 bytes of memory ...
any idea how I can clear the memory my EA uses now and then and re-load it... I do have enough physical memory as I have 16GB gaming RAM in my pc and 40GB virtual RAM so I dont think Its realy the memory thats running out... any ideas, has anyone seen this before?
I think something like this will let you know if an order has just closed...
V
static int LastHistoryCount; if (LastHistoryCount!=OrdersHistoryTotal()) { Alert("Order Closed"); closet=iTime(NULL,0,0); } LastHistoryCount=OrdersHistoryTotal();Memory problems are above my pay grade though...
V
what is closet ? it is not defined ?
Thanks :)
Sorry, it's a code snippit from one of my EA's. it's a variable I define elsewhere. Just a datetime so I can track the how recently my last trade closed. I'm the opposite to you, if a trade closes, I want to make sure I don't re enter on the same bar.
hello,
I need assistance of some MQL programmer.. I have an indicator,.. can some one please help in creating the EA for that..
Your help will be highly appreciated
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
So can you please help me to somehow code my EA to know when the trade it entered has closed and has to reinitialise its parameters and set the total trades back to 0 ....
Thanks so much !
Code :
//+------------------------------------------------------------------+
//| Xlr8eSoft Probability Trader.mq4 |
//| Copyright © 2010, MetaQuotes Software Corp. |
//| https://www.metaquotes.net// |
//+------------------------------------------------------------------+
#property copyright "Xlr8er"
#property link "https://www.metaquotes.net//"
//| expert initialization function |
//+------------------------------------------------------------------+
extern int Open_Percentage = 80 ;
extern int Close_Percentage = 40 ;
extern int Take_Profit = 13 ;
extern int Stop_Loss = 15 ;
int PMI ;
string TI ;
int buy ;
int sell ;
extern int Max_Order_Count = 5;
extern double Slippage = 3;
extern int Magic_Number = 10810 ;
extern double Lots = 0.05 ;
int init()
{
//----
int Total = 0;
//----
return(0);
}
int start()
{
//-
iCustom(NULL, 0, "MEGATREND PROBABILITY METER II",13,7,0) ;
Print( GetLastError());
string Probability_Value = ObjectDescription("prop_value");
PMI = StrToDouble(StringSubstr(Probability_Value,0,StringLen(Probability_Value)-1));
TI = ObjectDescription("trend_comment_");
Print ("Succesful no 4.5");
buy = StringFind(TI,"LONG",0);
sell = StringFind(TI,"SHORT",0);
Print("BUYSELL",buy, sell);
Print(PMI,Probability_Value );
if(Total_Orders_EA > Total )
{
Print( GetLastError());
if(PMI > Open_Percentage && buy != -1)
{
}
if(Total_Orders_EA > Total)
{
{
Total ++ ;
}
//----
return(0);
}
//+------------------------------------------------------------------+