Mrtools thank you!mrtools wrote: ↑Tue Jan 05, 2021 7:44 amTry this dll file in your libraries folder.milad1987 wrote: ↑Tue Dec 29, 2020 6:47 amhello mrtools and everyone...
is there any way to fix this ERROR in my terminal MT5.... i coding one dynamic indicator for MT5 but now i have this ERROR : about dynamiczone.dll
2020.12.27 01:20:07.548 dz 'C:\Users\Milad\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Libraries\dynamicZone.dll' is not 64-bit version
2020.12.27 01:20:09.978 dz (EURUSD,M1) Cannot load 'C:\Users\Milad\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Libraries\dynamicZone.dll' [193]
Re: Coding Help
#1202mrtoolsmrtools wrote: ↑Tue Jan 05, 2021 8:01 amTry.traderduke wrote: ↑Tue Jan 05, 2021 5:33 amMrTools
I can’t seem to get the maxbars to work on the XU-semafor but I did get it to work on the chaos semafor, can you help me out?
The XU eats up a lot of cpu.
Thank you again
Ray
XU-SEMAFOR-orig.mq4
Chaos Semafor - 3.4_Mod-3lv-mxb.mq4
Thanks a lot, it works great
Ray
Re: Coding Help
#1203Hi
I have a script from back in 2015, now it is not working and I can see some errors while compiling, but have no idea how to fix them.
if anyone would help me id be greatful.
Thanks
I have a script from back in 2015, now it is not working and I can see some errors while compiling, but have no idea how to fix them.
if anyone would help me id be greatful.
Thanks
Code: Select all
#property copyright "Copyright © 2011, sangmane."
#property link "sangmane@forexfactory.com"
#import "EasyOrder.dll"
int EasyOrder(int hwnd);
string obj;
int i, ticket;
int start()
{
int hwnd = WindowHandle(Symbol(),0);
if(hwnd==0) {
Alert("Error!");
return;
}
int ret = EasyOrder(hwnd);
Print("Return value: ",ret);
if(ret<0) {
Alert("Dll function failed!");
return;
}
if(ret==1) ModifyOrder();
else {
for(i=ObjectsTotal()-1; i>=0; i--) {
obj = ObjectName(i);
if(StringFind(obj,"EASYORDER",0)>=0) ObjectDelete(obj);
}
}
InitLines();
return (0);
}
//+------------------------------------------------------------------+
void InitLines()
{
//Delete old lines
bool delete;
int pos;
int ticket;
for(i=ObjectsTotal()-1; i>=0; i--) {
obj = ObjectName(i);
if(StringFind(obj,"EASYORDER_MOD")>=0) {
delete = True;
pos = StringFind(obj,"#",1);
if(pos<0) continue;
ticket = StrToDouble(StringSubstr(obj,pos+1,StringLen(obj)-pos-1));
if(OrderSelect(ticket,SELECT_BY_TICKET)) {
if(OrderCloseTime()==0) delete = false;
}
if(delete) ObjectDelete(obj);
}
}
double sl, tp;
for(i=0; i<OrdersTotal(); i++) {
OrderSelect(i,SELECT_BY_POS);
if(OrderSymbol()==Symbol()) {
ticket = OrderTicket();
obj = "EASYORDER_MOD_SL_#"+ticket;
sl = OrderStopLoss();
tp = OrderTakeProfit();
if(sl==0) sl = OrderOpenPrice();
if(tp==0) tp = OrderOpenPrice();
if(ObjectFind(obj)>=0) ObjectMove(obj,0,Time[0],sl);
else DrawLine("SL",ticket,sl);
obj = "EASYORDER_MOD_TP_#"+ticket;
if(ObjectFind(obj)>=0) ObjectMove(obj,0,Time[0],tp);
else DrawLine("TP",ticket,tp);
if(OrderType()>OP_SELL) {
obj = "EASYORDER_MOD_PRICE_#"+ticket;
if(ObjectFind(obj)>=0) ObjectMove(obj,0,Time[0],OrderOpenPrice());
else DrawLine("PRICE",ticket,OrderOpenPrice());
}
}
}
}
void ModifyOrder()
{
string obj;
int i, ticket;
double sl, price, tp;
double osl, otp;
for(i=0; i<OrdersTotal(); i++) {
OrderSelect(i,SELECT_BY_POS);
if(OrderSymbol()==Symbol()) {
ticket = OrderTicket();
sl = 0; price = 0; tp = 0;
obj = "EASYORDER_MOD_SL_#"+ticket;
osl = OrderStopLoss();
if(osl==0) osl = OrderOpenPrice();
otp = OrderStopLoss();
if(otp==0) otp = OrderOpenPrice();
if(ObjectFind(obj)>=0) {
if(MathAbs(ObjectGet(obj,OBJPROP_PRICE1)-osl)>Point) sl = ObjectGet(obj,OBJPROP_PRICE1);
}
obj = "EASYORDER_MOD_TP_#"+ticket;
if(ObjectFind(obj)>=0) {
if(MathAbs(ObjectGet(obj,OBJPROP_PRICE1)-otp)>Point) tp = ObjectGet(obj,OBJPROP_PRICE1);
}
if(OrderType()>OP_SELL) {
obj = "EASYORDER_MOD_PRICE_#"+ticket;
if(ObjectFind(obj)>=0) {
if(MathAbs(ObjectGet(obj,OBJPROP_PRICE1)-OrderOpenPrice())>Point) price = ObjectGet(obj,OBJPROP_PRICE1);
}
}
if(sl+tp+price>0) {
if(sl==0) sl = OrderStopLoss();
if(tp==0) tp = OrderTakeProfit();
if(price==0) price = OrderOpenPrice();
OrderModify(ticket,price,sl,tp,0,CLR_NONE);
}
}
}
}
void DrawLine(string type, int ticket, double level)
{
string obj = "EASYORDER_MOD_"+type+"_#"+ticket;
color clr = Red;
if(type=="PRICE") clr = LimeGreen;
//else if(type=="TP") clr = Blue;
ObjectCreate(obj,OBJ_HLINE,0,Time[0],level,0,0);
ObjectSet(obj,OBJPROP_COLOR,clr);
ObjectSet(obj,OBJPROP_STYLE,STYLE_DASHDOT);
}
-
- EasyOrder.mq4
- (3.39 KiB) Downloaded 60 times
Re: Coding Help
#1204Hello Mr.Tools and other coders. Happy and prosperous new year to you all and all traders in the house. Please i have this indicator that does not update its signal unless i click on indicator list, and bring it out, click ok, before the arrows can show up, i believe there could be some errors that is not allowing auto update, for the arrows to pop up at the appropriate time. Kindly help me to check the indicator and correct whatever error that is hindering the arrows to come up on chart on all time frame. Thanking you in advance for your precious time.
-
- #Momentum onChartSignals Indicator v1.0.mq4
- (6.92 KiB) Downloaded 76 times
Re: Coding Help
#1205Removed all the errors but not sure i did you any good.Maffe wrote: ↑Tue Jan 12, 2021 4:31 amHi
I have a script from back in 2015, now it is not working and I can see some errors while compiling, but have no idea how to fix them.
if anyone would help me id be greatful.
Thanks
Code: Select all
#property copyright "Copyright © 2011, sangmane." #property link "sangmane@forexfactory.com" #import "EasyOrder.dll" int EasyOrder(int hwnd); string obj; int i, ticket; int start() { int hwnd = WindowHandle(Symbol(),0); if(hwnd==0) { Alert("Error!"); return; } int ret = EasyOrder(hwnd); Print("Return value: ",ret); if(ret<0) { Alert("Dll function failed!"); return; } if(ret==1) ModifyOrder(); else { for(i=ObjectsTotal()-1; i>=0; i--) { obj = ObjectName(i); if(StringFind(obj,"EASYORDER",0)>=0) ObjectDelete(obj); } } InitLines(); return (0); } //+------------------------------------------------------------------+ void InitLines() { //Delete old lines bool delete; int pos; int ticket; for(i=ObjectsTotal()-1; i>=0; i--) { obj = ObjectName(i); if(StringFind(obj,"EASYORDER_MOD")>=0) { delete = True; pos = StringFind(obj,"#",1); if(pos<0) continue; ticket = StrToDouble(StringSubstr(obj,pos+1,StringLen(obj)-pos-1)); if(OrderSelect(ticket,SELECT_BY_TICKET)) { if(OrderCloseTime()==0) delete = false; } if(delete) ObjectDelete(obj); } } double sl, tp; for(i=0; i<OrdersTotal(); i++) { OrderSelect(i,SELECT_BY_POS); if(OrderSymbol()==Symbol()) { ticket = OrderTicket(); obj = "EASYORDER_MOD_SL_#"+ticket; sl = OrderStopLoss(); tp = OrderTakeProfit(); if(sl==0) sl = OrderOpenPrice(); if(tp==0) tp = OrderOpenPrice(); if(ObjectFind(obj)>=0) ObjectMove(obj,0,Time[0],sl); else DrawLine("SL",ticket,sl); obj = "EASYORDER_MOD_TP_#"+ticket; if(ObjectFind(obj)>=0) ObjectMove(obj,0,Time[0],tp); else DrawLine("TP",ticket,tp); if(OrderType()>OP_SELL) { obj = "EASYORDER_MOD_PRICE_#"+ticket; if(ObjectFind(obj)>=0) ObjectMove(obj,0,Time[0],OrderOpenPrice()); else DrawLine("PRICE",ticket,OrderOpenPrice()); } } } } void ModifyOrder() { string obj; int i, ticket; double sl, price, tp; double osl, otp; for(i=0; i<OrdersTotal(); i++) { OrderSelect(i,SELECT_BY_POS); if(OrderSymbol()==Symbol()) { ticket = OrderTicket(); sl = 0; price = 0; tp = 0; obj = "EASYORDER_MOD_SL_#"+ticket; osl = OrderStopLoss(); if(osl==0) osl = OrderOpenPrice(); otp = OrderStopLoss(); if(otp==0) otp = OrderOpenPrice(); if(ObjectFind(obj)>=0) { if(MathAbs(ObjectGet(obj,OBJPROP_PRICE1)-osl)>Point) sl = ObjectGet(obj,OBJPROP_PRICE1); } obj = "EASYORDER_MOD_TP_#"+ticket; if(ObjectFind(obj)>=0) { if(MathAbs(ObjectGet(obj,OBJPROP_PRICE1)-otp)>Point) tp = ObjectGet(obj,OBJPROP_PRICE1); } if(OrderType()>OP_SELL) { obj = "EASYORDER_MOD_PRICE_#"+ticket; if(ObjectFind(obj)>=0) { if(MathAbs(ObjectGet(obj,OBJPROP_PRICE1)-OrderOpenPrice())>Point) price = ObjectGet(obj,OBJPROP_PRICE1); } } if(sl+tp+price>0) { if(sl==0) sl = OrderStopLoss(); if(tp==0) tp = OrderTakeProfit(); if(price==0) price = OrderOpenPrice(); OrderModify(ticket,price,sl,tp,0,CLR_NONE); } } } } void DrawLine(string type, int ticket, double level) { string obj = "EASYORDER_MOD_"+type+"_#"+ticket; color clr = Red; if(type=="PRICE") clr = LimeGreen; //else if(type=="TP") clr = Blue; ObjectCreate(obj,OBJ_HLINE,0,Time[0],level,0,0); ObjectSet(obj,OBJPROP_COLOR,clr); ObjectSet(obj,OBJPROP_STYLE,STYLE_DASHDOT); }
Re: Coding Help
#1206Looks to me it repaints and possibly need a complete recoding to make it work correctly.Modahen77 wrote: ↑Thu Jan 14, 2021 6:48 amHello Mr.Tools and other coders. Happy and prosperous new year to you all and all traders in the house. Please i have this indicator that does not update its signal unless i click on indicator list, and bring it out, click ok, before the arrows can show up, i believe there could be some errors that is not allowing auto update, for the arrows to pop up at the appropriate time. Kindly help me to check the indicator and correct whatever error that is hindering the arrows to come up on chart on all time frame. Thanking you in advance for your precious time.
Re: Coding Help
#1207Thank you a million timesmrtools wrote: ↑Thu Jan 14, 2021 2:56 pmRemoved all the errors but not sure i did you any good.Maffe wrote: ↑Tue Jan 12, 2021 4:31 amHi
I have a script from back in 2015, now it is not working and I can see some errors while compiling, but have no idea how to fix them.
if anyone would help me id be greatful.
Thanks
Code: Select all
#property copyright "Copyright © 2011, sangmane." #property link "sangmane@forexfactory.com" #import "EasyOrder.dll" int EasyOrder(int hwnd); string obj; int i, ticket; int start() { int hwnd = WindowHandle(Symbol(),0); if(hwnd==0) { Alert("Error!"); return; } int ret = EasyOrder(hwnd); Print("Return value: ",ret); if(ret<0) { Alert("Dll function failed!"); return; } if(ret==1) ModifyOrder(); else { for(i=ObjectsTotal()-1; i>=0; i--) { obj = ObjectName(i); if(StringFind(obj,"EASYORDER",0)>=0) ObjectDelete(obj); } } InitLines(); return (0); } //+------------------------------------------------------------------+ void InitLines() { //Delete old lines bool delete; int pos; int ticket; for(i=ObjectsTotal()-1; i>=0; i--) { obj = ObjectName(i); if(StringFind(obj,"EASYORDER_MOD")>=0) { delete = True; pos = StringFind(obj,"#",1); if(pos<0) continue; ticket = StrToDouble(StringSubstr(obj,pos+1,StringLen(obj)-pos-1)); if(OrderSelect(ticket,SELECT_BY_TICKET)) { if(OrderCloseTime()==0) delete = false; } if(delete) ObjectDelete(obj); } } double sl, tp; for(i=0; i<OrdersTotal(); i++) { OrderSelect(i,SELECT_BY_POS); if(OrderSymbol()==Symbol()) { ticket = OrderTicket(); obj = "EASYORDER_MOD_SL_#"+ticket; sl = OrderStopLoss(); tp = OrderTakeProfit(); if(sl==0) sl = OrderOpenPrice(); if(tp==0) tp = OrderOpenPrice(); if(ObjectFind(obj)>=0) ObjectMove(obj,0,Time[0],sl); else DrawLine("SL",ticket,sl); obj = "EASYORDER_MOD_TP_#"+ticket; if(ObjectFind(obj)>=0) ObjectMove(obj,0,Time[0],tp); else DrawLine("TP",ticket,tp); if(OrderType()>OP_SELL) { obj = "EASYORDER_MOD_PRICE_#"+ticket; if(ObjectFind(obj)>=0) ObjectMove(obj,0,Time[0],OrderOpenPrice()); else DrawLine("PRICE",ticket,OrderOpenPrice()); } } } } void ModifyOrder() { string obj; int i, ticket; double sl, price, tp; double osl, otp; for(i=0; i<OrdersTotal(); i++) { OrderSelect(i,SELECT_BY_POS); if(OrderSymbol()==Symbol()) { ticket = OrderTicket(); sl = 0; price = 0; tp = 0; obj = "EASYORDER_MOD_SL_#"+ticket; osl = OrderStopLoss(); if(osl==0) osl = OrderOpenPrice(); otp = OrderStopLoss(); if(otp==0) otp = OrderOpenPrice(); if(ObjectFind(obj)>=0) { if(MathAbs(ObjectGet(obj,OBJPROP_PRICE1)-osl)>Point) sl = ObjectGet(obj,OBJPROP_PRICE1); } obj = "EASYORDER_MOD_TP_#"+ticket; if(ObjectFind(obj)>=0) { if(MathAbs(ObjectGet(obj,OBJPROP_PRICE1)-otp)>Point) tp = ObjectGet(obj,OBJPROP_PRICE1); } if(OrderType()>OP_SELL) { obj = "EASYORDER_MOD_PRICE_#"+ticket; if(ObjectFind(obj)>=0) { if(MathAbs(ObjectGet(obj,OBJPROP_PRICE1)-OrderOpenPrice())>Point) price = ObjectGet(obj,OBJPROP_PRICE1); } } if(sl+tp+price>0) { if(sl==0) sl = OrderStopLoss(); if(tp==0) tp = OrderTakeProfit(); if(price==0) price = OrderOpenPrice(); OrderModify(ticket,price,sl,tp,0,CLR_NONE); } } } } void DrawLine(string type, int ticket, double level) { string obj = "EASYORDER_MOD_"+type+"_#"+ticket; color clr = Red; if(type=="PRICE") clr = LimeGreen; //else if(type=="TP") clr = Blue; ObjectCreate(obj,OBJ_HLINE,0,Time[0],level,0,0); ObjectSet(obj,OBJPROP_COLOR,clr); ObjectSet(obj,OBJPROP_STYLE,STYLE_DASHDOT); }

Re: Coding Help
#1209I may have accidentally posted the old code, try this one.
-
- Easy Order.mq4
- (6.94 KiB) Downloaded 73 times
-
Similar Topics
-
1 Replies
373 Views -
0 Replies
492 Views
-