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 |
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 |
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Support and Resistance Expert Advisor | suffic369 | Classified Ads | 3 | 03-12-2010 02:38 PM |
| 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 09:58 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 01:41 AM.
Registered members gain free access to online FOREX currency trading tools, foreign exchange software, Metatrader MT4/MT5 expert advisors, MT4 indicators and EAs. Register now


14Likes











Linear Mode

