AIS1 Advanced Indicator Modification: 10323 Release date: 2009.04.05 Instruction Content 1. Introduction 2. Installation 3. Control 4. Properties 5. Conclusion 1. Introduction 1.1. AIS1 Advanced Indicator is MQL4 program for MetaTrader 4 Client Terminal. 1.2. AIS1 Advanced Indicator displays extended data set of AIS1 Trading Robot: 1.2.1. line metrics; 1.2.2. market orders trading levels; 1.2.3. standard and synthetic timeframes; 1.2.4. price volatility meter. 2. Installation 2.1. AIS1 Advanced Indicator has following filenames: 2.1.1. "AIS1AI.MQ4" is name of MQL4 code file; 2.1.2. "AIS1AI.EX4" is name of executable file. 2.2. Download "AIS1AI.MQ4" file. 2.3. Find MetaTrader 4 Client Terminal directory that thereafter is denoted "%MT4%". 2.4. In most cases MetaTrader 4 Client Terminal directory is "C:/Program Files/MetaTrader 4". 2.5. Copy "AIS1AI.MQ4" file to "%MT4%/experts/indicators" directory. 2.6. Run MetaTrader 4 Client Terminal that thereafter is denoted "MetaTrader". 2.7. Press to run MetaEditor. 2.8. In MetaEditor press to view "Open" dialog box. 2.9. Open "AIS1AI.MQ4" file in "%MT4%/experts/indicators" directory. 2.10. Inspect modification in line 7. 2.11. Inspect release date in line 8. 2.12. Press to compile code. 2.13. Press to return in MetaTrader. 2.14. In MetaTrader press to view "Navigator" window. 2.15. Select "Common" tab of "Navigator" window. 2.16. Open "Custon indicators" list. 2.17. Find "AIS1AI" item. 2.18. "AIS1AI" is short name of "AIS1AI.EX4" executable file. 2.19. Drag-and-drop "AIS1AI" on the chart. 2.20. "Custom indicator - AIS1AI" will appear. 2.21. In "Custom indicator - AIS1AI" window: 2.21.1. in "Common" tab let all options be as is; 2.21.2. in "Colors" tab let all options be as is; 2.21.3. in "Visualization" tab set "All timeframes"="On" and "Show in Data Window"="On". 2.22. Push [OK] button of "Custom indicator - AIS1AI" window. 2.23. Label "AIS10323 Advanced Indicator" and color objects will appear on the chart. 2.24. Installation has been completed. 3. Control 3.1. In MetaTrader press to view "Global Variables" window. 3.2. There are 9 items: 3.2.1. "AIS10323.Setup.1.1.OrderLevels" controls open orders trading levels plotting; 3.2.2. "AIS10323.Setup.1.2.Metrics" controls line metrics plotting; 3.2.3. "AIS10323.Setup.1.3.ChartFrames" controls standard timeframes of the chart plotting; 3.2.4. "AIS10323.Setup.1.4.SynthFrames" controls synthetic timeframes plotting; 3.2.5. "AIS10323.Setup.2.1.SynthSize" defines size of synthetic timeframes; 3.2.6. "AIS10323.Setup.3.1.HorizonBars" defines time horizon as number of bars; 3.2.7. "AIS10323.Setup.3.2.HorizonSynths" defines time horizon as number of synthetic timeframes; 3.2.8. "AIS10323.Setup.3.3.HorizonDate" defines left edge of time horizon in "YYYYMMDD" format; 3.2.9. "AIS10323.Setup.3.4.HorizonHour" defines precise time of left edge of time horizon in "HHMM" format. 3.3. "Time horizon" means time interval between left and right edges of time horizon. 3.4. Right edge of time horizon is opening time of first bar from right edge of the chart. 3.5. Left edge of time horizon is: 3.5.1. left edge of the chart, if values of all items pp.3.2.6-3.1.8 are equal to "0"; 3.5.2. opening time of timeframe number "AIS10323.Setup.3.1.HorizonBars" if that number is greater than "0"; 3.5.3. opening time of synthetic timeframe number "AIS10323.Setup.3.2.HorizonSynths if: 3.5.3.1. "AIS10323.Setup.3.1.HorizonBars" = "0", 3.5.3.2. "AIS10323.Setup.3.2.HorizonSynths" > "0"; 3.5.4. opening time of nearest to "AIS10323.Setup.3.3.HorizonDate" bar if: 3.5.4.1. "AIS10323.Setup.3.1.HorizonBars" = "0", 3.5.4.2. "AIS10323.Setup.3.2.HorizonSynths" = "0", 3.5.4.3. "AIS10323.Setup.3.3.HorizonDate" > "0". 3.6. Value "AIS10323.Setup.3.4.HorizonHour" defines precise time of left edge of time horizon if: 3.5.5.1. "AIS10323.Setup.3.1.HorizonBars" = "0", 3.5.5.2. "AIS10323.Setup.3.2.HorizonSynths" = "0", 3.5.5.3. "AIS10323.Setup.3.3.HorizonDate" > "0". 3.7. "Timeframe" and "bar" are synonyms, term "bar" is used for standard timeframes of the chart only. 3.8. Value of "AIS10323.Setup.SynthSize" defines size of synthetic timeframes; allowed ones are: 3.8.1. 1, 3.8.2. 5, 3.8.3. 15, 3.8.4. 30, 3.8.5. 60, 3.8.6. 240, 3.8.7. 1440, 3.8.8. 10080, 3.8.9. 43200. 3.9. Size of timeframes is measured in 1 minute timeframes. 3.10. Value "1" of control items p.4.2.2-4.2.4. enables plotting. 3.11. Value "0" of control items p.4.2.2-4.2.4. disables plotting. 3.12. Values of "AIS10323.Setup.OrderLevels" mean: 3.12.1. "0" - enable all open orders trading levels plotting; 3.12.2. negative values - disable trading levels plotting; 3.12.3. positive values - enbale trading levels plotting for orders with specified "magic" number. 4. Properties 4.1. AIS1 Advanced Indicator is a multipurpose tool. 4.2. There are four groups of displayed data: 4.2.1. line metrics; 4.2.2. market orders trading levels; 4.2.3. standard and synthetic timeframes; 4.2.4. price volatility meter. 4.3. Line metrics display important price levels and time points of the chart inside the time horizon. 4.4. Market orders trading levels feature displays take-profit levels with green making indication more informative. 4.5. Standard timeframes of the chart are displayed in real width for "Ask" and "Bid" prices separately. 4.6. Synthetic "Highest Ask - Lowest Bid" timeframes is useful feature for higher timeframes monitoring. 4.7. Price volatility meter at the top of the chart indicates: 4.7.1. "Ask" and "Bid" timeframes overlap size; 4.7.2. average value of the overlaps; 4.7.3. maximum price volatility in standard timeframes of the chart. 4.8. AIS1 Advanced Indicator displays 19 line metrics: 4.8.1. 4 time points; 4.8.2. 10 price levels; 4.8.3. 5 trend lines. 4.9. Time points are displayed as vertical lines: 4.9.1. current time, green dotted line in the right side of the chart; 4.9.2. extreme observable time, green dotted line at the left edge of the chart; 4.9.3. time of maximal price of the chart, light blue dotted line; 4.9.4. time of minimal price of the chart, orange dotted line; 4.10. Price levels are displayed as horizontal lines: 4.10.1. "Ask", blue line; 4.10.2. "Bid", red line; 4.10.3. upper stop-level limit, thin green line above "Ask"; 4.10.4. lower stop-level limit, thin green line below Bid"; 4.10.5. upper bound of margin level, bold green line above "Ask"; 4.10.6. lower bound of margin level, bold green line below Bid"; 4.10.7. global extremum, maximal price of the chart, light blue dotted line at the top of the chart; 4.10.8. global extremum, minimal price of the chart, orange dotted line at the bottom of the chart; 4.10.9. price of first "zero-extremum"; 4.10.10. price of second "zero-extremum". 4.11. Distance between margin level bounds indicates margin size of the trade in points. 4.12. If nearest global extremum is maximum then: 4.12.1. first "zero-extremum" means local minimum between global maximum and current time; 4.12.2. second "zero-extremum" means local maximum between first "zero-extremum" and current time. 4.13. If nearest global extremum is minimum then: 4.12.1. first "zero-extremum" means local maximum between global minimum and current time; 4.12.2. second "zero-extremum" means local minimum between first "zero-extremum" and current time. 4.14. "Nearest" means nearest to the current time of the chart. 4.15. Price levels of "zero-extremums" are displayed as: 4.15.1. orange dotten lines if nearest global extremum if maximum; 4.15.2. light blue dotted lines if nearest global extremum if minimum. 4.16. Price levels are signed with 4 text labels in the right side of the chart: 4.16.1. label "Ask/Bid" is yellow text below "Bid"; 4.16.2. label "Spread/Stop/Margin" is yellow text below lower bound of margin level; 4.16.3. label "Maximum Distance/Interval" is orange text below maximal price line; 4.16.4. label "Minimum Distance/Interval" is light blue text below minimal price line. 4.17. Label "Ask/Bid" indicates current "Ask" and "Bid" prices. 4.18. Label "Spread/Stop/Margin" indicates: 4.18.1. current spread in points; 4.18.2. current minimal stop-level in points; 4.18.3. current margin size in points. 4.19. Label "Maximum Distance/Interval" indicates: 4.19.1. distance between maximal price of the chart and current "Ask" in points; 4.19.2. time interval between time of maximal price of the chart and current time in days and hours. 4.20. Label "Minimum Distance/Interval" indicates: 4.20.1. distance between minimal price of the chart and current "Bid" in points; 4.20.2. time interval between time of minimal price of the chart and current time in days and hours. 4.21. Trend lines are displayed as light blue and orange dotted lines: 4.21.1. "supertrend", line between farest global extremum and current average price; 4.21.2. "zero-trend", line between nearest global extremum and current average price; 4.21.3. "maximum-minimum trend", line between maximal and minimal price points of the chart; 4.21.4. "zero-maximum trend", line between nearest global extremum and local maximum; 4.21.5. "zero-minimum trend", line between nearest global extremum and local minimum. 4.22. Ascendant trend lines are displayed as light blue dotted lines. 4.23. Descendant trend lines are displayed as orange dotted lines. 4.24. "Current average price" means arithmetic average of "Ask" and "Bid". 4.25. "Maximum-minimum trend" is signed with 3 text labels: 4.25.1. light blue label of maximum point indicates maximal price of the chart; 4.25.2. orange label of minimum point indicates minimal price of the chart; 4.25.3. label "Max-min Distance/Interval" indicates : 4.25.3.1. distance between maximal and minimal prices of the chart in points; 4.25.3.2. time interval between time of maximal and minimal price of the chart in days and hours. 4.26. Label "Max-min Distance/Interval" is displayed at the time point of nearest global extremum: 4.26.1. with light blue below line of minimal price, if nearest global extremum is maximum; 4.26.2. with orange below line of maximal price, if nearest global extremum is minimum. 4.27. Market orders trading levels are displayed as dashed lines: 4.27.1. white - order open price; 4.27.2. green - take-profit price; 4.27.3. red - stop-loss price. 4.28. Market orders trading levels are signed with text labels "magic/ticket". 4.29. Standard timeframes of the chart are displayed in real width for "Ask" and "Bid" prices separately. 4.30. "Ask" timeframes are displayed as green rectangles. 4.31. "Bid" timeframes are displayed as red rectangles. 4.32. "Ask" timeframes are built from "Bid" by vertical shift of "Spread" value. 4.33. "Spread" value is equal to: 4.33.1. current difference "Ask-Bid" for timeframe number "zero"; 4.33.2. difference "Ask-Bid" at the moment of indicator total redraw for other timeframes. 4.34. Timeframes are enumerated from right to left. 4.35. Current formed timeframe has number "zero". 4.36. Timeframe number "zero" is redrawed on each tick. 4.37. Indicatot is totally redrawed on next tick after any of following events: 4.37.1. new timeframe begin; 4.37.2. size of synthetic timeframes change; 4.37.3. horizontal scale of the chart change; 4.37.4. vertical scale of the chart change; 4.37.5. right shift of the chart change; 4.37.6. chart scrolling; 4.37.7. indicator reload. 4.38. Area of "Ask" and "Bid" timeframes overlapping has different color depending on background color. 4.39. Synthetic "Highest Ask - Lowest Bid" higher timeframes are displayed over standard ones with white. 4.40. Synthetic "Highest Ask - Lowest Bid" are result of concatenation: 4.40.1. higher "Ask" timeframes; 4.40.2. higher "Bid" timeframes. 4.41. Synthetic and standard timeframes are built and redrawed with the same rules. 4.42. Inside higher timeframes 4 white lines are displayed: 4.42.1. dotted line of average "Ask" price, that is "(High-Low)/2" for "Ask" timeframes; 4.42.2. dotted line of average "Bid" price, that is "(High-Low)/2" for "Bid" timeframes; 4.42.3. dashed line "Open Ask - Close Ask"; 4.42.4. dashed line "Open Bid - Close Bid". 4.43. At the top of the chart is text label "AIS10323 Advanced Indicator". 4.44. This label has extension that indicates: 4.44.1. vertical size of the chart in points; 4.44.2. standard timeframe number on the right edge of the chart; 4.44.3. standard timeframe number on the left edge of the chart; 4.44.4. quantity of standard timeframes on the chart; 4.44.5. size of standard timeframes; 4.44.6. quantity of synthetic timeframes on the chart; 4.44.7. size of synthetic timeframes. 4.45. At the bottom of the chart below the minimal price line is label with time horizon metrics: 4.45.1. left edge of time horizon; 4.45.2. right edge of time horizon; 4.45.3. time interval between left and right edges of time horizon; 4.45.4. standard timeframe number on the right edge of time horizon; 4.45.5. standard timeframe number on the left edge of time horizon; 4.45.6. quantity of standard timeframes inside time horizon. 4.46. Price volatility meter is at the top of the chart. 4.47. Price volatility meter indicates: 4.47.1. "Ask" and "Bid" timeframes overlap size as grey rectangles; 4.47.2. average value of the overlaps as white line; 4.47.3. maximum price volatility in standard timeframes of the chart as white dotted line; 4.47.4. four white text labels in the right side of the top; 4.47.5. three white text labels below the line of p.4.47.2. 4.48. First label in right cluster of price volatility meter indicates: 4.48.1. average, inside time horizon, overlap of standard timeframes in points; 4.48.2. average, inside time horizon, volume of standard timeframes; 4.48.3. average overlap to average volume ratio. 4.49. Second label of price volatility meter indicates: 4.49.1. absolute length of standard timeframe number "zero"; 4.49.2. overlap of standard timeframe number "zero"; 4.49.3. volume of standard timeframe number "zero"; 4.49.4. overlap to volume ratio of standard timeframe number "zero". 4.50. Third label of price volatility meter indicates: 4.50.1. relative length of standard timeframe number "zero"; 4.50.2. overlap of standard timeframe number "zero" to average overlap ratio; 4.50.3. overlap of standard timeframe number "zero" to largest overlap ratio; 4.50.4. volume of standard timeframe number "zero" to average volume ratio; 4.50.5. volume of standard timeframe number "zero" to largest volume ratio. 4.51. Fourth label of price volatility meter indicates: 4.51.1. largest, inside time horizon, overlap of standard timeframes in points; 4.51.2. largest, inside time horizon, volume of standard timeframes; 4.51.3. largest overlap to largest volume ratio. 4.52. Three labels below line of p.4.47.2 indicates: 4.52.1. left label: 4.52.1.1. sum of overlaps inside "supertrend" time interval, 4.52.1.2. "supertrend" height to value of p.4.52.1.1 ratio; 4.52.2. central label: 4.52.2.1. sum of overlaps inside "maximum-minimum trend" time interval, 4.52.2.2. "maximum-minimum trend" height to value of p.4.52.2.1 ratio; 4.52.3. right label: 4.52.3.1. sum of overlaps inside "zero-trend" time interval, 4.52.3.2. "zero-trend" height to value of p.4.52.3.1 ratio. 5. Conclusion 5.1. To remove AIS1 Advanced Indicator from the chart: 5.1.1. press to view "Indicators on the chart" window; 5.1.2. open "Main chart" list; 5.1.3. select "AIS1AI" item; 5.1.4. push [Delete] button of "Indicators on the chart" window; 5.1.5. push [Close] button of "Indicators on the chart" window; 5.1.6. label "AIS10323 Advanced Indicator" and indicator objects will disappear. 5.2. Remove and rerun AIS1 Advanced Indicator if any embarrassment is occured. 5.3. Always check that you are using latest modification of AIS1 Advanced Indicator. 5.4. Latest modification is stored in http://codebase.mql4.com/5337.