Forex
Google
New signals service!

Go Back   Forex Trading > Programming > Metatrader Programming


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack (1) Thread Tools Display Modes
  #1021 (permalink)  
Old 06-12-2008, 05:01 AM
Administrator
 
Join Date: Sep 2005
Posts: 16,311
Blog Entries: 106
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Just moved your post to this thread.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1022 (permalink)  
Old 06-12-2008, 06:58 AM
Junior Member
 
Join Date: May 2008
Posts: 7
areon25 is on a distinguished road
Hi all..

thanks newdigital for your advise..

Last edited by areon25; 06-12-2008 at 07:16 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1023 (permalink)  
Old 06-14-2008, 07:45 PM
Kelbrosi's Avatar
Junior Member
 
Join Date: Mar 2008
Posts: 11
Kelbrosi is on a distinguished road
Need an EA

Hai , need your help plz

any body can create a simple EA based on the features below:

- allow scalping
- Scalping value
- set TP
- Set SL
- can disable entry for sell & buy ( i prefer to enter manually )
- can be used in recommended on tf30 and tf H1

Basically here i want to use it for scalping, but prefer to enter manually,, what i want is, it will closed the position once it reach the amount that i been set in input.

Ive tried to use the misakas,, but it keep open the position that i dont to enter, coz it is too risky.. ( for me )

If anybody could help me with this. you Can PM me if u want. Thank you in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1024 (permalink)  
Old 06-16-2008, 05:30 AM
Junior Member
 
Join Date: Jul 2007
Posts: 6
supermagix is on a distinguished road
Help : Scanner

Hi all,

who helps me?
I have a question: I have created this scanner that plays at the end of the formation doji, but it also plays the same alarm in the following candle.
Who tells me where it is wrong?
I would want that it played an only time at the end of the doji and enough, without repeating.
I thank who helps me.

Antonio (Italy)


#property indicator_separate_window
string ver="SCANNER DOJI ";

//---- input parameters
extern bool UseAlert = 1;//*****


// -----------DICHIARAZIONE VARIABILI GENERICHE--------------------------
double alertBar;//*****
bool alertdoji=False;
bool flgrs;

string nome_fin; //nome finestra
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
nome_fin=StringConcatenate(" (",ver,")");
IndicatorShortName(nome_fin);//nome separate window
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{

return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//###################################
// ----------------------------
if (
Close[1] == Open[1]&& //DOJI
flgrs==0)
{
alertdoji = 1;
flgrs=1;
}
else
{
flgrs=0;
}
//*****************ALERT****************
if (UseAlert==1 && Bars>alertBar && alertdoji==1)
{
Alert(Symbol(), " DOJI " );
alertBar=Bars;
alertdoji=0;
}
return(0);
}
//+------------------------------------------------------------------+

Last edited by newdigital; 06-16-2008 at 05:40 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1025 (permalink)  
Old 06-16-2008, 02:59 PM
Junior Member
 
Join Date: Dec 2005
Posts: 11
graemenash is on a distinguished road
MathCos

Hi,

I am currently coding up in indicator which uses the MathCos function in MQL.

The problem is that it seems to be returning an incorrect value.

For example,
PHP Code:
MathCos(10); 
returns a value of -0.8391, while the TradeStation COSINE function, and the web-based cosine calculator at Basic Maths Functions both return a value of 0.9848.

Is this a known bug? My indicator can't be written unless this function works correctly so I hope there is a solution!

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1026 (permalink)  
Old 06-16-2008, 04:09 PM
mladen's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 304
mladen is on a distinguished road
...

Metatrader takes arguments for trigonometric functions in radians
You should do something like this :
PHP Code:
#define Pi 3.141592653589793238462643
   
   
MathCos(10.00*Pi/180.00); 
Quote:
Originally Posted by graemenash View Post
Hi,

I am currently coding up in indicator which uses the MathCos function in MQL.

The problem is that it seems to be returning an incorrect value.

For example,
PHP Code:
MathCos(10); 
returns a value of -0.8391, while the TradeStation COSINE function, and the web-based cosine calculator at Basic Maths Functions both return a value of 0.9848.

Is this a known bug? My indicator can't be written unless this function works correctly so I hope there is a solution!

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1027 (permalink)  
Old 06-16-2008, 06:25 PM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 806
TheRumpledOne is an unknown quantity at this point
define a global variable pBars

int pBars = -1 ;

Code:
if(pBars != Bars) {  // only once per bar
if (  
Close[1] == Open[1]&& //DOJI 
flgrs==0)
{
alertdoji = 1;
flgrs=1;
}
else
{
flgrs=0;
}
pBars = Bars ; // assign pBars
}// end if pBars
See if that helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1028 (permalink)  
Old 06-17-2008, 11:24 AM
Junior Member
 
Join Date: Dec 2005
Posts: 11
graemenash is on a distinguished road
Line colour

Hi again

I am creating an indicator which draws a line across the chart (in a similar way to a moving average does).

The line is plotted with values taken from a buffer.

I'd like the line to be drawn green if the value on the current bar is higher than the value on the previous bar, and red if it is lower.

How can I do this?

Thanks in advance for any help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1029 (permalink)  
Old 06-17-2008, 11:27 AM
Junior Member
 
Join Date: Dec 2005
Posts: 11
graemenash is on a distinguished road
Basically I'd like it to look like this:
Attached Images
File Type: gif line.gif (6.7 KB, 108 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1030 (permalink)  
Old 06-17-2008, 11:36 AM
Junior Member
 
Join Date: Dec 2005
Posts: 11
graemenash is on a distinguished road
Why did my last post get moved from the main programming forum to the end of this thread?

(Thanks for the MathCos help too guys!)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
CHinGsMAroonCLK, I_XO_A_H

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-programming/554-how-code.html
Posted By For Type Date
Need an experienced programmer? - Page 2 Post #0 Refback 09-24-2008 06:24 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to code this? iscuba11 Metatrader 4 mql 4 - Development course 1 08-03-2007 04:22 PM


All times are GMT. The time now is 06:28 AM.



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