Basket_Stats.mq4 Inputs Explained

extern int MagicNumber = -1;
extern string CORNER= "--Screen Corner: 0=upper left, 1=upper right, 2=lower left, 3=lower right--";
extern int corner = 1;
extern string LROffset= "--lroffset = Use multiples of 300+, left or right offset (depending on the corner chosen).--";
extern int lroffset = 0;
extern string TBOffset= "--tboffset = top or bottom offset (depending on corner chosen). A single line height is 14. There are 2 top lines and one summation line + symbols * 14 or 42 + 14*(symbol count)--";
extern int tboffset =0;

MagicNumber is used to specify the internal magic number used by Metatrader that is associated with a particular trade entry. The magic number is typically assigned by an expert advisor during entry, so this input should match the number used by your system. The default value is -1, which means all entries with any magic numbers will be summed up.

corner is an integer from 0 - 3 which indicates the anchor corner for placing the text of the Basket_Stats.mq4 indicator. As the description points out, anchor corners for the indicator text correspond to:

0 = upper left corner

1 = upper right corner

2 = lower left corner

3 = lower right corner

You may notice that when the lower right or lower left corners are used as the anchor, the MT4 indicator draws in reverse with totals on top. The default value of corner is 1 or upper right.

lroffset is an integer that determines the left or right offset amount from the anchor corner. Typical offset values are multiples of 300+. Values less than 300 will overlap or overwrite on another copy of the indicator on the same chart. This input allows for multiple versions of the Basket_Stats.mq4 indicator to be run at one time. The default value is 0 or no offset from the starting corner.

tboffset is the top or bottom offset amount from the selected corner. If the corner is set to 0 (upper right) then setting tboffset to 200 will plot the indicator 200 /14 = ~14 lines below the upper right corner. If the corner selected is 2 (lower right) then the indicator will instead plot 14 lines above the lower right corner. You will want to calculate how large an offset you require by taking note of the number of symbols Basket_Stats.mq4 is tracking, and multiplying that value by 14 and then adding 42 (3 lines of titles/totals). This should give you a good estimate for tboffset but only by putting in a few values will you be able to tell how it fits on the screen for best readability.

The CORNER, LROffset and TBOffset string inputs are merely placed in the code to provide traders more input from the Metatrader 4 trading platform as to what the inputs mean. Editing these values has no effect on the running of the indicator.

Follow patrickmwhite on Twitter

For updates