| New signals service! | |
|
|||||||
| 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 |
|
![]() |
|
|
LinkBack (1) | Thread Tools | Display Modes |
|
|||
|
OrderSend(Symbol(),OP_BUYLIMIT,lots,limitprice,sli ppage,stoploss,takeprofit,"comment",magic#,expirat ion_time,arrowcolor)
Replace OP_BUYLIMIT with OP_SELLLIMIT for the sell limit order. Replace each word with the values you choose. |
|
|||
|
double iADX( string symbol, int timeframe, int period, int applied_price, int mode, int shift)
this one? double iADX( string symbol, int timeframe, int period, int applied_price, int mode, int shift) Calculates the Movement directional index and returns its value. Parameters: symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol. timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe. period - Averaging period for calculation. applied_price - Applied price. It can be any of Applied price enumeration values. mode - Indicator line index. It can be any of the Indicators line identifiers enumeration value. shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago). Sample: if(iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0)>iADX(NUL L,0,14,PRICE_HIGH,MODE_PLUSDI,0)) return(0); see http://docs.mql4.com/indicators/iADX for more |
|
|||
|
There is no need in that. I posted the way you should use the iADX() function
If you don't code its okay not to understand. If you are trying to write an EA, you should be able to understand syntax... I'll be a bit more specific (if you didn't look into that link) usage: iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0 NULL as current symbol 0 - current time frame, you can use M1 M15 H4 or whichever you like, you need a window with that period open for running a forward test and quotes history for a backtest, see sticky threads for backtesting modeling quality. 14 - period in bars back from current bar. You calculate iADX for that period. In this example you use 14 bars back from this bar, current bar's number is 0(!) PRICE_HIGH - Applied price constants. It can be any of the following values: Constant Value Description PRICE_CLOSE 0 Close price. PRICE_OPEN 1 Open price. PRICE_HIGH 2 High price. PRICE_LOW 3 Low price. PRICE_MEDIAN 4 Median price, (high+low)/2. PRICE_TYPICAL 5 Typical price, (high+low+close)/3. PRICE_WEIGHTED 6 Weighted close price, (high+low+close+close)/4. (see http://docs.mql4.com/constants/prices) MODE_MAIN - http://docs.mql4.com/constants/lines you'll find all the information there, hard to explain, never used it before. Basically its Constant Value Description MODE_MAIN 0 Base indicator line. MODE_PLUSDI 1 +DI indicator line. MODE_MINUSDI 2 -DI indicator line. 0 in the end is shift. If you wish not to use current bar to start calculations, but would like to shift back few bars, use this number. 5 will mean you ignore last 5 bars including current and start calculation of iADX based on 14 previous bars. I hope that helps... See links for more information, I just LOVE that resource. Oh and the code there is colored just like in metaeditor, very useful! And I really don't understand what you don't understand... Its pretty damn clear in the posted indicator and its quite simple too... Last edited by Shinigami; 05-24-2007 at 08:57 AM. |
![]() |
| Bookmarks |
| Tags |
| candle time, CHinGsMAroonCLK, coders guru, expert advisor, forex, how to code, I_XO_A_H, mechanical trading, trading |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-programming/554-how-code.html
|
||||
| Posted By | For | Type | Date | |
| Need an experienced programmer? - Page 2 | Post #0 | Refback | 09-24-2008 07:24 AM | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to code this? | iscuba11 | Metatrader 4 mql 4 - Development course | 1 | 08-03-2007 05:22 PM |