
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
With a little work you can convert mt2 int mt4 with yousky's tool, the attached was converted with his beta3 version, yousky is fixing a few bugs and will have beta4 out soon. But while you are waiting and you had some interesting ea's in mt3 ty using his tool to convert them.
GReat tool yousky thanks
None of the coverters works, I have tried them all. I get errors in the bottom window.
Fred,
you have to take the time to fix the errors, the converter does most of the work, but will leave in code that is not used. That code must be deleted, and there is some code in mt3 that is not referenced, that also must be deleted or changed, then your ea will work.
The converter does 95% of the work, you must do the rest.
Big thanks Foreverold
for your help
.
I have to say that somes EA are very bad coded, for exemple in "while" syntax, or "if" you can see some times one or 2 brakets that are not used for exemple:
Here you can see one open braket and 2 close bratkets, in MQL2 the compilator don't give any error, but in MQL4 theres errors.
So
Mql2Mq4 works an EA good coded for other you have to make manual changes.
I will improve my tool, so tell me what is not working and I hope correct them.
Thanks bye bye
hi yousky..
Many thanks for this great tool
I already converted dayimpuls mql for mq4, but I dont understand why it does not give the same value...
Take a look, please...
mql code
/*[[
Name := DayImpuls
Author := Copyright © 2005, HomeSoftware Corp.
Link := spiky@sinet.spb.ru
Notes := Èíäèêàòîð ïðåäíàçíà÷åí äëÿ îïðåäåëåíèÿ òåíäåíöèè ðûíêà çà ïîñëåäíèå 24 ÷àñà íà ãðàôèêàõ Ì15
Separate Window := Yes
First Color := Yellow
First Draw Type := Line
First Symbol := 217
Use Second Data := Yes
Second Color := Red
Second Draw Type := Line
Second Symbol := 218
]]*/
Input : per(14),d(100),porog(30);
Variables : shift(0),i(0),imp(0),mBar(0),trigger(0);
SetLoopCount(0);
// loop from first bar to current bar (with shift=0)
For shift=Bars-1 Downto 0 Begin SetIndexValue(shift,0);SetIndexValue2(shift,0); End; mBar=d*per;
for shift=mBar downto per Begin imp=0;
for i=shift downto shift-per Begin imp=imp+(O-C);end;
imp=round(imp/point);if imp==0 then imp=0.0001;
if imp!=0 then Begin imp=-imp;SetIndexValue(shift-per,imp);end;
if imp>0 then trigger=porog;if imp<0 then trigger=-porog;SetIndexValue2(shift-per,trigger);end;
[/PHP]
and mq4 code
[PHP]
//+------------------------------------------------------------------+
//| DayImpuls.mq4
//+------------------------------------------------------------------+
#property copyright ""
#property link ""
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Gold
//---- input parameters
extern int per=14;
extern int d=100;
extern int porog=30;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int shift,i;
double imp,mBar,trigger;
for(shift=Bars-1;shift>=0 ;shift--)
{
ExtMapBuffer1[shift]=0;
ExtMapBuffer2[shift]=0;
}
mBar=d*per;
for(shift=mBar;shift>=per ;shift--)
{
imp=0;
for(i=shift;i>=shift-per ;i--)
{
imp=imp+(Open-Close);
}
imp=MathRound(imp/Point);
if( imp == 0 ) imp=0.0001;
if( imp != 0 )
{ imp=-imp;
ExtMapBuffer1[shift-per]=imp;
}
if( imp>0 ) trigger=porog;if( imp<0 ) trigger=-porog;
ExtMapBuffer2[shift-per]=trigger;}
return(0);
}I think that it is all good but I dont understand this difference of values
many thx
Hi hellkas,
I've tried to convert your MQL2 code in MQ4, and I have the same value for the "per" variable. It was your problem no ?
You have post all the code of your DayImpuls ?
Hi hellkas,
I've tried to convert your MQL2 code in MQ4, and I have the same value for the "per" variable. It was your problem no ?
You have post all the code of your DayImpuls ?i put the "per" at same value (14)... And my code its all there..
Tke a look at this pictures please?
Hello hellkas,
So your problem is that you don't have the same result after convertion on MT3 and MT4 ? Can you post your MT3 version and I will test it afer converting.
Thanks
Hello hellkas,
So your problem is that you don't have the same result after convertion on MT3 and MT4 ? Can you post your MT3 version and I will test it afer converting.
Thanksyes, thats my problem...
Thank you..
Hi hellkas,
I would like to make the same test like you on MT4 and MT3 but I can't create demo account on MT3 :-( It seems that the server "server.fxservice.com" is not good :-( Can you tell me the good server please ?
thanks