this ea builder does not work
|
|||
|
Quote:
|
![]() |
|
|||
|
I have a small routine to trace wins/losses when they get erased from a chart:
ObjectsDeleteAll( EMPTY, OBJ_TREND ); for( i = 0; i < HT; i++ ) if( OrderSelect( i, SELECT_BY_POS, MODE_HISTORY ) ) { ObjectCreate( "TrendH"+i, OBJ_TREND, 0, OrderOpenTime(), OrderOpenPrice(), OrderCloseTime(), OrderClosePrice()); ObjectSet( "TrendH"+i, OBJPROP_WIDTH, 2 ); ObjectSet( "TrendH"+i, OBJPROP_RAY, False ); ObjectSet( "TrendH"+i, OBJPROP_STYLE, STYLE_DOT ); if ( OrderType()==OP_BUY ) if ( OrderOpenPrice() < OrderClosePrice() ) ObjectSet( "TrendH"+i, OBJPROP_COLOR, Green ); else ObjectSet( "TrendH"+i, OBJPROP_COLOR, Red ); else if ( OrderType()==OP_SELL ) if ( OrderOpenPrice() > OrderClosePrice() ) ObjectSet( "TrendH"+i, OBJPROP_COLOR, Green ); else ObjectSet( "TrendH"+i, OBJPROP_COLOR, Red ); } Of course, anybody can use any of this that you want in your EA. Problem is, I'd like the OBJPROP_STYLE line to function and it doesn't. Does anybody know of a resource that tells you which properties apply to which objects? You'd think STYLE applies to trendline object types, but it doesn't seem to, unless there's still another property that turns this one on/off. Any help would be appreciated. |
a good link to learn
|
|||
|
I wouldn't call myself a coder, but I do write my own EA's. Here is the most complete manual of MQL4 that I know of:
http://www.networksimplicity.com/met...ql4-manual.pdf If it doesn't work as a link, just go to the site and look for a manual. It is great. Good luck guys!Hope it helps and thank you for the good work you do. Last edited by misfx : 05-12-2007 at 06:46 PM. Reason: addition |
| The Following 4 Users Say Thank You to misfx For This Useful Post: | ||
New here
|
|||
|
Hi scorpion
Im David beh me very in this forum can you tell me where to start if i want to ask about fx mt4 setting of GBP/USD entry to buy and sell signal. Thanks and cheers Beh |
|
|||
|
Hey Scorp - do you know why, if I can make a trend line into a ray, change it's color, etc., I can't set it to dot or dot-dash? Any reason why this won't work?
Misfx - I haden't seen that manual, but I have it now. Thanks. - Bill |
|
||||
|
__________________
F r e e___F o r e x___E b o o k s___a n d___S t u f f s ![]() -> Cheap MQL Coding service for your EA/indicator is Here <- <- |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ZeroCode Sample: Create "10-Minute" Strategy Expert | scorpion | Tutorials, Tips & Tricks | 16 | 04-13-2008 11:29 PM |
| ZeroCode Expert Running 3 Majors (?) | Scicronys | MetaTrader and ZeroCode | 8 | 12-12-2007 08:58 AM |
| Support and Resistance Expert Advisor | suffic369 | Classified Ads | 2 | 07-03-2006 06:57 AM |
| Calling out an expert | gazuz | MetaTrader and ZeroCode | 1 | 10-21-2005 07:48 AM |
| Can not get the Expert to work...Help! | jimbo61 | MetaTrader and ZeroCode | 2 | 08-19-2005 03:57 AM |
All times are GMT. The time now is 05:22 AM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now











F r e e___F o r e x___E b o o k s___a n d___S t u f f s
Linear Mode



