MJ Indicators Help Info

MT4 Indicator, Expert Advisors, Scripts, Libraries documentation by MJ

Author:
Copyright (c) since 2011, MJ

This documentation is generated by Doxygen. Click on "Files" to see the list of documented files.

GENERAL DOCUMENTATION



COMMON INPUT VARIABLES

Input Parameters which are used in most of my Indicators



_____________0_____________ = "<<< COMMON SETTINGS >>>"



*sExtUniquePrefix: Normally it starts with a 1- and then something related to the indicator name. e.g. 1-IndiName.

*bExShowIndicatorInfo: If TRUE: some indicator info such as indicator name, buffer labels etc. are shown. Main purpose of it is to be able to set it to FALSE to remove all indicator info when using multiple ones in one SubWindow.

*sExtGeneralFontType: General font type used by most text and text label obj etc..

*bExtStartDelay: Default for most of my indicators is a start delay on purpose. If FALSE: it can easily produce mistakes and wrong indicator values etc..


"== CALCULATION START/END =="

*iExtPastStartChartSHIFT: Sets how many chart bars we calculate from the past:

*iExtPastEndChartSHIFT: Sets at which chart bar we end the calculation: if it is greater than 0 we end calculation in the past.

*bExtNoPastSHIFTUseTimeInstead: If TRUE: the PastStart/End SHIFT are ignored and the PastStart/End TIME is used: mainly useful for some kind of backtesting.

*dtExtPastStartTIME: Sets Start Time for chart bars we calculate from the past. (Basically same function as the iExtPastStartChartSHIFT: in fact internally I just convert it to such)

*dtExtPastEndChartTIME: Sets End Time for chart bars we calculate from the past. MUST be earlier than the current time. With this option one can not use live action.


"== DEBUG/Error/INFO RELATED =="

*bExtDebugUsePrintScrollLines: Switch: switches the normal Print() function which writes to MT4 log file and uses instead a 25 line big scrolling comment on the Chart

*bExtDebugAlertOnErr: Debug AlertOn: If TRUE: Additional Alerts are send if an error occurs and not only write it into the log file.

*bExtDebugAlertSoundOnErr: Debug Play Soundfile on Error: If TRUE: also plays a sound file on error

*bExtErrInfSoundFileName: Name of the Soundfile used for Info and Error: must exist in the MT4 sounds folder.

*cExtInfErrObj: Color for the special Error and Info TextLabel Objects


"== OTHER COMMON VARIABLES =="

*iExtCompPrecisionDigits: Rounding Precision used in comparisons of certain values. It is mainly used in Alerts or Color Direction comparisons and such.

===== END OF ===== COMMON INPUT VARIABLES =====



COMMON ERRORS:

I try to fetch many possible errors.

===== END OF ===== COMMON ERRORS =====



COMMON ALERTER INFOS:

Many of my indicators come with an Alerter or are specific Alerter indicators. I use in general for all such the same costumary Alerter subsystem with quite a number of useful options. (or only slightly changed for a specific indi)

The most common Alerter input options are:

*bPastAlertsOn: * Main On/Off alert option for Past data Alerts. If it is false: there is no alert for Past Data no matter what the other Alert settings are.

*bLiveAlertsOn: Main On/Off alert option for Live Alerts. If it is false: there is no alert no matter what the other Alert settings are.

*iAlertOptionWhen: Alert Option When to Alert:

*bPopUpAlert: If there is an valid Alert: send a PopUp Alert.

*bSoundAlert: If there is an valid Alert: play a Sound Alert.

*sAlertSoundFileName: Name of the Soundfile used for bSoundAlert.

*bEmailAlert: If there is an valid Alert: send an Email Alert (must be correctly configured in MT4 Client).

*bWriteFileAlert: If there is an valid Alert: write it to a AlertFile. (Might fill up your harddisk if not watched) Files are created in MT4:" experts/files: (Notes: Files can only be opened in the terminal_directory\experts\files folder (terminal_directory\tester\files if for expert testing) or in its subfolders)."

*bVLineAlert: If there is an valid Alert: create a VLine on the Chart Bar (Note in case more than one Alert happens we only update the VLine: this means in case an indicator uses different colors fo up and Down Signals only te last one will be recognizable with VLines.

*iAlertVLineStyle: VLine Alerts Line Style: 0=Solid, 1=Dash, 2=Dot, 3=DashDot, 4=DashDotDot.

*iAlertVLineWidth: VLine Alerts width. Valid values are: 1,2,3,4,5. BUT it seems it accepts also individual higher numbers which is quite useful.

*cAlertVLineColorUP: VLine Alerts UP Color value to set/get object color.

*cAlertVLineColorDN: VLine Alerts DOWN Color value to set/get object color.

*bAlertVLineBack: If TRUE: VLine Alerts are Drawn in Background. Boolean value to set/get background drawing flag for object.

*iAlertVLineSubWindowNum: Index of the window where the object will be added. Window index must exceed or equal to 0 and be less than WindowsTotal(). 0 is main chart window.

IMPORTANT NOTE FOR VLine Alerts:

For Live Data Vline Alerts the Vline will usually update during the chartbar and stays with the last 'situation' of the chart bar. If one uses MTF based Alerts e.g. MTF Stochastic based Alerts and plots also the MTF STOk line it usually repaints the last MTF Bar: MTF M5 Chart M1 it might repaint up to about 5 chart bars.

In such a situation it can be that by Live Data the VLine Alerts seem to be wrong when one looks at it later BUT NOTE: the Vline Alerts stay with the situation they where when a chart bar closed and do not repaint like the MTF indicator.

Basically this is done to avoid potentially 1000 of 1000 VLines to repaint at each tick - and it is also interesting to see what was the ACTUAL situation at the time of the chart bars close

===== END OF ===== COMMON ALERTER INFOS =====