Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions


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 (2) Thread Tools Display Modes
  #391 (permalink)  
Old 10-04-2006, 10:34 AM
Junior Member
 
Join Date: Apr 2006
Posts: 6
MehdiForex is on a distinguished road
I attach both of above EA at the same time EG-EUR on EUR/USD and EG-GBP on GBP/USD
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #392 (permalink)  
Old 10-09-2006, 01:35 PM
Member
 
Join Date: Sep 2006
Posts: 36
evgeni1980 is on a distinguished road
Hi, Codersguru,
This is Shaff Trend Cycle:

#property copyright "Copyright © 2004, FostarFX."
#property link "mail: fostar_fx@yahoo.com"

#property indicator_separate_window
#property indicator_minimum -10
#property indicator_maximum 110
#property indicator_buffers 1
#property indicator_color1 DarkOrchid

//---- input parameters
extern int MAShort=23;
extern int MALong=50;
extern double Cycle=10;
extern int CountBars=300;
//---- buffers
double MA[];
double ST[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
// string short_name;
//---- indicator line
IndicatorBuffers(2);
SetIndexBuffer(0, MA);
SetIndexBuffer(1, ST);
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2,DarkOrchid );

//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Schaff Trend Cycle |
//+------------------------------------------------------------------+
int start()
{
SetIndexDrawBegin(0,Bars-CountBars+MALong+MAShort+1);
int shift,u,counted_bars=IndicatorCounted();
double MCD, LLV, HHV, MA_Short, MA_Long, sum ,prev, smconst;
int n, i, s;
bool check_begin=false, check_begin_MA=false;
double MCD_Arr[100];

if(Bars<=MALong) return(0);
if (CountBars==0) CountBars=Bars;
//---- initial zero
if(counted_bars<MALong+MAShort)
{
for(i=1;i<=MALong;i++) MA[Bars-i]=0.0;
for(i=1;i<=MALong;i++) ST[Bars-i]=0.0;
}
//----
shift=CountBars-MALong-1;
// if(counted_bars>=MALong) shift=Bars-counted_bars-1;

check_begin = false;
check_begin_MA = false;
n = 1;
s = 1;
smconst = 2 / (1 + Cycle/2);

while(shift>=0)
{
MA_Short = iMA(NULL,0,MAShort,0, MODE_EMA, PRICE_TYPICAL, shift);
MA_Long = iMA(NULL,0,MALong,0, MODE_EMA, PRICE_TYPICAL, shift);
MCD_Arr[n] = MA_Short - MA_Long;
MCD = MA_Short - MA_Long;

if (n >= Cycle)
{
n = 1; check_begin = true; } else {n = n + 1;}

if (check_begin)
{
for (i = 1; i<=Cycle; i++)
{
if (i == 1) {LLV = MCD_Arr[i];}
else {
if (LLV > MCD_Arr[i]) LLV = MCD_Arr[i];
}

if (i == 1) {HHV = MCD_Arr[i];}
else {
if (HHV < MCD_Arr[i]) HHV = MCD_Arr[i];
}
}
ST[shift] = ((MCD - LLV)/(HHV - LLV))*100 + 0.01;
s = s + 1;
if (s >= (Cycle)/2)
{
s = 1;
check_begin_MA = true;
}
} else {ST[shift] = 0;}
if (check_begin_MA) {
prev = MA[shift + 1];
MA[shift] = smconst * (ST[shift] - prev) + prev; }

shift--;
}

return(0);
}


Can you input sound alarm to be played when the indicator goes above 1% line and when goes below the 99% line (or when is between 1-10% line and when is between 99-90% line), plese?
Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #393 (permalink)  
Old 10-10-2006, 11:23 AM
Junior Member
 
Join Date: Oct 2006
Posts: 2
Pee85 is on a distinguished road
I am looking for a EA programmer to write me a program

Can you help.

Thanks

Pee85
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #394 (permalink)  
Old 10-10-2006, 11:26 AM
phoenix's Avatar
Senior Member
 
Join Date: May 2006
Posts: 289
phoenix is on a distinguished road
Quote:
Originally Posted by Pee85
Can you help.

Thanks

Pee85
here you go
Programing skils for sale.
List of EA programmers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #395 (permalink)  
Old 10-10-2006, 12:51 PM
Member
 
Join Date: Dec 2005
Posts: 62
LazyForex is on a distinguished road
Hi. I really need help in this:
Alert if no 'Smiling face"?

Also thanks again phoenix...

LF
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #396 (permalink)  
Old 10-10-2006, 02:03 PM
Junior Member
 
Join Date: Aug 2006
Posts: 13
nyachty is on a distinguished road
Alert for indicator

Hello All,

I'm hoping someone can figure out how to add an alert to this indicator. I really enjoying reading all the posts and the team work from everyone here.
Thanks.



#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_width1 2
#property indicator_color2 Lime
#property indicator_width2 2

extern int SignalGap = 4;

int dist=24;
double b1[];
double b2[];

int init() {
SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,1);
SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,1);
SetIndexArrow(1,233);
SetIndexArrow(0,234);
SetIndexBuffer(0,b1);
SetIndexBuffer(1,b2);
return(0);
}
int start() {
int counted_bars=IndicatorCounted();
int k,i,j,limit,hhb,llb;

if (counted_bars<0) return(-1);
if (counted_bars>0) counted_bars--;
limit=Bars-1;
if(counted_bars>=1) limit=Bars-counted_bars-1;
if (limit<0) limit=0;

for (i=limit;i>=0;i--) {
hhb = Highest(NULL,0,MODE_HIGH,dist,i-dist/2);
llb = Lowest(NULL,0,MODE_LOW,dist,i-dist/2);

if (i==hhb)
b1[i]=High[hhb]+SignalGap*Point;
if (i==llb)
b2[i]=Low[llb]-SignalGap*Point;
}
return(0);
}
Attached Files
File Type: mq4 #super-signals_v2.mq4 (1.4 KB, 28 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #397 (permalink)  
Old 10-10-2006, 03:03 PM
Member
 
Join Date: Sep 2006
Posts: 36
evgeni1980 is on a distinguished road
hmmmm, nyachty, this indicator is very cool, I hope somebody to put sound alert, please.
Nyachty can you show me a literature for this indicator - when to enter and when to exit, also how to filtrate the signals. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #398 (permalink)  
Old 10-12-2006, 08:45 AM
Administrator
 
Join Date: Sep 2005
Posts: 16,815
Blog Entries: 145
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
Quote:
Originally Posted by newdigital
Eaglehawk,
I am not programmer. I can program something but it takes a long time for me.
Try to look at Codersguru lessons here http://www.metatrader.info/node/34

And there are some thread also:
- icustom
- iCustom function
- Easy iCustom and Alerts!
Just wanted to remind about the links concerning icustom.

Besides there is some example about icustom here for RSIFilter_v1 and NonLagMA_v5 indicators.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #399 (permalink)  
Old 10-12-2006, 01:13 PM
increase's Avatar
Senior Member
 
Join Date: May 2006
Posts: 690
increase is on a distinguished road
How can I make this play both lines?

PlaySound("trendn.wav");
Alert("EMA Cross Trend going Down on ",Symbol(),Period());

All I get is the alert window, it comes up too fast for the wav to play?

Thanks for any help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #400 (permalink)  
Old 10-12-2006, 01:47 PM
Administrator
 
Join Date: Sep 2005
Posts: 16,815
Blog Entries: 145
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
Quote:
Originally Posted by increase
How can I make this play both lines?

PlaySound("trendn.wav");
Alert("EMA Cross Trend going Down on ",Symbol(),Period());

All I get is the alert window, it comes up too fast for the wav to play?

Thanks for any help
You may look at some my indicator attached.

I used the following:

Code:
if (UseSound==1) PlaySound(NameFileSound);
      if (TypeChart==1) Comment ("Buy signal at Ask=",Ask,", Bid=",Bid,", Date=",TimeToStr(CurTime(),TIME_DATE)," ",TimeHour(CurTime()),":",TimeMinute(CurTime())," Symbol=",Symbol()," Period=",Period());
      }
And in the beginning (in the settings the following:

Code:
extern bool UseSound = True;
extern bool TypeChart = True;
extern string NameFileSound = "alert.wav";
'True' is 1 and 'False' is 0.

Besides I opened MetaEditor and it is written the following:

"Function plays a sound file. The file must be located in the terminal_dir\sounds directory or in its subdirectory".

So my be you forgot to place this sound file in right place?
Attached Files
File Type: mq4 wma_cross2.mq4 (4.8 KB, 25 views)

Last edited by newdigital; 10-12-2006 at 02:01 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
histogram, forex, ZUP_v1.mq4

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/questions/270-ask.html
Posted By For Type Date
OzFx System:) - Page 639 This thread Refback 06-21-2008 10:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 12:46 PM


All times are GMT. The time now is 03:53 AM.



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