There is no file extension to distinguish between and forex Expert or forex Indicator. If you are not sure what you have, they you have to look at the code in MetaEditor. At the top of the code in MOST Experts there will be code such as Lots, Stop Loss, Take Profit, these would be Experts.
Most MT4 indicators with say Custom forex Indicator in the code, and MT3 forex indicators with have things such as Separate Window, First Color, Draw Type and things of that nature. I can not code a single thing, but I can read. Some Experts have a wealth of information written inside the code for easy understanding.
When you drag the Expert from the forex Expert Advisors folder in MetaTrader to the forex chart and let if go, that is when a pop up window should show up. On the common tab will be a box that says allow live forex trading, check it. Inputs tab will be to make changes to the code if it's allowed. Then click ok. Indicators taken from the Custom forex Indicators folder of MetaTrader will have a popup window as well, but no live forex trading. Just a list of settings, click ok and it should run.
If it's not, I would probably remove the Expert or Indicator from MetaTrader and try it again. I could be they are just in the wrong folders. Open the code to determine what it is, place it in the appropriate folder, compile it in that folder and start MetaTrader. From the Navigator menu, open forex Expert Advisors, drag the EA to the chart you want to run on and let it go, on the comon tab from the popup, click allow live forex trading and it should work. If it's an forex Indicator, it will be in the Navigator Menu under Custom Indicators.
Handy hedge free forex strategy
Showing posts with label forex indicator. Show all posts
Showing posts with label forex indicator. Show all posts
Monday, October 13, 2008
Sunday, October 12, 2008
How to put a forex Indicator in a chart.
Go to my computer.
Find your Metatrader program.
Click Double click on it.
You will see list of folders.
The 3rd is experts folder.
Double click on it.
Now you see the 3rd folder is indicators folder. C:\Program Files\Interbank FX Trader 4\experts\indicators
Remember where the indicators folder is.
Now go to the Email and click on the attachment
Now click on save
Now click on browes
Now go to where you remember where the indicator file folder was and double click on it.
You now the indicator file in the save box.
Now click on save
Go to your platform and close and then restart.
You now have the indicator in the Navigators Custom Indicators.
Now left click on the indicator you want drag to the chart.
You are done.
For all which want reliable backtest
Best FOREX Indicators - Only if you need
Find your Metatrader program.
Click Double click on it.
You will see list of folders.
The 3rd is experts folder.
Double click on it.
Now you see the 3rd folder is indicators folder. C:\Program Files\Interbank FX Trader 4\experts\indicators
Remember where the indicators folder is.
Now go to the Email and click on the attachment
Now click on save
Now click on browes
Now go to where you remember where the indicator file folder was and double click on it.
You now the indicator file in the save box.
Now click on save
Go to your platform and close and then restart.
You now have the indicator in the Navigators Custom Indicators.
Now left click on the indicator you want drag to the chart.
You are done.
For all which want reliable backtest
Best FOREX Indicators - Only if you need
Saturday, October 11, 2008
DOCUMENATION for WRR_ZUP_INFO_v02 .mq4 forex Indicator to Complement ZUP :: successful forex trader
Rev 00
Issued 2008.06.16
Forex Indicator INTRODUCTION
In response to a number of requests, I have re-written my ZUP _ v67.01_WRR _ZUP_INFO.mq4 forex indicator to make it compatible with multiple versions of ZUP for forex trading. I am calling this new indicator WRR_ZUP_INFO_v02.mq4. Following, is a description of what it does and the settings for it.
This forex indicator also needs the ZUP indicator on the chart set up to show Gartley patterns for it to work.
The main purposes for, and features of, the WRR_ZUP_INFO forex indicator are as follows. It will display a text block saying what type of pattern ZUP has made (Gartley, Butterfly, Bat or Crab), if the pattern has “failed,” if there is no pattern, what timeframe or period the chart is on and the chart instrument or pair. The text block also indicates the risk for the forex trade and the range in which the pattern is valid or somewhat valid. The text block can be moved anywhere on any window including forex indicator sub-windows.
It will alert when there is a pattern change. It will draw a 100% fib expansion on Gartleys to show if there is an AB=CD confirmation. It will allow one to change the background property and colours of the D Point Rectangle drawn by ZUP. It will also allow one to forex automatically and instantly make a screen shot every time a new pattern forms, fails or there is no pattern, then save it to a file.
There are a few more adjustments that can be made to the forex indicator, all of which are documented below. The main settings for the forex indicator are noted in green. The other settings for the indicator are noted in blue. Important notes are shown in red.
FOREX INDICATOR COMMON TAB SETTINGS
To function properly, this forex indicator must be installed after the ZUP indicator. A source for the ZUP indicator is noted near bottom of this document.
**** VERY IMPORTANT **** TO GET the WRR_ZUP_INFO INDICATOR TO WORK AND TO GET ZUP TO WORK, one must check the box "Allow DLL imports" in the Common Tab of the indicators’ properties ON BOTH INDICATORS. If “Allow DLL imports” is not selected in ZUP, nothing will show up. If “Allow DLL imports” is not checked in WRR_ZUP_INFO, an error message alert will show up and it will not run.
**** VERY IMPORTANT **** Always install ZUP first then WRR_ZUP_INFO after ZUP. This is because WRR_ZUP_INFO needs to read the most current data from ZUP. If one installs WRR_ZUP_INFO first, then its performance will be delayed.
FOREX ALERT SETTINGS
It has 3 different types of forex alerts, one that alerts when ever there is a new pattern (PatternAlertON = true), a second that forex alerts if there is a pattern failure (FailedPatternAlertON = true) , and a third that alerts when the last pattern is removed by ZUP i.e. No Pattern Now (NoPatternAlertON = true) . All alerts can be turned off together with the (AllAlertsOFF = true) setting. On the old version, the alerts would always sound for forex charts with patterns every time the forex indicator was started or the period was changed on the charts. On this version these problems have been reduced.
When I wrote the original version, I placed Global Variables in the ZUP code to make data accessible to my indicator since this seemed like an easier way to code it. However, there are so many new versions of ZUP coming out all the time, this turned into a make work project. So this new version of my indicator detects the triangle and rectangle objects that ZUP draws for the patterns. This indicator should now work with multiple versions of ZUP with no modifications required to the ZUP code, provided the ZUP settings are correct.
ZUP SETTINGS
Following are the current settings I use in ZUP. I don’t know how they all work but at a minimum, the bolded ones should be considered.
extern string ________________0_____________ = "Parameters for ZigZag";
extern int ExtIndicator = 11;//WRR default is 11 for Gartley Patterns
extern int minBars = 8;//this varys slightly on some versions
extern int minSize = 55;//this varys slightly on some versions
// Ïåðåìåííûå îò ZigZag èç ÌÒ
extern int ExtDeviation = 5;
extern int ExtBackstep = 3;
// Ïåðåìåííàÿ äëÿ nen-ZigZag
extern int GrossPeriod = 1440;
//----
extern double minPercent = 0;
extern int ExtPoint=11; // êîëè÷åñòâî òî÷åê çèãçàãà äëÿ çèãçàãà Talex
extern bool ExtStyleZZ = true;
extern string ________________2_____________ = "Parameters for Pesavento Patterns";
extern int ExtPPWithBars = 0;
extern int ExtHidden = 1;
extern int ExtFractal = 7;
extern int ExtFractalEnd = 7;
extern int ExtFiboChoice = 2;
extern bool ExtFiboZigZag = false;
extern double ExtDelta = 0.04;
extern int ExtDeltaType = 2;
extern int ExtSizeTxt = 10;//WWR default 7, try 10
extern color ExtLine = DarkOrange;//WRR default DarkBlue, try DarkOrange
extern color ExtLine886 = LimeGreen;//WWR default Purple, try Yellow
extern color ExtNotFibo = DarkOrange;//WRR default SlateGray, try DarkOrange
extern color ExtPesavento = LimeGreen;
extern color ExtGartley886 = GreenYellow;
color colorPPattern;
The colours one chooses are one’s personal preference. Some say the best patterns are those with the most or all Fibonacci numbers. These are the ones labelled by the ExtGartley886 colour so make sure they stand out. The next best patterns are the ones with the most ExtPesavento numbers.
extern string ________________3_____________ = "Parameters for Gartley Patterns";
extern int maxDepth = 33;
extern int minDepth = 3;
extern bool DirectionOfSearchMaxMin = true;
extern int NumberPattern = 1; //WRR default set for only one pattern
extern int ExtGartleyTypeSearch = 0; //WRR default= 0, 2=historical
extern int ExtHiddenPP = 1;
extern bool ExtGartleyOnOff = false;
//extern int VarDisplay=0;
extern int maxBarToD = 100;//WRR default was = 15, 0=historical, set at 100 so pattern stays visible more bars after it is formed. If this is set too low, then often the pattern will be removed from the chart as soon as it fails and WRR_ZUP_INFO will go from a pattern to No Pattern Now, skipping the FAILED message. This setting is also good to pick up big patterns and ones that are slow to start moving in flat market.
extern bool RangeForPointD = true;
extern color ExtColorRangeForPointD = DarkGrey;//so red candles show up better extern color ExtColorPatterns = Blue;
extern string ExtColorPatternList = "Blue,DarkGreen,Navy,Sienna,MediumBlue,RoyalBlue,DodgerBlue,CornflowerBlue,LightSkyBlue,SlateBlue,MediumSlateBlue,SlateGray,LightSteelBlue";
extern double ExtDeltaGartley = 0.09;
extern double ExtCD = 0.886;
extern string ________________12_____________ = "Common Parameters";
//--------------------------------------
extern color ExtObjectColor = CLR_NONE;
extern int ExtObjectStyle = 1;
extern int ExtObjectWidth = 0;
extern bool ZigZagHighLow = true;
// --------------------------------
// Äîïîëíèòåëüíûå ôèíêöèè
extern bool ExtSendMail = false;
extern bool ExtAlert = false; this setting will alert every time a ZigZag draws a new bar (changes direction). It is too irritating to have it on (true) when the market is flat as it sends too many alerts but it is handy as a tool to signal direction change. It is not necessary to have this alert in ZUP on for the WRR_ZUP_INFO indicator to work.
// Âûâîä îáúåêòîâ â âèäå ôîíà
extern bool ExtBack = true;
// Ñîõðàíåíèå ñòàòè÷åñêèõ âèë Ýíäðþñà, Fibo Time è ò.ä.
extern bool ExtSave = false;
extern bool infoTF = false;//set to true if one wants to see average true range for different chart periods, range numbers and pattern names created by ZUP. These are the same range numbers and pattern names as in WRR_ZUP_INFO. Normally the comments from infoTF don’t show up due to interference with the comments of other indicators or infoTF gets in the way of the comments of other indicators if not set to false.
extern int ExtComplekt = 0;
//===================================
“D” POINT RECTANGLE SETTINGS
The rectangle that ZUP draws with each pattern denotes the price range where the “D” point or entry point of the XABCD pattern is valid or somewhat valid. The indicator determines the high and low value of this rectangle then calculates it’s range and the distance of price from the pattern failure point. The minimum and maximum price range where the pattern is valid is the same information as is available when ZUP is set to show one pattern and the ZUP infoTF switch is turned on.
The code for a "FAILED" pattern is now corrected. Before, if the pattern "failed" a while ago but the price came back into range, ZUP_v67.01_WRR_ZUP_INFO.mq4 would call the pattern valid when it was not.
Trading the Patterns
For entering bullish patterns, the low value of the rectangle range would be the maximum risk or minimum price level where one might want to set a stop. For entering bearish patterns, the high value of the rectangle range would be the maximum risk or maximum price level where one might want to set a stop. If price moves beyond these points then the pattern has failed and the indicator optionally sends an alert. A new bullish pattern can also be used as a signal to exit a short trade and a new bearish pattern can also be used as a signal to exit a long trade.
One may find that Gartley’s on higher timeframes are the most reliable to trade followed by 1.618, 1.272 and 2.618 Butterflies.
I found that the default setting on ZUP for the “D” point rectangle that draws only an outline of the rectangle blocked my view of the wicks on candles. For this reason I added a feature to optionally make the rectangle solid and in the background so that the wicks can always be seen (RetangleInBackground = true). The colour of the rectangle can be changed with this setting (RetangleColour = DarkGray).
FIB EXPANSION SETTINGS ON GARTLEYS
Many Gartley traders agree that a true Gartley pattern must have pattern segment AB equal to CD. Therefore, the indicator will optionally draw a single Fibonacci Expansion line at the 100% expansion level to show where point D should end on a proper Gartley pattern when (ShowABeqCD_FibExpGartley = true). It will remove the single fib line either when the Gartley Pattern fails (RemoveFibExpGartley_if_FAIL = true), or when the Gartley Pattern is not on the chart (RemoveFibExpGartley_if_FAIL = false). The colour of the fib line can be adjusted here: (ABeqCD_FibExpGartleyColour = Red).
SCREEN SHOT SETTINGS
In addition, the indicator will optionally, instantly make a *.gif screenshot of the chart each time the indicator is launched to show what if any pattern was there upon start up and make further screen shots the moment a new pattern forms, fails or is removed by ZUP. I added the screen shot feature to make it easier to debug and understand WRR_ZUP_INFO’s alerting behaviour but it may be useful for some people so I left this code in (ScreenShotWhenPatternChange = false). Make sure one turns screen shots to false when not needed as the screen shot files will take up a lot of space on one’s hard drive with the setting set to true.
Screen shot files are named in the following format:
Currency Pair, Chart Period, date time of the Chart i.e. ChartYYYYMMDD HHMM SS, date time of the local PC i.e. (LocalYYYYMMDD HHMM SS milliseconds), Pattern Name,. For example:
AUDUSD 5M Chart20080613 0559 05 Local20080612 2359 53 632 Bullish Gartley Initially.gif
Note that “Initially” will not show up again in any file names unless MT4 is restarted or the chart is changed.
These files are created in the C:\Program Files\ \experts\files\WRR_ZUP_INFO Screen Shots directory. The “WRR_ZUP_INFO Screen Shots” sub-directory is created automatically by the indicator if it does not already exist.
When (ShowScreenShotsOnLabel_3_ON = true) a label will be drawn on the chart noting that automatic screen shots is turned on. The label will disappear when automatic screen shots is turned off or if the setting is changed to false, but changing ShowScreenShotsOnLabel_3_ON to false does not turn off screen shots – it only turns off the label. The recommended setting is to always leave it as true to help remember to turn off screen shots when not needed.
One can adjust the screen shot gif file picture size by changing the (ScreenShotWidth = 1088) and the (ScreenShotHeight = 612) settings. This is handy if one wants to post smaller screen shots on forums or to get the gif files to fit on your picture viewing software without having to resize or scroll. Smaller numbers make a smaller screen shot. Play around with this to see what is best.
LABEL SETTINGS
Corner = "br", sets which corner of the chart to draw the labels where “tl" = top left, "tr" = top right, "bl" = bottom left and "br" = bottom right.
OffsetTopBottom = 0, adjusts the overall height in points that the labels are from the Corner selected. One may want to set this to 10 if using screen shots with WRR_ZUP_INFO labels set to bottom left corner so the Metaquotes logo is not blocked on the screen shot.
OffsetLeftRight = 0, adjusts the overall distance left or right in points that the labels are from the Corner.
The above two settings allow the labels to be placed anywhere one wants in the window.
FontSize = 10, is the font size for the labels
FontType = "Arial Black", is the font type for the labels.
FontColour = DarkOrange, is the label font colour.
LabelsInBackground = false, sets the labels to over-write other objects.
SpaceBetweenLines = 4, adjusts spacing between lines of text (may need if changing font size).
WindowNumber = 0, main window is zero, indicator windows are 1 through how many are on chart. This allows labels to go in another indicator’s window such as MACD to save space on the main chart. If one turns off the Visualization for say the MACD indicator for the active chart on which one wants the labels, the labels will not be visible.
AllLabelsOFF = false, turns off all labels.
PatternAndFileNameLabel_1_ON = true, turns on Label_1 (the first row of the labels)
DisplayFileNameInLabel_1 = true, turns off the file name of the indicator in label 1.
RiskAndRangeLabel_2_ON = true, turns on Label_2 (the second row of the labels)
ShowScreenShotsON_Label_3 = true, usually leave as true so one knows that Screen Shot is on unless it is in the way. One does not want to forget about Screen Shot being on and have one’s hard drive fill up.
COMMENT SETTING
ShowFileNameInComment = false, turn on or off Standard MT4 title Comment in top left corner of chart. This shows the file name of indicator. Normally leave this set to false so it doesn’t block comments of other indicators.
KNOWN ISSUES
1) Often labels and indicator window charts will not be captured by the automatic screen shot.
2) Sometimes on start up or chart changes while data is loading, alerts for current patterns trigger. You can silence most subsequent alerts on chart changes by cycling through each chart period once after start up.
Anyone who knows how to fix these, please advise.
APPENDIX
I send big thank you to Eugeni Neumoin known as nen, the developer who wrote the ZUP code. It is truly amazing work.
An interview with nen can be found at this link: http://championship.mql4.com/2007/news/219
The Russian forum for the development of the ZUP indicator is found on this thread:
http://onix-trade.net/forum/index.php?s=&showtopic=118&view=findpost&p=220949
One may also find nen's ZUP indicators at the beginning of this thread:
Harmonic Trading
http://www.forex-tsd.com/harmonic-trading/1093-harmonic-trading.html#post10385
Another discussion of harmonic price patterns can be found on this thread:
Price Patterns(Gartley,Butterfly,Bat,...)
http://www.forex-tsd.com/harmonic-trading/885-price-patterns-gartley-butterfly-bat.html
Discussion of the old version of WRR_ZUP_INFO_v02.mq4 (i.e. ZUP_v67.01_WRR_ZUP_INFO.mq4) starts around page 11, post 108 of this thread:
Price Patterns(Gartley,Butterfly,Bat,...)
http://www.forex-tsd.com/harmonic-trading/885-price-patterns-gartley-butterfly-bat-11.html
This new version, WRR_ZUP_INFO_v02.mq4 is found on page 26, post 251 - 254 on this thread.
Price Patterns(Gartley,Butterfly,Bat,...)
http://www.forex-tsd.com/harmonic-trading/885-price-patterns-gartley-butterfly-bat-26.html#post216143
A further discussion of harmonic patterns is found on this thread:
Harmonic Trading
http://www.forex-tsd.com/harmonic-trading/11443-harmonic-zigzags.html
Issued 2008.06.16
Forex Indicator INTRODUCTION
In response to a number of requests, I have re-written my ZUP _ v67.01_WRR _ZUP_INFO.mq4 forex indicator to make it compatible with multiple versions of ZUP for forex trading. I am calling this new indicator WRR_ZUP_INFO_v02.mq4. Following, is a description of what it does and the settings for it.
This forex indicator also needs the ZUP indicator on the chart set up to show Gartley patterns for it to work.
The main purposes for, and features of, the WRR_ZUP_INFO forex indicator are as follows. It will display a text block saying what type of pattern ZUP has made (Gartley, Butterfly, Bat or Crab), if the pattern has “failed,” if there is no pattern, what timeframe or period the chart is on and the chart instrument or pair. The text block also indicates the risk for the forex trade and the range in which the pattern is valid or somewhat valid. The text block can be moved anywhere on any window including forex indicator sub-windows.
It will alert when there is a pattern change. It will draw a 100% fib expansion on Gartleys to show if there is an AB=CD confirmation. It will allow one to change the background property and colours of the D Point Rectangle drawn by ZUP. It will also allow one to forex automatically and instantly make a screen shot every time a new pattern forms, fails or there is no pattern, then save it to a file.
There are a few more adjustments that can be made to the forex indicator, all of which are documented below. The main settings for the forex indicator are noted in green. The other settings for the indicator are noted in blue. Important notes are shown in red.
FOREX INDICATOR COMMON TAB SETTINGS
To function properly, this forex indicator must be installed after the ZUP indicator. A source for the ZUP indicator is noted near bottom of this document.
**** VERY IMPORTANT **** TO GET the WRR_ZUP_INFO INDICATOR TO WORK AND TO GET ZUP TO WORK, one must check the box "Allow DLL imports" in the Common Tab of the indicators’ properties ON BOTH INDICATORS. If “Allow DLL imports” is not selected in ZUP, nothing will show up. If “Allow DLL imports” is not checked in WRR_ZUP_INFO, an error message alert will show up and it will not run.
**** VERY IMPORTANT **** Always install ZUP first then WRR_ZUP_INFO after ZUP. This is because WRR_ZUP_INFO needs to read the most current data from ZUP. If one installs WRR_ZUP_INFO first, then its performance will be delayed.
FOREX ALERT SETTINGS
It has 3 different types of forex alerts, one that alerts when ever there is a new pattern (PatternAlertON = true), a second that forex alerts if there is a pattern failure (FailedPatternAlertON = true) , and a third that alerts when the last pattern is removed by ZUP i.e. No Pattern Now (NoPatternAlertON = true) . All alerts can be turned off together with the (AllAlertsOFF = true) setting. On the old version, the alerts would always sound for forex charts with patterns every time the forex indicator was started or the period was changed on the charts. On this version these problems have been reduced.
When I wrote the original version, I placed Global Variables in the ZUP code to make data accessible to my indicator since this seemed like an easier way to code it. However, there are so many new versions of ZUP coming out all the time, this turned into a make work project. So this new version of my indicator detects the triangle and rectangle objects that ZUP draws for the patterns. This indicator should now work with multiple versions of ZUP with no modifications required to the ZUP code, provided the ZUP settings are correct.
ZUP SETTINGS
Following are the current settings I use in ZUP. I don’t know how they all work but at a minimum, the bolded ones should be considered.
extern string ________________0_____________ = "Parameters for ZigZag";
extern int ExtIndicator = 11;//WRR default is 11 for Gartley Patterns
extern int minBars = 8;//this varys slightly on some versions
extern int minSize = 55;//this varys slightly on some versions
// Ïåðåìåííûå îò ZigZag èç ÌÒ
extern int ExtDeviation = 5;
extern int ExtBackstep = 3;
// Ïåðåìåííàÿ äëÿ nen-ZigZag
extern int GrossPeriod = 1440;
//----
extern double minPercent = 0;
extern int ExtPoint=11; // êîëè÷åñòâî òî÷åê çèãçàãà äëÿ çèãçàãà Talex
extern bool ExtStyleZZ = true;
extern string ________________2_____________ = "Parameters for Pesavento Patterns";
extern int ExtPPWithBars = 0;
extern int ExtHidden = 1;
extern int ExtFractal = 7;
extern int ExtFractalEnd = 7;
extern int ExtFiboChoice = 2;
extern bool ExtFiboZigZag = false;
extern double ExtDelta = 0.04;
extern int ExtDeltaType = 2;
extern int ExtSizeTxt = 10;//WWR default 7, try 10
extern color ExtLine = DarkOrange;//WRR default DarkBlue, try DarkOrange
extern color ExtLine886 = LimeGreen;//WWR default Purple, try Yellow
extern color ExtNotFibo = DarkOrange;//WRR default SlateGray, try DarkOrange
extern color ExtPesavento = LimeGreen;
extern color ExtGartley886 = GreenYellow;
color colorPPattern;
The colours one chooses are one’s personal preference. Some say the best patterns are those with the most or all Fibonacci numbers. These are the ones labelled by the ExtGartley886 colour so make sure they stand out. The next best patterns are the ones with the most ExtPesavento numbers.
extern string ________________3_____________ = "Parameters for Gartley Patterns";
extern int maxDepth = 33;
extern int minDepth = 3;
extern bool DirectionOfSearchMaxMin = true;
extern int NumberPattern = 1; //WRR default set for only one pattern
extern int ExtGartleyTypeSearch = 0; //WRR default= 0, 2=historical
extern int ExtHiddenPP = 1;
extern bool ExtGartleyOnOff = false;
//extern int VarDisplay=0;
extern int maxBarToD = 100;//WRR default was = 15, 0=historical, set at 100 so pattern stays visible more bars after it is formed. If this is set too low, then often the pattern will be removed from the chart as soon as it fails and WRR_ZUP_INFO will go from a pattern to No Pattern Now, skipping the FAILED message. This setting is also good to pick up big patterns and ones that are slow to start moving in flat market.
extern bool RangeForPointD = true;
extern color ExtColorRangeForPointD = DarkGrey;//so red candles show up better extern color ExtColorPatterns = Blue;
extern string ExtColorPatternList = "Blue,DarkGreen,Navy,Sienna,MediumBlue,RoyalBlue,DodgerBlue,CornflowerBlue,LightSkyBlue,SlateBlue,MediumSlateBlue,SlateGray,LightSteelBlue";
extern double ExtDeltaGartley = 0.09;
extern double ExtCD = 0.886;
extern string ________________12_____________ = "Common Parameters";
//--------------------------------------
extern color ExtObjectColor = CLR_NONE;
extern int ExtObjectStyle = 1;
extern int ExtObjectWidth = 0;
extern bool ZigZagHighLow = true;
// --------------------------------
// Äîïîëíèòåëüíûå ôèíêöèè
extern bool ExtSendMail = false;
extern bool ExtAlert = false; this setting will alert every time a ZigZag draws a new bar (changes direction). It is too irritating to have it on (true) when the market is flat as it sends too many alerts but it is handy as a tool to signal direction change. It is not necessary to have this alert in ZUP on for the WRR_ZUP_INFO indicator to work.
// Âûâîä îáúåêòîâ â âèäå ôîíà
extern bool ExtBack = true;
// Ñîõðàíåíèå ñòàòè÷åñêèõ âèë Ýíäðþñà, Fibo Time è ò.ä.
extern bool ExtSave = false;
extern bool infoTF = false;//set to true if one wants to see average true range for different chart periods, range numbers and pattern names created by ZUP. These are the same range numbers and pattern names as in WRR_ZUP_INFO. Normally the comments from infoTF don’t show up due to interference with the comments of other indicators or infoTF gets in the way of the comments of other indicators if not set to false.
extern int ExtComplekt = 0;
//===================================
“D” POINT RECTANGLE SETTINGS
The rectangle that ZUP draws with each pattern denotes the price range where the “D” point or entry point of the XABCD pattern is valid or somewhat valid. The indicator determines the high and low value of this rectangle then calculates it’s range and the distance of price from the pattern failure point. The minimum and maximum price range where the pattern is valid is the same information as is available when ZUP is set to show one pattern and the ZUP infoTF switch is turned on.
The code for a "FAILED" pattern is now corrected. Before, if the pattern "failed" a while ago but the price came back into range, ZUP_v67.01_WRR_ZUP_INFO.mq4 would call the pattern valid when it was not.
Trading the Patterns
For entering bullish patterns, the low value of the rectangle range would be the maximum risk or minimum price level where one might want to set a stop. For entering bearish patterns, the high value of the rectangle range would be the maximum risk or maximum price level where one might want to set a stop. If price moves beyond these points then the pattern has failed and the indicator optionally sends an alert. A new bullish pattern can also be used as a signal to exit a short trade and a new bearish pattern can also be used as a signal to exit a long trade.
One may find that Gartley’s on higher timeframes are the most reliable to trade followed by 1.618, 1.272 and 2.618 Butterflies.
I found that the default setting on ZUP for the “D” point rectangle that draws only an outline of the rectangle blocked my view of the wicks on candles. For this reason I added a feature to optionally make the rectangle solid and in the background so that the wicks can always be seen (RetangleInBackground = true). The colour of the rectangle can be changed with this setting (RetangleColour = DarkGray).
FIB EXPANSION SETTINGS ON GARTLEYS
Many Gartley traders agree that a true Gartley pattern must have pattern segment AB equal to CD. Therefore, the indicator will optionally draw a single Fibonacci Expansion line at the 100% expansion level to show where point D should end on a proper Gartley pattern when (ShowABeqCD_FibExpGartley = true). It will remove the single fib line either when the Gartley Pattern fails (RemoveFibExpGartley_if_FAIL = true), or when the Gartley Pattern is not on the chart (RemoveFibExpGartley_if_FAIL = false). The colour of the fib line can be adjusted here: (ABeqCD_FibExpGartleyColour = Red).
SCREEN SHOT SETTINGS
In addition, the indicator will optionally, instantly make a *.gif screenshot of the chart each time the indicator is launched to show what if any pattern was there upon start up and make further screen shots the moment a new pattern forms, fails or is removed by ZUP. I added the screen shot feature to make it easier to debug and understand WRR_ZUP_INFO’s alerting behaviour but it may be useful for some people so I left this code in (ScreenShotWhenPatternChange = false). Make sure one turns screen shots to false when not needed as the screen shot files will take up a lot of space on one’s hard drive with the setting set to true.
Screen shot files are named in the following format:
Currency Pair, Chart Period, date time of the Chart i.e. ChartYYYYMMDD HHMM SS, date time of the local PC i.e. (LocalYYYYMMDD HHMM SS milliseconds), Pattern Name,
AUDUSD 5M Chart20080613 0559 05 Local20080612 2359 53 632 Bullish Gartley Initially.gif
Note that “Initially” will not show up again in any file names unless MT4 is restarted or the chart is changed.
These files are created in the C:\Program Files\
When (ShowScreenShotsOnLabel_3_ON = true) a label will be drawn on the chart noting that automatic screen shots is turned on. The label will disappear when automatic screen shots is turned off or if the setting is changed to false, but changing ShowScreenShotsOnLabel_3_ON to false does not turn off screen shots – it only turns off the label. The recommended setting is to always leave it as true to help remember to turn off screen shots when not needed.
One can adjust the screen shot gif file picture size by changing the (ScreenShotWidth = 1088) and the (ScreenShotHeight = 612) settings. This is handy if one wants to post smaller screen shots on forums or to get the gif files to fit on your picture viewing software without having to resize or scroll. Smaller numbers make a smaller screen shot. Play around with this to see what is best.
LABEL SETTINGS
Corner = "br", sets which corner of the chart to draw the labels where “tl" = top left, "tr" = top right, "bl" = bottom left and "br" = bottom right.
OffsetTopBottom = 0, adjusts the overall height in points that the labels are from the Corner selected. One may want to set this to 10 if using screen shots with WRR_ZUP_INFO labels set to bottom left corner so the Metaquotes logo is not blocked on the screen shot.
OffsetLeftRight = 0, adjusts the overall distance left or right in points that the labels are from the Corner.
The above two settings allow the labels to be placed anywhere one wants in the window.
FontSize = 10, is the font size for the labels
FontType = "Arial Black", is the font type for the labels.
FontColour = DarkOrange, is the label font colour.
LabelsInBackground = false, sets the labels to over-write other objects.
SpaceBetweenLines = 4, adjusts spacing between lines of text (may need if changing font size).
WindowNumber = 0, main window is zero, indicator windows are 1 through how many are on chart. This allows labels to go in another indicator’s window such as MACD to save space on the main chart. If one turns off the Visualization for say the MACD indicator for the active chart on which one wants the labels, the labels will not be visible.
AllLabelsOFF = false, turns off all labels.
PatternAndFileNameLabel_1_ON = true, turns on Label_1 (the first row of the labels)
DisplayFileNameInLabel_1 = true, turns off the file name of the indicator in label 1.
RiskAndRangeLabel_2_ON = true, turns on Label_2 (the second row of the labels)
ShowScreenShotsON_Label_3 = true, usually leave as true so one knows that Screen Shot is on unless it is in the way. One does not want to forget about Screen Shot being on and have one’s hard drive fill up.
COMMENT SETTING
ShowFileNameInComment = false, turn on or off Standard MT4 title Comment in top left corner of chart. This shows the file name of indicator. Normally leave this set to false so it doesn’t block comments of other indicators.
KNOWN ISSUES
1) Often labels and indicator window charts will not be captured by the automatic screen shot.
2) Sometimes on start up or chart changes while data is loading, alerts for current patterns trigger. You can silence most subsequent alerts on chart changes by cycling through each chart period once after start up.
Anyone who knows how to fix these, please advise.
APPENDIX
I send big thank you to Eugeni Neumoin known as nen, the developer who wrote the ZUP code. It is truly amazing work.
An interview with nen can be found at this link: http://championship.mql4.com/2007/news/219
The Russian forum for the development of the ZUP indicator is found on this thread:
http://onix-trade.net/forum/index.php?s=&showtopic=118&view=findpost&p=220949
One may also find nen's ZUP indicators at the beginning of this thread:
Harmonic Trading
http://www.forex-tsd.com/harmonic-trading/1093-harmonic-trading.html#post10385
Another discussion of harmonic price patterns can be found on this thread:
Price Patterns(Gartley,Butterfly,Bat,...)
http://www.forex-tsd.com/harmonic-trading/885-price-patterns-gartley-butterfly-bat.html
Discussion of the old version of WRR_ZUP_INFO_v02.mq4 (i.e. ZUP_v67.01_WRR_ZUP_INFO.mq4) starts around page 11, post 108 of this thread:
Price Patterns(Gartley,Butterfly,Bat,...)
http://www.forex-tsd.com/harmonic-trading/885-price-patterns-gartley-butterfly-bat-11.html
This new version, WRR_ZUP_INFO_v02.mq4 is found on page 26, post 251 - 254 on this thread.
Price Patterns(Gartley,Butterfly,Bat,...)
http://www.forex-tsd.com/harmonic-trading/885-price-patterns-gartley-butterfly-bat-26.html#post216143
A further discussion of harmonic patterns is found on this thread:
Harmonic Trading
http://www.forex-tsd.com/harmonic-trading/11443-harmonic-zigzags.html
Wednesday, October 8, 2008
How to tell forex trading Experts from forex Indicators
There is no file extension to distinguish between and forex trading Expert or forex Indicator. If you are not sure what you have, they you have to look at the code in MetaEditor. At the top of the code in MOST Experts there will be code such as Lots, Stop Loss, Take Profit, these would be Experts. Most MT4 forex indicators with say Custom forex Indicator in the code, and MT3 forex indicators with have things such as Separate Window, First Color, Draw Type and things of that nature. I can not code a single thing, but I can read. Some forex trading Experts have a wealth of information written inside the code for easy understanding.
When you drag the forex trading Expert from the forex Expert Advisors folder in MetaTrader to the chart and let if go, that is when a pop up window should show up. On the common tab will be a box that says allow live forex trading, check it. Inputs tab will be to make changes to the code if it's allowed. Then click ok. Forex Indicators taken from the Custom forex Indicators folder of MetaTrader will have a popup window as well, but no live forex trading. Just a list of settings, click ok and it should run.
If it's not, I would probably remove the forex Expert or forex Indicator from MetaTrader and try it again. I could be they are just in the wrong folders. Open the code to determine what it is, place it in the appropriate folder, compile it in that folder and start MetaTrader. From the Navigator menu, open forex Expert Advisors, drag the forex EA to the chart you want to run on and let it go, on the comon tab from the popup, click allow live forex trading and it should work. If it's an forex Indicator, it will be in the Navigator Menu under Custom forex Indicators.
How to add a Magic Number to a FOREX AUTOPILOT EA
When you drag the forex trading Expert from the forex Expert Advisors folder in MetaTrader to the chart and let if go, that is when a pop up window should show up. On the common tab will be a box that says allow live forex trading, check it. Inputs tab will be to make changes to the code if it's allowed. Then click ok. Forex Indicators taken from the Custom forex Indicators folder of MetaTrader will have a popup window as well, but no live forex trading. Just a list of settings, click ok and it should run.
If it's not, I would probably remove the forex Expert or forex Indicator from MetaTrader and try it again. I could be they are just in the wrong folders. Open the code to determine what it is, place it in the appropriate folder, compile it in that folder and start MetaTrader. From the Navigator menu, open forex Expert Advisors, drag the forex EA to the chart you want to run on and let it go, on the comon tab from the popup, click allow live forex trading and it should work. If it's an forex Indicator, it will be in the Navigator Menu under Custom forex Indicators.
How to add a Magic Number to a FOREX AUTOPILOT EA
Tuesday, October 7, 2008
MACD Forex Indicator

Not So Average The Moving Average Convergence Divergence (MACD) forex Indicator
Stocks and indices trend higher and trend lower on a short-, intermediate- and long-term scale. However, trends are composed of a period of backing and filling. This step-like action produces “mini” trends within the bigger picture. Savvy traders can exploit these smaller-scale trends for profit, and one of the best tools for this is an indicator called the Moving Average Convergence Divergence (MACD).
The MACD was developed by Gerald Appel, and is one of the simplest, most reliable indicators available for all types of forex traders. The forex indicator uses moving averages, which are essentially lagging forex indicators, to include some trend-following characteristics. These lagging indicators are converted into a momentum oscillator by subtracting the longer moving average from the shorter moving average. The result is a line that oscillates above and below zero, without any upper or lower limits. Like many forex indicators we use, it is a centered oscillator, meaning that it will always gravitate toward the center line when the forex trend is reversing.
To completely understand the MACD, one needs to recognize that the relationship between the fast line and the slow line is critical. On a standard forex MACD, the fast line results from the difference between the 26-day exponential moving average (EMA) of the closing prices subtracted from the 12-day EMA of the closing prices, giving the calculation for the fast line. Further, the slow signal is a moving average of the fast line. You can determine the slow forex signal by calculating the nine-day EMA of the fast line. The calculation for the fast line is 12 and 26 days, or if you’re forex trading on a longer-term scale, weeks. But, you will find that all forex software programs available will use days rather than weeks. The defaults are easily changed if the technician wishes to changes the time period. Appel and others have tinkered with these original settings to come up with a MACD that is better suited for faster or slower securities. Using shorter moving averages will produce a quicker, more responsive indicator, while using longer moving averages will produce a slower indicator, less prone to whipsaws. For our purposes in this article, the traditional 12/26 MACD will be used for explanations.
If you’d like to study the advanced uses, there are many books on the subject.
The slow period is always a nine-day or one-week period. The two EMAs will tend to cross over each other from time to time, signaling buy and sell action. It is clearly understood that crossovers will signal the beginning and the end of both up trends and down trends. Much has been written about the centerline of the MACD being the key to the strength, as we will see when we go to some examples. When the crossover occurs, whether indicating a buy signal or a sell signal, knowing where it happens in relationship to the center line is going to determine just how powerful the movement is going to be.
The slow period is always a nine-day or one-week period. The two EMAs will tend to cross over each other from time to time, signaling buy and sell action. It is clearly understood that crossovers will signal the beginning and the end of both up trends and down trends. Much has been written about the centerline of the MACD being the key to the strength, as we will see when we go to some examples. When the crossover occurs, whether indicating a buy signal or a sell signal, knowing where it happens in relationship to the center line is going to determine just how powerful the movement is going to be.
A positive MACD indicates that the 12-day EMA is trading above the 26-day EMA. A negative MACD indicates that the 12-day EMA is trading below the 26-day EMA. If MACD is positive and rising, then the gap between the 12-day EMA and the 26-day EMA is broadening. The interpretation of that is the rate of change of the faster moving average is higher than the rate of change for the slower moving average. Positive momentum is escalating and this would be considered bullish. If MACD is negative and declining further, then the negative opening between the faster moving average and the slower is getting bigger. Downward momentum is “snowballing” and this would be considered bearish for the stock or index. MACD centerline crossovers occur when the faster moving average crosses the slower moving average.
Now that we’ve covered the mathematical side of the MACD, let’s take a look at the art of interpreting the indicator. There are three common methods for making investment decisions with the MACD:
I. Crossovers – As we touched on above, when the MACD falls below the signal line, it is a signal to sell. When the MACD rises above the signal line, it is a signal to buy.
II. Divergences - When a security or index diverges from the MACD indicator, it often signals the end of the current trend.
III. Overbought/Oversold - When the MACD rises dramatically (i.e. the shorter moving average gets extended away from longer-term moving average), it is a signal the security is overbought and will soon return to normal levels.
Let’s take a look at a few examples. These examples are primarily showing the first method of interpretation (the crossovers). However, the other two are easily applied.
Our first example is a daily chart for Goldman Sachs (GS). During this time frame, GS had been in a down trend. It transitioned and then moved into an up trend. I’ve drawn red and green vertical lines on the chart to show you where you would have bought (green lines) and sold (red lines) the stock simply on the MACD crossovers. In this instance, the MACD was hitting the ball out of the park. During the transition period, you made significant gains to the upside without taking on the risk of the significant corrections. In fact, I’d venture to say you outperformed the stock if you had bought and held it and you outperformed the buy-and-hold strategy with less risk. Keep in mind that the most powerful signals, and thus the most valid signals, are given when the stock is the most extended away from the center line. Thus, crossovers in any place are valid buy-and-sell signals, but the “best” signals are the ones given further from the zero line.
Let me clarify that the forex MACD is represented in two ways on this chart. First, it’s showing the general line crossovers via the red and blue lines. Second, there is a pink MACD Histogram showing you the buy and sell signals. Both give the exact same signals. However, the histogram gives buy and sell signals as it crosses the mid line. Again, they both give the exact same signals, but read a tad differently.
Next, let’s take a look at the longer-term picture of the market as we transitioned from a bear to a bull market in late 2002. The chart below is a weekly chart for the S&P 500. For longer-term traders who want to do less trading and simply position trade, using weekly charts is an ideal scenario. In the example below, the market only gave six trade signals over a period of three years. The first three signals were pretty much whipsaws in both directions. However, the last three gave significant returns and, again, offered the investor much less risk. The MACD got you in the market while it was trending higher and kept you out during corrective phases.
The MACD is an indicator that will help all chartists in their trend analysis and assist you with your ability to get in and out of situations in which it may be tempting to remain in the hopes that fortunes may turn around. I have found the indicator to be particularly effective when you come across stocks that are transitioning from down to up trends.
Finally, as I always preach to you, no indicator is an “end-all” by itself. The MACD is going to be much more effective for you if you attach a solid “internals” indicator like Money Flow or (my favorite) On-balance Volume. Remember, you have a number of tools in your toolbox and you shouldn’t be afraid to use them in combinations.
Subscribe to:
Posts (Atom)