Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
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.
See more

Reply
 
Thread Tools Display Modes
  #1351 (permalink)  
Old 10-10-2008, 12:05 PM
bluesky123's Avatar
Junior Member
 
Join Date: Oct 2008
Posts: 16
bluesky123 is on a distinguished road
Smile

Thanks!!!it'great!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1352 (permalink)  
Old 10-17-2008, 02:11 PM
increase's Avatar
Senior Member
 
Join Date: May 2006
Posts: 844
increase is on a distinguished road
Back to the drawing board
__________________
New to Forex? Get all you need for Free at my site Click Here
You can also get my Hot Forex System (scroll to the bottom of the page): Click Here

Last edited by increase; 10-17-2008 at 02:28 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1353 (permalink)  
Old 10-17-2008, 02:43 PM
Member
 
Join Date: Jul 2008
Posts: 42
yast77 is on a distinguished road
Smile Embeded custom indicator into expert advisor

Hi folks, anyone know how to add the custom indicator below into an expert advisor ? So that we no need use the icustom to call it from the file ?

Code:
//+------------------------------------------------------------------+ 
//| ARSI.mq4 
//+------------------------------------------------------------------+ 
#property copyright "Alexander Kirilyuk M." 
#property link "" 

#property indicator_separate_window
//#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 DodgerBlue

extern int ARSIPeriod = 14;

//---- buffers 
double ARSI[]; 

int init()
{ 
	string short_name = "ARSI (" + ARSIPeriod + ")";

	SetIndexStyle(0,DRAW_LINE); 
	SetIndexBuffer(0,ARSI); 
	//SetIndexDrawBegin(0,ARSIPeriod);

	return(0); 
} 

int start() 
{ 
	int i, counted_bars = IndicatorCounted(); 
	int limit;

	if(Bars <= ARSIPeriod) 
		return(0);

	if(counted_bars < 0)
	{
		return;
	}
	
	if(counted_bars == 0)
	{
		limit = Bars;
	}
	if(counted_bars > 0)
	{
		limit = Bars - counted_bars;
	}
	
	double sc;
	for(i = limit; i >= 0; i--)
	{
		sc = MathAbs(iRSI(NULL, 0, ARSIPeriod, PRICE_CLOSE, i)/100.0 - 0.5) * 2.0;

		if( Bars - i <= ARSIPeriod)
			ARSI[i] = Close[i];
		else		
			ARSI[i] = ARSI[i+1] + sc * (Close[i] - ARSI[i+1]);
	}
Print ("Try2 : " , ARSI[0], ":", ARSI[1]);

	return(0); 
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1354 (permalink)  
Old 10-18-2008, 03:52 AM
Senior Member
 
Join Date: Feb 2007
Posts: 986
FerruFx is on a distinguished road
Quote:
Originally Posted by yast77 View Post
Hi folks, anyone know how to add the custom indicator below into an expert advisor ? So that we no need use the icustom to call it from the file ?

Code:
//+------------------------------------------------------------------+ 
//| ARSI.mq4 
//+------------------------------------------------------------------+ 
#property copyright "Alexander Kirilyuk M." 
#property link "" 

#property indicator_separate_window
//#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 DodgerBlue

extern int ARSIPeriod = 14;

//---- buffers 
double ARSI[]; 

int init()
{ 
	string short_name = "ARSI (" + ARSIPeriod + ")";

	SetIndexStyle(0,DRAW_LINE); 
	SetIndexBuffer(0,ARSI); 
	//SetIndexDrawBegin(0,ARSIPeriod);

	return(0); 
} 

int start() 
{ 
	int i, counted_bars = IndicatorCounted(); 
	int limit;

	if(Bars <= ARSIPeriod) 
		return(0);

	if(counted_bars < 0)
	{
		return;
	}
	
	if(counted_bars == 0)
	{
		limit = Bars;
	}
	if(counted_bars > 0)
	{
		limit = Bars - counted_bars;
	}
	
	double sc;
	for(i = limit; i >= 0; i--)
	{
		sc = MathAbs(iRSI(NULL, 0, ARSIPeriod, PRICE_CLOSE, i)/100.0 - 0.5) * 2.0;

		if( Bars - i <= ARSIPeriod)
			ARSI[i] = Close[i];
		else		
			ARSI[i] = ARSI[i+1] + sc * (Close[i] - ARSI[i+1]);
	}
Print ("Try2 : " , ARSI[0], ":", ARSI[1]);

	return(0); 
}
You must use the iCustom function in your EA to call this indicator:

iCustom(Symbol(),0,"ARSI",ARSIPeriod,0,0);

The number in red is the bar you want to look at. Change it as you need.

FerruFx
__________________
FerruFx / www.ervent.net - Professional Coding Services (EAs/Indicators/Alerts)

BBVPS.com - Reliable Windows VPS For MT4 Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1355 (permalink)  
Old 10-18-2008, 03:05 PM
Member
 
Join Date: Jul 2008
Posts: 42
yast77 is on a distinguished road
Quote:
Originally Posted by FerruFx View Post
You must use the iCustom function in your EA to call this indicator:

iCustom(Symbol(),0,"ARSI",ARSIPeriod,0,0);

The number in red is the bar you want to look at. Change it as you need.

FerruFx
Thanks for your reply. Ya, i know that we can use the icustom function, but as i know, we can embed the indicator function by input the coding from the indicator, the following website Indicators embedding in Expert Advisors (iCustom alternative) | www.metatrader.info that explained by codersguru describe about that, but for the ARSI indicator, i not sure how to embed it into an expert advisor. Thanks for any recommendation !!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1356 (permalink)  
Old 10-18-2008, 07:28 PM
marcelcorzo's Avatar
Senior Member
 
Join Date: Oct 2007
Location: Colombia
Posts: 238
marcelcorzo is on a distinguished road
improvement of 10points3

Hi everyone.
We are trying to improve 10points3. We need to change the code to close last third trade. Please refer to the last posts here:
10points 3.mq4.
We are getting good results here.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1357 (permalink)  
Old 10-18-2008, 08:13 PM
FXX FXX is offline
Junior Member
 
Join Date: Oct 2008
Posts: 2
FXX is on a distinguished road
suspend order

Hello folks,

with respect to programming in MQL4 I'm a real newbie, but I'm learning every day. Currently I'm trying the following:

in the main loop of my EA, when certain conditions are met, an order is opened. This order is with a given entry, stoploss and takeprofit using the OrderSend function.

Only one order at the time is allowed:
total = OrdersTotal();
if(total < 1)
{ etc etc

What I'd like to build is that when the order's stoploss or takeprofit is hit, the EA waits with taking new orders until the current hourly bar (the bar within the stoploss or takeprofit is hit) finishes.

The problem at the moment is that as soon as the stoploss or takeprofit is hit, immediately another order is taken in the main loop.

Can you guys please help me out ?
FXX
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1358 (permalink)  
Old 10-19-2008, 10:27 AM
Banned
 
Join Date: Oct 2008
Posts: 103
Bill FX is on a distinguished road
Combine EA need help

Hi all,

Any one know how to combine 2 difference EA in 1 EA ? Please show me step by step how to do this ?

Thanks in advance for your help !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1359 (permalink)  
Old 10-20-2008, 03:16 AM
primajaya's Avatar
Senior Member
 
Join Date: Aug 2006
Posts: 213
primajaya is on a distinguished road
Depends on The EA's Logic

Each EA has different logic, so the method to combine two ea's depends on their logic..

So Where's the ea's you would like to combine?

Quote:
Originally Posted by Bill FX View Post
Hi all,

Any one know how to combine 2 difference EA in 1 EA ? Please show me step by step how to do this ?

Thanks in advance for your help !
__________________
You said "why?".. I said "why not?!"
Broker for 5$ Free
Trading system 4free
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #1360 (permalink)  
Old 10-20-2008, 03:42 AM
primajaya's Avatar
Senior Member
 
Join Date: Aug 2006
Posts: 213
primajaya is on a distinguished road
How To Rank Values ? Need Helps

Anybody can help me how to create rank function

for example I have some double value like theese:
a=3.0; b=4.0; c=5.0; d=2.0; e=1.0; f=6.0; g=0.0;

from higher to lower value (6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0)
or the value of (f,c,b,a,d,e,g)

So the rank's should be like this
rank number: (th)
f=1 ; c=2; b=3; a=4; d=5; e=6; g=7;

What I need is a function than return the rank if I input the value

int rank (double value)
{
process all value's;


return (the rank of a value from all value's)
}


I know it is easy if we just make a function like this

for example value of "a"
int rank (double value)
{
if(a>b && a>c && a>d && a>e && a>f && a>g)
return (1);
.
.
.

if(a<b && a<c && a<d && a<e && a<f && a<g)
return(7);
}

The Problem is when the variations of value are 2 the combination only a few, but when the variations increase for example 5,7 or 10 etc so the combination to make the rank will very very a lot..

Hope somebody can help me for this kind of problem..

Thank's berfore, Sorry for my poor english, but I'm learning..
Pj..
__________________
You said "why?".. I said "why not?!"
Broker for 5$ Free
Trading system 4free
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
forex, histogram, JMASlope, ToR 1.20, ZUP_v1.mq4


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT. The time now is 03:28 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.