Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
For beerhunter and other users like mention in the version informations, I've not converting all functions from MQL2 because like SetIndexValue, GetIndexValue, ... I don't know how to convert them in MQL4 ???
If some one know the good MQL4 code for those functions, give me and I will implemente them in next version.
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.
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.
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:
Quote:
if (StopLoss > 0)) then
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.
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[i]-C[i]);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;
and mq4 code
PHP Code:
//+------------------------------------------------------------------+
//| 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();
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.
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.