CSM指標 (漢諾威)

0
(0)

筆記: 除了更新一些之前的帖子, 我已經離開外匯製造單位, 所以不要期待對您的帖子的回复. 您會發現我所有指標的索引 .

CSM (外彙能量計直方圖指標)

我決定 CSM 指標值得其個人主題, 特別是如提出的 #1 may be up to date ceaselessly with new variations. All the things was getting scattered and laborious to search out; I've tried to assemble every part up and embody it right here on this one put up. Therefore it is going to be an extended one.

I've made one other small enhancement, 這 ShowValues setting has been changed by ValuesSpacing, defined within the directions beneath.

Right here is the newest CSM and all the parameter recordsdata ('p-files'). I've included .mq4 supply code however you will want do do that first, in any other case it's going to compile with a zillion errors. To keep away from any issues, obtain the .ex4 file solely.

連接文件

The CSM indicator is not a holy grail, it lags sentiment similar to each different price-derived energy meter

Be aware that while you first load the indicator, it should obtain all the required knowledge (for the timeframes that you have chosen) out of your dealer's server. 這 would possibly take a number of minutes, particularly when you've requested for a number of pairs/devices, 和時間框架, to be collated. You may have an app like this obtain this knowledge, when you want.

免責聲明: As all the time, this software program is supplied freely and will not be offered or distributed commercially. Code is obtainable on an 'as is, take it or go away it' foundation with no assure that it really works as you imagine that it ought to. Obtain and use it at your individual threat; I settle for no legal responsibility for any pc harm or monetary losses.
______________________

Parameter Settings

ParameterFile: that is defined beneath (see the Parameter Recordsdata part beneath) .

CurrencyPairs: Enter the values of the pairs that you really want the indicator to think about, 被逗號隔開. Permissible abbreviations are: A=AUD; C=CAD; E=EUR; F=CHF; G=GBP; J=JPY; N=NZD; U=USD; H=HKD; S=SGD; Z=ZAR. So you might kind 或者 gu as an alternative of 英鎊兌美元, 例如. Be aware that these are the pairs that can be used within the calculations to achieve a relative energy/weak point worth for AUD, 計算機輔助設計, 瑞士法郎, 歐元, 英鎊, 日元, NZD and USD. Exotics, 金屬, cryptos and so forth which are supplied by your dealer may be included within the energy/weak point calculations for these 8 main currencies, however histograms are plotted for the 8 majors solely.

CurrencySuffix: To additional save repetitive typing, CurrencySuffix will get appended to the top of each entered pair. Therefore in case your dealer is providing pairs named EURUSD.professional, GBPJPY.professional, 等等, you might enter CurrencyPairs 作為 eu, gj, 等等, 和 CurrencySuffix 作為 .專業的

時間框架: the timeframes for which you need histograms to be displayed. Legitimate values are M1, M5, H1, D1, 明尼蘇達州, 等等. The histograms will plot, from left to proper throughout your display, within the order that you just specify right here.

NumberOfCandles:
ApplySmoothing:
TriangularWeighting:
These are defined within the 'Calculation' part beneath.

HistoricalShift: Exhibits what the histograms would have seemed like X candles in the past (in every timeframe). That is actually solely significant for one timeframe to be thought of. 例如, getting into -5 would present what the histogram seemed like 5 hours in the past on the H1 TF, 然而 20 hours in the past (5 X 4 小時) on the H4 TF. 進入 0 to see the present histograms on all TFs.

SortMethod: 進入 to have the histograms in every timeframe plot in descending order of worth (strongest forex on the left, weakest on the best). 進入 A to have the histograms in every timeframe plot in ascending order of worth (weakest forex on the left, strongest on the best). Go away the setting clean and the currencies can be displayed in alphabetical order.

ValuesSpacing: typing a worth > 15 strikes the displayed values additional away from the highest of the histogram bar; a worth < 15 strikes it nearer. A price of 0 stops the values from being displayed in any respect.

字體名稱: used for plotting the histograms, this must be both CSM 或者 Placard MT Condensed, which can be found within the Fonts folder within the zip file. For assist with putting in fonts, 看 . The histogram is definitely the letter I repeated many instances, after having been rotated onto its aspect. You may strive utilizing different fonts, nut these two are the very best that I've discovered. The screenshot beneath reveals the distinction within the histograms utilizing the 'CSM' font (多於) and the 'PLCC__' (Placard) font (下面).

連接圖片 (點擊放大)
Click to Enlarge

Name: PPI 634.png
Size: 25 KB

字體大小: the scale of the font that can be used for plotting the histograms. If you happen to regulate this, you'll most likely must additionally regulate the HorizSpacing to take care of an acceptable distance between the histogram bars.

SeparateWindow: 如果 真的, the histograms will plot in their very own window; 如果 錯誤的, the histograms will plot in the principle chart window.

HorizPos/VertPos: the histograms plot in a hard and fast display place, IE. they do not transfer with the candles. 這 HorizPos/VertPos settings characterize the place to begin, in pixels, for the primary histogram 大體時間 to be plotted.

HorizSpacing: the spacing, in pixels, between every histogram bar.

Colors_AUD via Colors_USD: the present model of CSM plots histograms for these 8 currencies solely. Now you can have totally different colours for various ranges of values for every histogram bar. 例如, in order for you the USD bar to show as White solely when the energy worth > 80 或者 <= 20, and DimGray in any other case, you'll kind into USD_colors: 100,白色的,80,DimGray,20,白色的,-1
換句話說, values and legitimate coloration names have to be typed alternately, 被逗號隔開, with the values in descending order, 範圍從 100 and ending with -1. For the reason that coloration 'White' seems between 100 和 80, the histogram will plot as White for USD, if the histogram worth is between 80 和 100, 等等. You may specify as much as 20 顏色 (41 條目). Colours could also be entered as (我) legitimate MT4 tokens (Orange,DarkGoldenrod, DeepSkyBlue, 等等); 或者 (ii) RGB entries like r60g45b117 with every worth between 0 和 255, and the R, G and B values in any order (if omitted, the Purple/Inexperienced/Blue part is assumed to be zero); 或者 (iii) because the hexadecimal illustration (00 via ff) 0xaabbcc, the place aa is the Blue part, bb Inexperienced and cc Purple; 或者 (iv) a decimal quantity that is the same as (Blue x 255 X 255) + (Inexperienced x 255) + 紫色的. See the chart 就在這兒 for more information. And/or obtain a free, helpful coloration selector software like this one.

Textual content Font/方面/Shade: these decide the font/dimension/coloration of the textual content printed beneath the histograms.

RefreshPeriod: determines how usually the histogram values are recalculated and replotted. Entries are defined intimately right here.

UniqueID: you'll want to specify a special UniqueID for every occasion of CSM on the identical chart.

OutputFilename: to disable this facility, go away the setting clean. In any other case output can be despatched to a file of the title you specify within the ..../MQL4/Recordsdata folder. The file will get overwritten with contemporary knowledge each RefreshPeriod. You may specify a subfolder (beneath the Recordsdata folder) by getting into one thing like subfolderfilename. You may embed the chart image or the date/time within the file title by together with [sym] 或者 [dt], 分別, within the filename. The output file might be learn by an EA, in order that forex energy values can be utilized to contribute to the EA's resolution making course of. The format of the output file is fastened, and appears like this:

Inserted Code
特遣隊 , 澳元, 計算機輔助設計, 瑞士法郎, 歐元, 英鎊, 日元, 新西蘭元, USD
M1 ,  36,  71,  30,  47,  15,  70,  67,  64
M5 ,  49,  56,  25,  64,  44,  49,  55,  59
M15,  51,  57,  33,  60,  54,  33,  54,  57
M30,  52,  67,  36,  52,  60,  37,  47,  48
H1 ,  60,  70,  30,  47,  64,  34,  47,  48
H4 ,  75,  71,  21,  31,  64,  39,  58,  39
D1 ,  80,  81,  21,  42,  58,  28,  56,  35
W1 ,  66,  86,  37,  61,  47,  14,  65,  24
明尼蘇達州 ,  63,  76,  45,  65,  38,  19,  68,  26

OutputGlobals: if set to 真的, CSM can even output all present histogram values to International variables, to be used in an EA (as a substitute for outputting the values to a file). The title of every world can be CSM-[UniqueID]-[大體時間]-[currencyID], 例如. CSM-1-M15-USD. These are up to date as soon as each RefreshPeriod. 如果 錯誤的, International variables are usually not used.

HighlightBox: 如果 真的, the H4/D1/W1 timeframe names are underlined (these are the timeframes that I have a tendency to review). 如果 錯誤的, they aren't underlined.

DisplaySpread: One other new characteristic is the little numbers that appear to be <-n-> which characterize the 'unfold' between the best and lowest forex values (也可以是 +/-1 because of a rounding error). A variety of 60 or larger usually represents respectable momentum when you pair the outermost currencies, on that timeframe. A price lower than 40 tends to imply that the market as an entire is flat/rangebound. 放 DisplaySpread真的 to allow this facility, 錯誤的 禁用它.

SummarySpacing/SummaryLevels: These settings allow/disable the 'Development Abstract' graph. Be aware that this graph will not be plotted at a hard and fast display location just like the histograms; it strikes with the candles. SummarySpacing determines the width between every timeframe plotted alongside the horizontal axis. Setting it to 0 disables the graph altogether. SummaryLevels decide the degrees for which horizontal strains can be plotted. Enter rising values between 0 和 100, 被逗號隔開.

How you can interpret the Development Abstract: it's merely a plot of the histogram values for every forex, from month-to-month right down to M1. If you happen to're seeking to enter in the beginning of renewed momentum following a pullback in a long term transfer, ideally you wish to pair two currencies whose curves are situated/formed one thing like these proven right here:

連接圖片
CSM indicator (hanover) 1

If you happen to're having issues with the abstract, strive (1) utilizing the arrow keys to scroll it to the best of the chart, (2) utilizing the +/- keys to vary the chart zoom and candle widths, (3) rising or reducing the indicator's SummarySpacing worth, (4) turning MT4's Navigator, 市場觀察, and so forth off to achieve extra display house, (5) transferring MT4's chart shift setting (the little triangle on the prime proper of the principle chart) leftward to achieve extra space past the RHE, 或者 (6) altering your monitor's decision settings. Or if it is a nuisance, and also you'd quite see solely the histograms, merely set SummarySpacing to 0.

Calculation --- how the CSM histogram values are calculated

The unique system labored solely on the D1 TF, and the presently forming candle. It checked the place worth presently was, by way of the candle excessive and low, expressed as a share. 例如, if worth was presently on the excessive, the worth returned was 100%; on the low, 0%; three quarters of the best way up the candle, 75%; 等等.

Then it transformed this into a worth between 0 和 9, thus:
Above 97%, worth = 9
Between 90% 和 97%, worth = 8
Between 75% 和 90%, worth = 7
Between 60% 和 75%, worth = 6
Between 50% 和 60%, worth = 5
Between 40% 和 50%, worth = 4
Between 25% 和 40%, worth = 3
Between 10% 和 25%, worth = 2
Between 3% 和 10%, worth = 1
Lower than 3%, worth = 0

It processed all the candles for every forex pair. Let’s say the pair presently being processed is USDCHF, and worth is presently 64% of the best way up the candle. Then it could assign a worth of 6 for USD, 和 9 減 6 = 3 for CHF. Then it could repeat the identical for all forex pairs (as laid out in CurrencyPairs), common the outcomes for every forex (not pair), and plot the values.

CSM extends this idea in no less than 4 alternative ways:

1. You may specify NumberOfCandles. 如果設置為 1, then this is able to work because the Giraia indy did, IE. function on the presently forming candle. 如果設置為 2, it consists of each the presently forming candle, and likewise the one instantly to the left; 等等. It makes use of the best and lowest factors throughout the 2 candle interval as 100% 和 0%, 分別. Therefore the worth displays the place worth presently is, relative to the best and lowest level of the final n candles, the place n is the NumberOfCandles 環境.

2. The above assumes that ApplySmoothing =假. Setting this to true implies that all the course of can be repeated, over the past NumberOfCandles 蠟燭, and the end result averaged. 例如, suppose NumberOfCandles is about to 4. Then if ApplySmoothing = 真, all the calculation (as defined beforehand) is run for every of NumberOfCandles = 1, 2, 3 和 4, 和 4 outcomes averaged. This successfully implies that, 如果 ApplySmoothing = 真, there's a increased weighting utilized to the newest candles. If set to false, it's merely the place worth is, relative to the excessive and low of the final n candles.

3. As an alternative of being restricted to the D1 TF, separate plots could also be generated relying on the consumer’s alternative of 時間框架. Every TF is calculated utterly independently of the others.

4. For no matter it is price, 我利用 NumberOfCandles=25, ApplySmoothing=true, TriangularWeighting=false. Here is how they work:

我) 如果 ApplySmoothing=false, 然後 TriangularWeighting is ignored, and the worth calculated for every pair is solely the rise/fall from candle #25 (如果 NumberOfCandles=25) to the present worth.

ii) 如果 ApplySmoothing=true, 和 TriangularWeighting=false, then the rise/fall for every candle from candle #25 to candle #1, from that candle to the present worth, is averaged to offer a 'smoothed' worth over the past 25 蠟燭.

iii) 如果 ApplySmoothing=true, 和 TriangularWeighting=true, then the rise/fall from candle #25 to present worth is multiplied by 1, the rise/fall from candle #24 to present worth is multiplied by 2, the rise/fall from candle #23 to present worth is multiplied by 3, ........ the rise/fall from candle #1 to present worth is multiplied by 25, earlier than the averaging takes place. This attaches a fair increased weighting to the newest candles.

Parameter Recordsdata

To make altering the colours simpler, you need to use parameter recordsdata ('p-files'), which may be edited with a textual content editor like Home windows' Notepad. For its settings to override the MT4 dialog settings, the file have to be named as follows: in case your entry in ParameterFilexxx, then a file Presets---CSM.xxx should exist within the …/MQL4/Recordsdata folder that's formatted precisely as described beneath. If the file would not exist, 例如. setting to ParameterFile沒有任何 (and no file …/MQL4/Recordsdata/Presets---CSM.NONE exists), then the settings that you just kind into MT4's dialog field will apply.

That will help you, I've included some dummy recordsdata within the zip, 例如. Presets---CSM.20, Presets---CSM.25 and Presets---CSM.30
These pattern recordsdata will show all the histogram bars in a dim grey coloration at any time when the values are between 20/80, 25/75 或者 30/70 分別. So as an alternative of getting to retype all the coloration settings, you might merely swap ParameterFile20, 25 或者 30. I've additionally included a file Presets---CSM.1 named which causes the indicator to behave because it did beforehand. Or you'll be able to merely go away ParameterFile 作為 沒有任何. I'd recommend that, with a view to be sure that you get your syntax precisely appropriate, you copy these recordsdata after which use them as a place to begin to your entry values.

Parameter file format
The syntax within the p-file MUST comply with the next guidelines and format:
parametername = worth;
Parameter title have to be spelled appropriately (though it could be higher/lowercase, and embody areas or underscore characters (_) to enhance readability), alphanumeric values have to be enclosed in double quotes ("), and each line within the file MUST finish with a semi-colon; failure to take action will trigger unpredictable outcomes.
The file could embody 'remark' strains which can be ignored by the indicator. A remark line all the time begins with two slashes (//) and should then comprise any textual content you would like. 再一次, it should finish with a semi-colon. Remark strains can permit you to rapidly swap a parameter from one worth to a different, 例如.
// parametername = value1;
parametername = value2;
which may be simply switched to
parametername = value1;
// parametername = value2;
One other use for feedback is you could 'remark out' a line, to permit you to change that individual setting utilizing the MT4 dialog field, whereas the opposite parameters proceed to acquire their values from the p-file. Then you'll be able to later simply restore the road within the p-file later if you'll want to. (Whereas restoration will not be really easy when you delete the road altogether).

意識到 that after you've got saved any modifications to a p-file in Notepad, it's essential to refresh the indicator for it to learn within the modifications from the p-file. The best approach to refresh all the indicators in your chart is to change to a special timeframe, after which swap again once more.
______________

This can be a one off put up, though I can be including to it, at any time when I make updates to the indicator. 儘管如此, I wont be answering any questions; learn the directions above, and experiment with the indicator your self. The supply code is there if you wish to make modifications (例如. add your individual alerts, or rewrite it for MT5, .....).

Goodbye as soon as once more, LOL, and good luck everyone. CSM indicator (hanover) 2

這篇文章有多有用?

點擊一顆星即可對其進行評分!

平均評分 0 / 5. 計票數: 0

目前還沒有投票! 成為第一個評價這篇文章的人.

很抱歉這篇文章對您沒有用!

讓我們改進這篇文章!

告訴我們如何改進這篇文章?



作者: 外匯維基團隊
我們是一支經驗豐富的外匯交易員團隊 [2000-2023] 致力於以我們自己的方式生活的人. 我們的主要目標是實現財務獨立和自由, 我們追求自我教育並在外匯市場上獲得豐富的經驗,以此作為實現自我可持續生活方式的手段.