Forex



Go Back   Forex Trading > Downloads > Indicators - Metatrader 4
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
  #1 (permalink)  
Old 04-07-2007, 08:41 PM
Junior Member
 
Join Date: Mar 2007
Posts: 11
samjesse is on a distinguished road
Horizontal Lines

the following code draws HLines at yesterday's close prices, but does not change the HLINE ever day, how can I fix it. I need to draw a HLINE indicating yesterday close price.

thanks


#property indicator_chart_window

extern int DD=4; //--- decimal places
extern int number_of_days = 50;
extern color R1_color = Gold;


//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
for( int i=0; i<number_of_days; i++ )
{
double R1 = iClose (NULL,PERIOD_D1, i+1);
ObjectCreate( "obj"+i, OBJ_HLINE, 0, 0,R1 );
ObjectSet( "MR",OBJPROP_COLOR,R1_color );
ObjectSet( "MR",OBJPROP_STYLE,STYLE_DOT );
}
}

//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
ObjectsDeleteAll();
return(0);
}

//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
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
  #2 (permalink)  
Old 08-02-2007, 01:16 PM
Member
 
Join Date: Jun 2007
Posts: 92
Mano is on a distinguished road
Horizontal Lines

Hello to all, maybe some one can halp me with this,

i'm looking for 2 Horizontal Lines with 'meaning'

1. Horizontal Line with audio alert on it, the alerm will ring the min the price break it

2. Horizontal Line that will act as stop loss line on the chart, i mean every time i need to move the SL higher or lower ill just have to Du click the line move it and then do a Du click again to close the order

this will halp me very much in my journey.

Thanks
-M-
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
  #3 (permalink)  
Old 08-02-2007, 01:45 PM
Member
 
Join Date: Jun 2007
Posts: 92
Mano is on a distinguished road
ok, so i found the Horizontal Line alert, its called HLine Alert

as for my 2nd thing, its even possible?

Thanks
-M-
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
  #4 (permalink)  
Old 08-02-2007, 01:55 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,059
Blog Entries: 241
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
2nd idea. Script is attached (i am not the author of this script). As i remember it was article on MetaQuotes website. I just translated some instruction (how to use it step by step) from Russian in elite section. I tried this script and it works. If you have some difficulties to use it please let me know. May be, I translated some comments inside the code also ... sorry don't remember exactly as it was many month ago.

1st idea.
It should be 2 or 3 alarm indicators.
I am posting everything so just select something. Some links are from elite section so sorry.

Vertical/horizontal indicators (support/resistance, trading time, min/max or any):
- Alarm Custom Indicator For Horizontal Lines is here.
- Vertical Horizontal Filter (VHF): indicator is here (elite section).
- how to draw vertical/horizontal lines manually in MetaTrader: original thread is here.
- TradeTime_v2 indicator is here.
- MktOpen: this indicator is drawing vertical lines on specific time or in market open sessions.
- 3@S & R Simple: the script to draw support/resistance horizontal lines.
- Reliable Trendlines: elite section thread with many trend lines or support/resistance lines indicators.
- MaksiGen_Range_Move: the indicator as part of MaksiGen Trading system; it drawing horizontal trend line and support/resistance lines, also - breakout lines. The same indicator with alarm is here.
- support/resistance for candles: original thread with discussion and some indicators.
- breakout indicators: the indicators are drawing horizontal lines on possible breakout levels.
Attached Files
File Type: mq4 ModifyOrder.mq4 (21.1 KB, 53 views)

Last edited by newdigital; 08-02-2007 at 01:57 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
  #5 (permalink)  
Old 08-02-2007, 02:03 PM
Member
 
Join Date: Jun 2007
Posts: 92
Mano is on a distinguished road
Thanks a lot, will check them out
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
  #6 (permalink)  
Old 08-17-2007, 06:47 PM
Julia's Avatar
Junior Member
 
Join Date: Aug 2007
Posts: 17
Julia is on a distinguished road
Drawing Horizontal Lines

Can someone hive me an example of how the EA can draw a horizontal line at a certain price?

Like,

double Rainer;

I would set a price level in 'Rainer' and it would draw a horizontal line for me.


Thanks,

julia
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
  #7 (permalink)  
Old 08-18-2007, 12:16 PM
Senior Member
 
Join Date: Dec 2006
Location: Ukraine
Posts: 513
Shinigami is on a distinguished road
Quote:
Originally Posted by Julia View Post
Can someone hive me an example of how the EA can draw a horizontal line at a certain price?

Like,

double Rainer;

I would set a price level in 'Rainer' and it would draw a horizontal line for me.


Thanks,

julia
If its one line, why don't you draw it yourself?
__________________
MQL4 programming is easy ^^
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
  #8 (permalink)  
Old 08-18-2007, 09:41 PM
Julia's Avatar
Junior Member
 
Join Date: Aug 2007
Posts: 17
Julia is on a distinguished road
Quote:
Originally Posted by Shinigami View Post
If its one line, why don't you draw it yourself?

Believe me, I need it to draw tons of horizontal lines. So, what'
s the code, Shinigami?
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
  #9 (permalink)  
Old 08-20-2007, 08:16 PM
Member
 
Join Date: Jun 2007
Posts: 92
Mano is on a distinguished road
Quote:
Originally Posted by newdigital View Post
2nd idea. Script is attached (i am not the author of this script). As i remember it was article on MetaQuotes website. I just translated some instruction (how to use it step by step) from Russian in elite section. I tried this script and it works. If you have some difficulties to use it please let me know. May be, I translated some comments inside the code also ... sorry don't remember exactly as it was many month ago.
Hi new digital, is there any chance you can help me with this script, would be nice since now i got some free time to improve my trading style, i can't make it work the way i want, any help will help

Thanks

-M-
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
  #10 (permalink)  
Old 08-21-2007, 08:48 AM
Administrator
 
Join Date: Sep 2005
Posts: 20,059
Blog Entries: 241
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 Mano View Post
Hi new digital, is there any chance you can help me with this script, would be nice since now i got some free time to improve my trading style, i can't make it work the way i want, any help will help

Thanks

-M-
This scripts is from Metaquotes codebase. May be they ghave description about this script in English but i am not sure.

Anyway, please find below my post from elite section which i did some time ago concerning this script. Script is in Russian language but you just need to be comfortable with how to use it step by step.

Hope it will help.

-----------------------------------------
Script to modify the order by mouse.

Code:
Instruction for installation:

1. Open script in MetaEditor and set your desirable default settings. 
Default settings in the script are started and finished 
by this line //+--------------------------+

2. In Metarader: go to Tools, Options, Expert Advosirs 
and select "Allow external experts import". 

3. Move script to the chart by mouse just near the order 
which you want to modify.

4. Move all the lines to the necessary levels:

- Open_Price_Line (white color by default) - 
price to open the order (for pending orders only);

- Stop_Loss_Line (red color) - stop loss level;

- Take_Profit_Line (green color) - take profit level;

- Expiration_Line (yellow) - for pending orders only.

To remove stop loss, take profit, expiration date 
so just delete the lines on the chart (by mouse).

Move the lines by mouse on the chart to modify the order.
Explanation of the settings inside the script:

Code:
Order_Find_Radius = 10;
It is distance between the price to open the order and where you drop this sctipt. Default is 10. If you are sniper so you may set to zero. It does not affecting on anything a lot because you should open the order manually before. So it is affecting on the following: will this script recognize the order to modify or not. I prefer 10 or more. 20 for example. Because I am not a sniper by mouse

Code:
Take_Profit = 50;
int Stop_Loss = 50;
It is understandable: stop loss and take profit value. You may set it to 100 (both) to move easy after.

Code:
Slippage = 5;
Understabdable.

Code:
Expiration_Shift = 0;
It is for pending orders only. Value is in bas. For example, if you are attaching (moving) ther script to H4 chart and Expiration_Shift = 3 so it means that the order will be expired in 12 hours (3 bars x 4 H timeframe).

How to use this script:

1. Open the order.

2. Move this script by mouse to the place with order price on the chart. If you get the error so it means that you are not sniper and you moved the script far away from the order on the chart. Just increase Order_Find_Radius value in this case. I prefer 20 for example (20 pips target aroud the order open price on the chart).

3. Wait. Pop up window will be opened (see image attached). Ignore this pop-up window (do not click on "OK" or "Cancel", just ignore). If this pop-up window prevent you to see or move the lines on the chart so just move this window to somewhere by mouse.

4. You should see the lines. Just wait 2 or 3 seconds. To speed up this process, or if you do not see red/green stop loss and take profit lines so simple click on the chart by mouse in any place.

5. Move take profit line and stop loss line what ven distance you want (by mouse on the chart). How to move? Double mouse click on the line and move.

6. So, now only you may press "OK" in pop-up window. Afer that order will be modified.

7. If you want to modify once again so move this script to the "open order place" and repeat it.

It looks complicated but it is very simple. Just set your desirable Order_Find_Radius and use your mouse.
Attached Images
File Type: gif screen2.gif (43.1 KB, 325 views)
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


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Horizontal lines sailor Indicators - Metatrader 4 41 10-31-2009 07:11 PM
Alarm Custom Indicator For Horizontal Lines hagadol Metatrader 4 20 06-16-2009 01:09 AM
Simple script to plot Horizontal lines SaxMan Indicators - Metatrader 4 3 12-27-2008 10:45 AM
Horizontal line help samjesse Metatrader 4 1 04-07-2007 07:29 AM
Horizontal Line at Bar Open trader79 Indicators - Metatrader 4 1 03-10-2006 03:18 PM


All times are GMT. The time now is 09:48 PM.



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