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
  #491 (permalink)  
Old 02-15-2007, 08:15 AM
cja's Avatar
cja cja is offline
Senior Member
 
Join Date: Apr 2006
Posts: 557
cja is on a distinguished road
Quote:
Originally Posted by reiver
Is it possible to display the text/numbers on an indicator in different colours? If so, how? As an example, I want to show the relevant numbers on the absolute strength indicator in the same colour as the lines in the window. Any help/suggestions would be gratefully received.

Thanks
Hi
I do not think that you can alter the colors of those readings however you can write new code to place the readings in different colours in the same window. You must use the indicator name in the code -

IndicatorShortName("MACD") ;

double P = Period();

ObjectCreate("MACDMTF4_v2", OBJ_LABEL, WindowFind("MACD") , 0, 0);
ObjectSetText("MACDMTF4_v2",DoubleToStr( P,Digits-4), 15, "Arial", CadetBlue);
ObjectSet("MACDMTF4_v2", OBJPROP_CORNER, 0);
ObjectSet("MACDMTF4_v2", OBJPROP_XDISTANCE, 430);
ObjectSet("MACDMTF4_v2", OBJPROP_YDISTANCE, 0);

This is label code on a MACD indicator showing the Period - Timeframe in the indicator window, and of course if you can find the code that provides the number read outs for your indicator then they can be inserted into the code at P

cja
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #492 (permalink)  
Old 02-18-2007, 01:36 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 400
iscuba11 is on a distinguished road
Smile Question that needs your help!

#property indicator_level1 0.14

This creates a level of 0.14 that uses dash marks. How do I get it to use a solid line level, versus dash level from the program indicator??

Your Help is Appreciated!

Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #493 (permalink)  
Old 02-18-2007, 01:43 AM
Nicholishen's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 531
Nicholishen is on a distinguished road
Quote:
Originally Posted by iscuba11
#property indicator_level1 0.14

This creates a level of 0.14 that uses dash marks. How do I get it to use a solid line level, versus dash level from the program indicator??

Your Help is Appreciated!

Dave
<><<<
Use SetLevelValue() instead of #property
__________________
"Anyone who has never made a mistake has never tried anything new." -Albert Einstein
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #494 (permalink)  
Old 02-18-2007, 07:53 AM
Beno's Avatar
Senior Member
 
Join Date: Aug 2006
Location: London
Posts: 293
Beno is on a distinguished road
Sequential Entry Conditions

I have some entry conditions that I would like to happen in a certain sequence how can I do this. Ie 1, 2 then 3

bool Long = MAofRSI11>MAofRSI21 && MAofRSI12<=MAofRSI22 && VolCH>VolHL && RSIndex1<HLM &&
RSIndex1>HL2 && TrStop<Close[shift];

bool Short = MAofRSI11<MAofRSI21 && MAofRSI12>=MAofRSI22 && VolCH>VolHL && RSIndex1<HL1 && RSIndex1>HLM && TrStop>Close[shift];

bool Long2 = MAofRSI11>HLM && MAofRSI12<=HLM && MAofRSI21>HLM && MAofRSI22<=HLM && VolCH>VolHL;

bool Short2 = MAofRSI11<HLM && MAofRSI12>=HLM && MAofRSI21<HLM && MAofRSI22>=HLM && VolCH>VolHL;

bool Long3 = RSIndex1-RSIndex2>20;

bool Short3 = RSIndex2-RSIndex1>20;

Cheers Beno
Attached Files
File Type: mq4 euroform-exp.mq4 (12.1 KB, 32 views)

Last edited by Beno; 02-18-2007 at 07:55 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #495 (permalink)  
Old 02-21-2007, 10:29 PM
Junior Member
 
Join Date: Jan 2006
Posts: 7
pipmonger is on a distinguished road
Yearly Pivot indicator - looking for this

Can anyone guide me where I can find the indicator that will plot the YEARLY Pivot?

Or if someone can tell me how to get the yearly OHLC, then I can modify the existing codes of pivot.

I cannot find a timeframe parameter for YEARLY, in this table:

Constant Value Description
PERIOD_M1 1 1 minute.
PERIOD_M5 5 5 minutes.
PERIOD_M15 15 15 minutes.
PERIOD_M30 30 30 minutes.
PERIOD_H1 60 1 hour.
PERIOD_H4 240 4 hour.
PERIOD_D1 1440 Daily.
PERIOD_W1 10080 Weekly.
PERIOD_MN1 43200 Monthly.
0 (zero) 0 Timeframe used on the chart.

HELPPPPPPPPP,, Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #496 (permalink)  
Old 02-22-2007, 10:13 AM
Kalenzo's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 696
Kalenzo is on a distinguished road
Quote:
Originally Posted by pipmonger
Can anyone guide me where I can find the indicator that will plot the YEARLY Pivot?

Or if someone can tell me how to get the yearly OHLC, then I can modify the existing codes of pivot.

I cannot find a timeframe parameter for YEARLY, in this table:

Constant Value Description
PERIOD_M1 1 1 minute.
PERIOD_M5 5 5 minutes.
PERIOD_M15 15 15 minutes.
PERIOD_M30 30 30 minutes.
PERIOD_H1 60 1 hour.
PERIOD_H4 240 4 hour.
PERIOD_D1 1440 Daily.
PERIOD_W1 10080 Weekly.
PERIOD_MN1 43200 Monthly.
0 (zero) 0 Timeframe used on the chart.

HELPPPPPPPPP,, Thanks in advance
I wrote this function some time ago to get High and Low of specified year.
You can change it and get Close and Open prices too, it's easy

Code:
string getHL(int year, int type)
{	
	int janShift = iBarShift(Symbol(),PERIOD_MN1,StrToTime(year+".1.1"),false);
	int i;
	double highA[1],lowA[1];
   ArrayResize(highA,12);
   ArrayResize(lowA,12);
    
	if(type == 1)
	{//High
		
		for(i=11;i>=0;i--)
		{
			highA[i] = iHigh(Symbol(),PERIOD_MN1,janShift-i);	
			 
		}
		
		return(DoubleToStr(highA[ArrayMaximum(highA)],Digits)); 
	}
	else
	{//Low
		for(i=11;i>=0;i--)
		{
			double l = iLow(Symbol(),PERIOD_MN1,janShift-i);
			
			if(l>0)
			lowA[i] = l;
			else
			lowA[i] = EMPTY_VALUE;
		}
		
		return(DoubleToStr(lowA[ArrayMinimum(lowA)],Digits)); 
	}
	
	return("NULL");
	
}
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #497 (permalink)  
Old 02-22-2007, 02:18 PM
MiniMe's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Montréal
Posts: 1,185
MiniMe is on a distinguished road
Bollinger indicator alert

I need a sound alert whenever the Bollinger bands is broken, I think it was already done but I can not find it ... can you pls help me
__________________
Risk comes from not knowing what you're doing
Never argue with an idiot. They drag you down to their level then beat you with experience
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #498 (permalink)  
Old 02-22-2007, 02:20 PM
MiniMe's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Montréal
Posts: 1,185
MiniMe is on a distinguished road
Also I found this idea which seems prety good one from


cementman

http://www.forex-tsd.com/85676-post1.html

Hi..I had tis idea when i've noticed that most of the people here ask for alert for some indicator specialy if they are manual traders like me so though i'm not a programmer i'd like to ask the programmers here to help me develpe tis aler indcator if it can be done.

well..we need to have a window with scroll arrow like the one on the MA's for instance that you choose from it simle or weighted..etc, insted this scroll arrow will contain all the indicators that people needs alert for lets start with standard ones if it's possible like RSI,Stochastic,williams, MACD, MA's..etc

Now in the second window check boxes for choosing wither it's a cross like the MA's or MACD that you need to have an alert for or is it a level like alerting when RSI is over 70 or under 30 and the same for other indicators with the same nature also some people needs both like alert me when the MACD is crossed with the signal line and over 0.002 as an example so whom ever want to have both can check both boxes, and if you want to be alerted only on crosses like MA's just chekc the cross box and the third box is if prices exceeded the MA or the upper or lower bollinger bands or some MA(just thought of it now) and plese if somebody have any other ideas feel free to share it so at the end we can come up with an alerting system for all the indicators that we know of at least the standard ones fir now.

So how about it you coders gurus out there
__________________
Risk comes from not knowing what you're doing
Never argue with an idiot. They drag you down to their level then beat you with experience
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #499 (permalink)  
Old 02-23-2007, 02:41 AM
Member
 
Join Date: Feb 2006
Location: malaysia
Posts: 44
dreamer is on a distinguished road
is it possible?

can this FX Sniper's Ergodic CCI & Trigger indicator modified to histogram rather than line?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #500 (permalink)  
Old 02-23-2007, 01:16 PM
Junior Member
 
Join Date: Feb 2007
Posts: 17
mickD is on a distinguished road
range indicator

Would it be possible to create an indicator which counts, say, the last 16 bars of a 30 mins chart i.e. 8 hours worth and if the range of that period from the highest high to lowest low is under a set amount, say 25 pips, two lines appear on a chart and an email alert is sent to me?

This would be a huge help in my low volatility=potential breakout strategy.

Not an original idea I know but I can't see this kind of indicator anywhere. I've used the ATR but just not the same.

Thanks very much if you can help make it or point me in the direction of a similar indicator

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
histogram, forex

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 09:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 11:46 AM


All times are GMT. The time now is 08:56 PM.



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