|
|||||||
| 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 (12) | Thread Tools | Display Modes |
|
||||
|
MultixpMA V 1.0.0
Multi-xpMA EA Version 1.0
Multi-xpMA is a creation based on the xpMA indicator designed by Codersguru. I had some initial ideas on how to use this indicator but needed to be able to use more than one. I approached a very generous and gifted coder that goes by the name of Ralph Ronquist. I wanted to design an EA that was the mother of all moving average EA’s. Ralph decided to take on the project and wouldn’t take any money for it and did it for his love of coding. Without him this would still be a concept and can’t thank him enough. He has moved on to other endeavors and left the community with more than a solid foundation to work with. With that said, on to the EA. Basic abilities The EA was designed to allow just about any moving average logic to be plugged in. It can be as simple as two moving averages crossing or as complex as six different types and periods of moving averages agreeing with the original xpMA “signal” and another six moving averages “crossing” and they can be from any separate timeframe you desire. The limit is not six by the way, that is just an example. The possibilities are almost infinite. Settings I will go through most of the EA settings and then discuss the moving averages xpma.csv file. TrailingStopType =1,2,3 1 (default) to start trailing at 1*TrailingStop profit, 2 To start trail immediately 3 To limit by high/low of n:th prior candle TrailingStop For type 1 and 2, this would be your standard trail behind price by X For type 3 this will be the number of candles back to use as your stoploss BreakEvenAfterPips Self explanatory CloseMA NOTE – Defining 0 for CloseMA will equal line one of xpma.csv, 1 would equal line 2 and so on. This has a few different meanings based on what style of moving average system you are using; signals or crosses. Signals will be used as the first example. In your xpma.csv (more on this later) you have defined three moving averages at periods 10, 20, 30. To place an order, all signals must agree. One exit strategy is to exit on signal change defined by CloseMa. If you were to define CloseMa=0, then at the first opposite signal of the 10 period MA the order would be closed. If you were to define CloseMa=2 the order would be closed on the first opposite signal of the 30 period MA. This would be best used for allowing the MA’s to get you in but let the money management functions get you out. In the case of a crossing setup the CloseMa would define which cross would close the trade. In this case the value will be which MA must be crossed to close the trade. CloseMa in this case can not =0 as the first MA can not cross itself. A setting of CloseMa=1 would close the trade when the 10 period crosses the 20, and CloseMa=2 would be the 10 period MA crossing the 30. UseRSIfilter True/False RSIPeriod Self explanatory RSIPrice Self explanatory RSIBUYthreshold A buy only allowed greater than this value RSISELLthreshold A sell only allowed less than this value UseCCIfilter True/False CCIPeriod Self explanatory CCIPrice Self explanatory CCIBUYthreshold A buy only allowed greater than this value CCISELLtreshold A sell only allowed less than this value UseVolumeFilter True/False VolumeRange A cumulative value of number of bars back to include VolumeThreshold A trade only allowed when volume exceeds this parameter OneEntryPerBar True/False Self explanatory ReverseTradesOnly True/False When true the trade sequence will be buy-sell-buy-sell-buy-sell, when false consecutive trades in the same direction are allowed StopLoss Self explanatory TakeProfit Self explanatory Slippage Self explanatory MaxOpenTrade Self explanatory MinPriceDistance Self explanatory UseHourTrade True/False; StartHour Hour to allow trading to begin End Hour Hour to shut down the EA Lots Number of lots MM True/False, use money management or not AccountIsMicro True/False DecreaseFactor Decrease lots after loss by this amount Risk % of capital to use EnableAlert True/False EmailAlert True/False XPMA.CSV This is the heart of multixpMAEA. It resides in your metatrader installdirectory \tester\files. It consists of a series of 10 numbers with the meanings as follows. The first 8 numbers are straight from the xpMA indicator as defined by Codersguru. These are taken directly from XP Works written by Codersguru and all credit goes to him. TimeFrame: (default 0) Set it to the time frame you want to work with. The default value is 0 which means it will works with the current time frame of the chart MA_Period: The period of the moving average MA_Type: The moving average type (Review table 1). MA_Applied: The Moving Average Applied price (Review table 2). T3MA_VolumeFactor: This setting is for the T3MA indicator only, The Volume Factor JMA_Phase: This setting is for the JMA indicator only, The Phase Step_Period: How many bars in the history the xpMA indicator will look back to determine the direction of the moving average Shift: 0 is current bar, 1 previous bar, 2 previous bar to 1, etc. Moving Average Type Constant name Integer value Simple moving average MODE_SMA 0 Exponential moving average MODE_EMA 1 Smoothed moving average MODE_SMMA 2 Linear weighted moving average MODE_LWMA 3 Double Exponential Moving Average MODE_DEMA 4 Triple Exponential Moving Average MODE_TEMA 5 T3 Moving Average MODE_T3MA 6 Jurik Moving Average MODE_JMA 7 Hull Moving Average MODE_HMA 8 DECEMA Moving Average MODE_DECEMA 9 SALT indicator MODE_SALT 10 Applied Price type Constant name Integer value Close price. PRICE_CLOSE 0 Open price. PRICE_OPEN 1 High price. PRICE_HIGH 2 Low price. PRICE_LOW 3 Median price, (high+low)/2. PRICE_MEDIAN 4 Typical price, (high+low+close)/3. PRICE_TYPICAL 5 Weighted close price, (high+low+close+close) PRICE_WEIGHTED 6 The last 2 values are as follows. SignalType type = 1 tells that this MA provides its agreement signal by means of line direction being upwards or downwards, as indicated by the red and blue line colors; This is what defines the system as a signal system * type = 2 tells that this MA provides its agreement signal by means of its value being above or below the value of the preceding type 2 MA; This is what defines the system as a cross system * type = 0 (or anything else) tells that this MA always agrees. Span "span" is used for type 1 MA to make it stop agreeing after that many bars of the same direction. span = 0 means "no span limit". So what you end up with is an xpma.csv file that will look like so.. Timeframe Period MA Type MA Applied T3 Volume Jma Phase StepPeriod Shift Signaltype Span 0 50 8 0 0.8 0 1 0 1 0 Examples of xpma.csv The following would be the signal setup in the beginning of this document. A 10, 20, 30 “signal” for buy or sell. 0 10 8 0 0.8 0 1 0 1 0 0 20 8 0 0.8 0 1 0 1 0 0 30 8 0 0.8 0 1 0 1 0 Set your CloseMa to close the order on the 10 period =0, the 20 period =1, or the 30 period =2. If you would like a confirm on entry, simply change one or all of your shift values to 1 We will use the same example except use a “cross” system. 0 10 8 0 0.8 0 1 0 2 0 0 20 8 0 0.8 0 1 0 2 0 0 30 8 0 0.8 0 1 0 2 0 Simply change the 1 of signaltype to 2 and the values of the moving average are taken rather than the line directions. It is possible to use both a cross and signal by combining both the above .csv settings. Use your imagination, make a rainbow. At this point I believe that is enough documentation to get started. As questions arise I will update. Last edited by C.E.O.; 08-19-2007 at 02:13 PM. |
|
|||
|
2007.01.29 18:47:23 2006.01.05 19:00 Cannot open file 'C:\Programmi\Metatrader 4 Velocity Trader\experts\indicators\HMA.ex4' on the EURUSD,M30
Hi to everybody, during the tests, the program asks for the file HMA in the indicator folder. Where can I find it? Thanks. Caster60 |
|
|||
|
Quote:
|
|
|||
|
Great EA, but...
Sounds like a great EA, but I couldnt get it started to test it. I like the jma being in there.
"2007.01.30 22:22:40 2006.10.01 21:00 xpMA USDJPY,H4: SetIndexBuffer function must be called from custom indicator only" Any ideas? NVM. Got it now. Was using wrong file. Thanks alot. Let you know when Im done checking it out. Last edited by nito2721; 01-31-2007 at 05:34 AM. |
|
|||
|
What Settings?
Wow, Nice work on this!
It would be nice if someone could post the exact settings they would use on this, and I would be glad to test it; I just can't figure out what settings to use to develop any meaningful system. |
|
|||
|
Speaking of settings....HOW/WHERE do you make the changes?
Do you attach the Indicator to the chart with your desired settings and THEN start the EA? Or do you access the EA (and how do you do this?), make the changes within the EA and then start the EA? When right-clicking the EA in the Navigator I see options to Attach To A Chart and to Modify. Randy |
![]() |
| Bookmarks |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/expert-advisors-metatrader-4/5712-multixpma-v-1-0-0-a.html
|
||||
| Posted By | For | Type | Date | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-22-2007 09:25 PM | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-22-2007 03:38 PM | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-11-2007 12:43 PM | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-10-2007 02:35 PM | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-10-2007 02:19 PM | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-09-2007 09:45 AM | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-09-2007 09:04 AM | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-09-2007 06:25 AM | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-09-2007 02:15 AM | |
| informacje nowosci » Blog Archive » Forex - systemy i strategie :: RE: 2 EMA EA, ale nie Cross!! | This thread | Pingback | 12-08-2007 08:03 PM | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-08-2007 07:12 PM | |
| 2 EMA EA, ale nie Cross!! | This thread | Refback | 12-08-2007 06:41 PM | |