Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4


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 Thread Tools Display Modes
  #1 (permalink)  
Old 01-29-2007, 03:50 PM
leeb's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 353
leeb is on a distinguished road
Coding Problem

Hi everyone,

Could anybody tell me how in Metatrader 4 coding an expert one could draw a trendline from close of one time to close of another time ? eg: include in EA code to draw trendline from close at 15:00 to close at 18:00 ?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-29-2007, 03:51 PM
leeb's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 353
leeb is on a distinguished road
forgot to say as its drawing from close to close this won't be a horizontal line most of the time but diagonal or sloped... can anyone show code to automate this ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-29-2007, 04:43 PM
Member
 
Join Date: Nov 2005
Posts: 50
4xCoder is on a distinguished road
Take a look at the ObjectCreate function. The type would be OBJ_TREND and the first time and price would be the time and close of the first bar, the second time and price would be that of the second bar.

If you want it to be a ray, add ObjectSet( name, OBJPROP_RAY, true );
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-29-2007, 04:48 PM
leeb's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 353
leeb is on a distinguished road
Hi 4xCoder, thanks for your input, exactly I was looking at the objectcreate function - I think maybe the ray setting will help as it wasn't drawing diagonally. I'm just having problem with the parameters and the order the times and prices go in. Thanks again
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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
Problem coding indicator Q0paz Metatrader 4 1 11-13-2006 10:30 AM
Help with Coding Please hoosain Questions 1 08-01-2006 05:36 PM
EA Coding Help! WAW Questions 0 05-03-2006 05:12 AM
Coding Help jerrymar Indicators - Metatrader 4 1 03-23-2006 09:20 AM


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



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