Ask! - page 28

 

hii

I need Williams %R filter can anybody help me

 

What factors you should watch on an Backtest Report?

When you run an EA thru Backtesting, what are the key factors which determines the effectiveness of the EA code?

Is it Modelling quality, or % of wins and or Drawdown? And if you run for a period of one year, what would be the best/ideal results for an EA to be considered as a good one? Ofcourse this is only Backtesting. I do understand the forward testing is important too. But I just want to know the factors which affect quality of EA.

Thanks in advance for your replies/time.

Kent

 

point

could someone tell me what point is in the meta trader code?

thanx

 

Hello,

I would like please Kalenzo or another good programmer to help me with this modification please.

My level of knowledge of mql language is basic because I'm just beginning to learn and I need to add a sound alert and popup to an indicator and I still don't find the correct code to do so.

The indicator that I want to modify is the i_trend.mq4, I need to add a sound alert and popup so as when the red line touches the level 0.0002 it shows a SHORT alert and when the green line touches the level 0.0002 it shows a BUY alert. I would need it to send the alerts only when the lines go UPWARDS because if they touch that level when going down it wouldn't be useful.

I took as an example the code of another indicator that shows sound alerts and popup but I can't make this same thing for the i_trend, the sample indicator is the "PerkyAsctrend1.mq4" I an enclosing both indicators to this post as a reference.

I will be very grateful to whoever helps me to add those modifications, thank you very much in advance.

The section of the code in the PerkyAsctrend where the "alert" is written is the following:

if (val2!=0 && up==0 )

{

val1buffer= val2-1*Point;

up=1;

dn=0;

if(shift<=2)

{

Alert (Symbol()," ",Period(),"M Asctrend BUY ");

}

}

if (val1 !=0 && dn==0)

{

val2buffer= val1+1*Point;

dn=1;

up=0;

if(shift<=2)

{

Alert (Symbol()," ",Period(),"M Asctrend SELL ");

}

}

How can I implement this same thing for the i_trend? with the conditions that I specified above.

Thanks again!

Files:
 

Basic Programing

Hello,

I have read through you tutorials and see that you have spent a lot of time and effort into creating them!! But as I am just learning and new to programming I got lost very early on. I am looking into some basic programming classes at a local technical school...I am just wondering if MQL4 is written on the base of another programming language? Or better yet if I had to learn one of the really common programming languages that would make MQL4 easiest, which would it be?

Thank You!!

 

Refreshing indicator info

Is there any way to have indicator data refresh quicker, sometimes the "Comments" and "separate data windows" take quite some time to update and you have to refresh the chart to get the latest data or is this more an issue with computer setups ? I ask this because a friends laptop seems to update data quicker than my computer.

can "RefreshRates" be used maybe ?

Any help would be greatly appreciated.

I have just found out that it is critical where the Data window code is put - I have now placed the Data code in the right place in the indicator code and it updates fine now. at least that has fixed a problem I was having with two indicators, any other input or ideas would be welcome.

 

EA problem

I created a simple EA by change MACD Sample EA that is placed at MT4 platform.

The created EA I put in 6 folders and changed the names of that folders.

In every EA in each folder I put the different magic number. I attached

that 6 EAs on the 6 pairs.The problem is that each EA works alone and when

one EA opens any order another EAs can't work in the same time.

Maybe MACD Sample EA has some code that prevents this operation.

 

Doubletop Checking Coding

In my EA, I wish to check to make sure that the current currency price is above the last 10 bars High before I enter a buy trade.How would I test for this in a MQ4 statement? Thanks in Advance!!

Dave <<<
 
I am just wondering if MQL4 is written on the base of another programming language? Or better yet if I had to learn one of the really common programming languages that would make MQL4 easiest, which would it be?

MQL4 is based on the C language, so its best to learn C before programming with it.

 
iscuba11:
I have a problem with it always modifing the trades in the backtester over and over. How do I get it to modify the trades once. Since the program is going to sleep, the only trades that need to be modified are any trades still open.

Please see attached .Gif of Backtest results. I am so close to getting this right - Please advise!! I use this Take Profit and Stop Loss modification in conjunction with the sleep mode. Please see code below

int start()

{

if (UseHourTrade)

{

int a=0;

int b=0;

int c=0;

if(!(Hour()>=FromHourTrade1 && Hour()<=ToHourTrade1)) a=1;

if(!(Hour()>=FromHourTrade2 && Hour()<=ToHourTrade2)) b=1;

if(!(Hour()>=FromHourTrade3 && Hour()<=ToHourTrade3)) c=1;

if(a==1 && b==1 && c==1)

{

Comment(

"\n"," * SOLAR WIND EXPERT ADVISOR *",

"\n",

"\n", " - PROGRAM IN SLEEP CYCLE - ",

"\n",

"\n"," > NON-TRADING HOURS! <");

///////////////////MODIFY STOP LOSS & TAKE PROFIT AT START OF SLEEP CYCLE /////////////////

int h=0;

for (int cnt1=OrdersTotal()-1;cnt1>=0;cnt1--)

OrderSelect(h, SELECT_BY_POS, MODE_TRADES);

if (OrderType()>=OP_SELL && OrderSymbol()==Symbol() && (OrderMagicNumber () == MagicNumber || MagicNumber==0))

{

OrderModify(OrderTicket(),OrderOpenPrice(),Ask+(15 *Point),Bid-(20*Point),Cyan); //Modify stop loss and take profit

return(0);

}

if (OrderType()>=OP_BUY && OrderSymbol()==Symbol() && (OrderMagicNumber () == MagicNumber || MagicNumber==0))

{

OrderModify(OrderTicket(),OrderOpenPrice(),Bid-(15*Point),Ask+(20*Point),Cyan); //Modify stop loss and take profit

return(0);

}

return(0);

}

}

Dave <<<

your OrderSelect() did not count base on the running loop

Reason: