├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ └── compile-mql.yml ├── .gitignore ├── LICENSE ├── README.md ├── bin ├── .mqlcrc.dist ├── README.md ├── debugview │ ├── Download.url │ ├── exclude-themida.ini │ └── include-rosasurfer.ini └── mqlc ├── config ├── account-config.example.ini ├── global-config.example.ini ├── hotkeys.ini ├── start-proxy-off.ini └── start-proxy-on.ini ├── etc └── symbols │ ├── README.md │ ├── SYMBOL_TYPE_EQUITY.raw │ ├── SYMBOL_TYPE_FOREX.raw │ ├── SYMBOL_TYPE_INDEX.raw │ └── SYMBOL_TYPE_PIPS.raw ├── mql40 ├── experts │ ├── ZigZag EA.mq4 │ └── tools │ │ ├── Account Guard.mq4 │ │ └── HtmlReport2Chart.mq4 ├── include │ └── rsf │ │ ├── MT4Expander.mqh │ │ ├── MT4iQuickChannel.mqh │ │ ├── api.mqh │ │ ├── core │ │ ├── expert.mqh │ │ ├── expert.recorder.mqh │ │ ├── indicator.mqh │ │ ├── library.mqh │ │ └── script.mqh │ │ ├── expander │ │ ├── defines.h │ │ └── errors.h │ │ ├── experts │ │ ├── README.md │ │ ├── deinit.mqh │ │ ├── event │ │ │ └── onCommand.mqh │ │ ├── init.mqh │ │ ├── instance │ │ │ ├── CreateInstanceId.mqh │ │ │ ├── IsTestInstance.mqh │ │ │ ├── RestoreInstance.mqh │ │ │ ├── SetInstanceId.mqh │ │ │ └── defines.mqh │ │ ├── log │ │ │ └── GetLogFilename.mqh │ │ ├── metric │ │ │ ├── GetMT4SymbolDefinition.mqh │ │ │ ├── RecordMetrics.mqh │ │ │ └── defines.mqh │ │ ├── onTick.mqh │ │ ├── status │ │ │ ├── CreateStatusBox_6.mqh │ │ │ ├── SS.All.mqh │ │ │ ├── SS.ClosedTrades.mqh │ │ │ ├── SS.MetricDescription.mqh │ │ │ ├── SS.OpenLots.mqh │ │ │ ├── SS.ProfitStats.mqh │ │ │ ├── SS.TotalProfit.mqh │ │ │ ├── ShowOpenOrders.mqh │ │ │ ├── ShowStatus.mqh │ │ │ ├── ShowTradeHistory.mqh │ │ │ ├── StatusDescription.mqh │ │ │ ├── StatusToStr.mqh │ │ │ ├── defines.mqh │ │ │ ├── file │ │ │ │ ├── FindStatusFile.mqh │ │ │ │ ├── GetStatusFilename.mqh │ │ │ │ ├── ReadStatus.General.mqh │ │ │ │ ├── ReadStatus.HistoryRecord.mqh │ │ │ │ ├── ReadStatus.OpenPosition.mqh │ │ │ │ ├── ReadStatus.Targets.mqh │ │ │ │ ├── ReadStatus.TradeHistory.mqh │ │ │ │ ├── ReadStatus.TradeStats.mqh │ │ │ │ ├── SaveStatus.General.mqh │ │ │ │ ├── SaveStatus.OpenPosition.mqh │ │ │ │ ├── SaveStatus.Targets.mqh │ │ │ │ ├── SaveStatus.TradeHistory.mqh │ │ │ │ ├── SaveStatus.TradeStats.mqh │ │ │ │ └── SetStatusFilename.mqh │ │ │ └── volatile │ │ │ │ ├── RemoveVolatileStatus.mqh │ │ │ │ ├── RestoreVolatileStatus.mqh │ │ │ │ ├── StoreVolatileStatus.mqh │ │ │ │ ├── ToggleMetrics.mqh │ │ │ │ ├── ToggleOpenOrders.mqh │ │ │ │ └── ToggleTradeHistory.mqh │ │ ├── test │ │ │ ├── ReadTestConfiguration.mqh │ │ │ └── defines.mqh │ │ ├── trade │ │ │ ├── AddHistoryRecord.mqh │ │ │ ├── CalculateMagicNumber.mqh │ │ │ ├── ComposePositionCloseMsg.mqh │ │ │ ├── HistoryRecordToStr.mqh │ │ │ ├── IsMyOrder.mqh │ │ │ ├── MovePositionToHistory.mqh │ │ │ ├── OpenPositionToStr.mqh │ │ │ ├── defines.mqh │ │ │ ├── onPositionClose.mqh │ │ │ ├── signal │ │ │ │ ├── SignalOperationToStr.mqh │ │ │ │ ├── SignalTypeToStr.mqh │ │ │ │ └── defines.mqh │ │ │ └── stats │ │ │ │ ├── CalculateStats.mqh │ │ │ │ └── defines.mqh │ │ └── validation │ │ │ ├── ValidateInputs.ID.mqh │ │ │ ├── ValidateInputs.Targets.mqh │ │ │ └── onInputError.mqh │ │ ├── functions │ │ ├── ComputeFloatingProfit.mqh │ │ ├── ConfigureSignals.mqh │ │ ├── ExplodeStrings.mqh │ │ ├── HandleCommands.mqh │ │ ├── InitializeByteBuffer.mqh │ │ ├── IsBarOpen.mqh │ │ ├── JoinBools.mqh │ │ ├── JoinDoubles.mqh │ │ ├── JoinDoublesEx.mqh │ │ ├── JoinInts.mqh │ │ ├── MD5Hash.mqh │ │ ├── ManageDoubleIndicatorBuffer.mqh │ │ ├── ManageIntIndicatorBuffer.mqh │ │ ├── ObjectCreateRegister.mqh │ │ ├── ParseDateTime.mqh │ │ ├── ParseTimeRange.mqh │ │ ├── SortClosedTickets.mqh │ │ ├── chartlegend.mqh │ │ ├── configuration.mqh │ │ ├── iBarShiftNext.mqh │ │ ├── iBarShiftPrevious.mqh │ │ ├── iChangedBars.mqh │ │ ├── iCopyRates.mqh │ │ ├── iCustom │ │ │ ├── ALMA.mqh │ │ │ ├── HalfTrend.mqh │ │ │ ├── JMA.mqh │ │ │ ├── MACD.mqh │ │ │ ├── MovingAverage.mqh │ │ │ ├── Tunnel.mqh │ │ │ └── ZigZag.mqh │ │ ├── iPreviousPeriod.mqh │ │ ├── lfx.mqh │ │ ├── log.mqh │ │ ├── scriptrunner.mqh │ │ ├── shared │ │ │ ├── Abs.mqh │ │ │ ├── LoglevelDescription.mqh │ │ │ ├── Max.mqh │ │ │ ├── Min.mqh │ │ │ ├── PeriodDescription.mqh │ │ │ ├── README.md │ │ │ ├── StrContains.mqh │ │ │ ├── StrLeft.mqh │ │ │ ├── StrPadRight.mqh │ │ │ ├── StrSubstr.mqh │ │ │ └── StrTrim.mqh │ │ ├── ta │ │ │ ├── ADR.mqh │ │ │ ├── ALMA.mqh │ │ │ ├── ATR.mqh │ │ │ ├── JMA.mqh │ │ │ └── NLMA.mqh │ │ └── trend.mqh │ │ ├── history.mqh │ │ ├── indicators │ │ ├── README.md │ │ └── chartinfos │ │ │ ├── deinit.mqh │ │ │ └── init.mqh │ │ ├── shared.mqh │ │ ├── stddefines.mqh │ │ ├── stdfunctions.mqh │ │ ├── stdlib.mqh │ │ ├── structs │ │ ├── Bar.mqh │ │ ├── ExecutionContext.mqh │ │ ├── LFXOrder.mqh │ │ ├── OrderExecution.mqh │ │ ├── mt4 │ │ │ ├── FxtHeader.mqh │ │ │ ├── HistoryHeader.mqh │ │ │ ├── Symbol.mqh │ │ │ ├── SymbolGroup.mqh │ │ │ ├── SymbolSelected.mqh │ │ │ └── Tick.mqh │ │ ├── sizes.mqh │ │ └── win32 │ │ │ ├── ProcessInformation.mqh │ │ │ ├── SecurityAttributes.mqh │ │ │ ├── StartupInfo.mqh │ │ │ └── Win32FindData.mqh │ │ ├── timezones.mqh │ │ ├── win32api.mqh │ │ └── win32defines.mqh ├── indicators │ ├── .attic │ │ ├── 4 Bar Fractal.mq4 │ │ ├── Bressert Double-Stochastic.mq4 │ │ ├── DEMA.mq4 │ │ ├── Ehlers 2-Pole-SuperSmoother.mq4 │ │ ├── Ehlers Fisher Transform.mq4 │ │ ├── FATL.mq4 │ │ ├── Fractal Dimension Index.mq4 │ │ ├── Fractal Volatility.mq4 │ │ ├── Gammarat Channel.mq4 │ │ ├── Kaufman Efficiency Ratio.mq4 │ │ ├── Market Meanness.mq4 │ │ ├── Parabolic SAR.mq4 │ │ ├── Pivot Level.mq4 │ │ ├── RSI.mq4 │ │ ├── SATL.mq4 │ │ ├── Sadukey.mq4 │ │ ├── Stochastic of RSI.mq4 │ │ ├── Stochastic.mq4 │ │ ├── TEMA.mq4 │ │ ├── TriEMA.mq4 │ │ └── Trix.mq4 │ ├── ALMA.mq4 │ ├── Average Range.mq4 │ ├── BFX No Volume.mq4 │ ├── Bollinger Bands.mq4 │ ├── Brackets.mq4 │ ├── CCI.mq4 │ ├── ChartInfos.mq4 │ ├── Donchian Channel Width.mq4 │ ├── Donchian Channel.mq4 │ ├── EquityRecorder.mq4 │ ├── Grid.mq4 │ ├── HalfTrend.mq4 │ ├── Heikin-Ashi.mq4 │ ├── Inside Bars.mq4 │ ├── Instrument Infos.mq4 │ ├── Jurik Moving Average.mq4 │ ├── Keltner Channel SR.mq4 │ ├── Keltner Channel.mq4 │ ├── LFX-Monitor.mq4 │ ├── MACD.mq4 │ ├── Moving Average.mq4 │ ├── NonLagMA.mq4 │ ├── SuperBars.mq4 │ ├── SuperTrend.mq4 │ ├── Tillson T3 Moving Average.mq4 │ ├── Trend Bars.mq4 │ ├── Tunnel signal.mq4 │ ├── Tunnel.mq4 │ └── ZigZag.mq4 ├── libraries │ ├── MT4iQuickChannel.dll │ ├── rsfHistory1.mq4 │ ├── rsfHistory2.mq4 │ ├── rsfHistory3.mq4 │ ├── rsfMT4Expander.dll │ ├── rsfStdlib.mq4 │ └── wget.exe └── scripts │ ├── Chart.Objects.DeleteAll.mq4 │ ├── Chart.Objects.UnselectAll.mq4 │ ├── Chart.Refresh.mq4 │ ├── Chart.SendTick.mq4 │ ├── Chart.ToggleAccountBalance.mq4 │ ├── Chart.ToggleOpenOrders.mq4 │ ├── Chart.ToggleTradeHistory.mq4 │ ├── Chart.ToggleUnitSize.mq4 │ ├── CloseOrders.mq4 │ ├── Config.mq4 │ ├── CountOpenOrders.mq4 │ ├── CustomPositions.LogOrders.mq4 │ ├── CustomPositions.ToggleProfit.mq4 │ ├── CustomPositions.ToggleRisk.mq4 │ ├── CustomizeTerminal.mq4 │ ├── DebugMarketInfo.mq4 │ ├── EA.Resume.mq4 │ ├── EA.Start Long.mq4 │ ├── EA.Start Short.mq4 │ ├── EA.Start.mq4 │ ├── EA.Stop.mq4 │ ├── EA.ToggleMetrics.mq4 │ ├── EA.Wait.mq4 │ ├── Empty.mq4 │ ├── HedgePosition.mq4 │ ├── LFX-Monitor TA=123456.mq4 │ ├── LFX-Monitor TA=Off.mq4 │ ├── LFX.Buy Limit.mq4 │ ├── LFX.Buy.mq4 │ ├── LFX.ClosePositions.mq4 │ ├── LFX.ExecuteTradeCmd.mq4 │ ├── LFX.OpenPosition.mq4 │ ├── LFX.Sell Limit.mq4 │ ├── LFX.Sell.mq4 │ ├── MarketWatch.Symbols.mq4 │ ├── ParameterStepper.Down.mq4 │ ├── ParameterStepper.Up.mq4 │ ├── ReopenAlerts.mq4 │ ├── SuperBars.TimeframeDown.mq4 │ ├── SuperBars.TimeframeUp.mq4 │ └── Tools.MetaEditor.mq4 ├── mql45 ├── experts │ └── .gitkeep ├── include │ └── rsf │ │ ├── MT4Expander.mqh │ │ ├── MT4iQuickChannel.mqh │ │ ├── expander │ │ ├── defines.h │ │ └── errors.h │ │ ├── functions │ │ ├── log.mqh │ │ └── shared │ │ ├── shared.mqh │ │ ├── stddefines.mqh │ │ ├── stdfunctions.mqh │ │ └── win32defines.mqh ├── indicators │ ├── BFX Core Volume v1.20.0.ex4 │ ├── XARD Tunnel.mq4 │ └── XU v4-XARDFX.ex4 ├── libraries │ └── BankersFX Lib.ex4 └── scripts │ └── .gitkeep ├── mql50 ├── experts │ └── .gitkeep ├── include │ └── .gitkeep ├── indicators │ └── .gitkeep ├── libraries │ └── .gitkeep └── scripts │ └── .gitkeep ├── sounds ├── Alarm.wav ├── AlarmMulti.wav ├── Alert down.wav ├── Alert up.wav ├── Alert.wav ├── Alert2.wav ├── AlertDefault.wav ├── AutoChase.wav ├── Beacon.wav ├── Bell 1.wav ├── Bell 2.wav ├── Big Ben.wav ├── Bulk.wav ├── Buzzer.wav ├── Cashing.wav ├── Chotoneto.wav ├── Close.wav ├── CloseOrder.wav ├── Connect.wav ├── Connected.wav ├── Didup.wav ├── Dingdong.wav ├── Disconn.wav ├── Disconnect.wav ├── Drop.wav ├── Email.wav ├── Error.wav ├── Event.wav ├── Exit.wav ├── Expert.wav ├── Fun.wav ├── Function.wav ├── Horn.wav ├── Inside Bar.wav ├── Knopka-N.wav ├── Knopka-Y.wav ├── Ku-ku.wav ├── Laser.wav ├── MarginLow.wav ├── MarginStopout.wav ├── News.wav ├── Night.wav ├── Notify.wav ├── OK.wav ├── Oh-oh.wav ├── Online.wav ├── Ooops.wav ├── OrderFailed.wav ├── OrderModified.wav ├── OrderOk.wav ├── OrderRequote.wav ├── OrderTimeout.wav ├── Parameter Step.wav ├── PhoneCalling.wav ├── PhoneRinging.wav ├── Plonk.wav ├── Price Advance.wav ├── Price Decline.wav ├── Prrrp.wav ├── Signal Down.wav ├── Signal Up.wav ├── Siren.wav ├── Snap.wav ├── Snitch.wav ├── Sonar.wav ├── Sunduk.wav ├── Tick.wav ├── Type.wav ├── Viber Message.wav ├── Volatility 1.wav ├── Volatility 2.wav ├── Volatility 3.wav ├── Whoof.wav ├── Windows Alert.wav ├── Windows Batterie kritisch.wav ├── Windows Batterie niedrig.wav ├── Windows Benachrichtigung.wav ├── Windows Chimes.wav ├── Windows Chord.wav ├── Windows Confirm.wav ├── Windows Drucken abgeschlossen.wav ├── Windows Hinweis.wav ├── Windows Informationsleiste.wav ├── Windows Kritischer Fehler.wav ├── Windows Notify.wav ├── Windows Ping.wav ├── Windows Sprechblase.wav ├── Work.wav ├── Wutch.wav ├── Zirp.wav ├── speech │ ├── 0 IVONA Text-to-Speech.url │ ├── Euro-Dollar position is 10 pips in profit.mp3 │ ├── IncomingMail.wav │ ├── OrderCancelled.wav │ ├── OrderExecutionFailed.wav │ ├── OrderFilled.wav │ ├── OrderPending.wav │ ├── PositionClosed.wav │ ├── ReversingPosition.wav │ └── TargetFilled.wav └── ticks │ ├── Tick+1.wav │ ├── Tick+2.wav │ ├── Tick+3.wav │ ├── Tick+4.wav │ ├── Tick+5.wav │ ├── Tick+6.wav │ ├── Tick+7.wav │ ├── Tick+8.wav │ ├── Tick+9.wav │ ├── Tick-1.wav │ ├── Tick-2.wav │ ├── Tick-3.wav │ ├── Tick-4.wav │ ├── Tick-5.wav │ ├── Tick-6.wav │ ├── Tick-7.wav │ ├── Tick-8.wav │ └── Tick-9.wav ├── templates4 ├── 01 Default.tpl ├── 02 Default (AutoScroll).tpl ├── 03 Default (FF Brackets).tpl ├── 04 Default (US Brackets).tpl ├── 10 --------------------------------------------.tpl ├── 11 ADR(80).tpl ├── 13 Donchian(45) Width.tpl ├── 14 ZigZag(30).tpl ├── 15 ZigZag(50).tpl ├── 16 ZigZag(50) sound.tpl ├── 20 --------------------------------------------.tpl ├── 21 MACD ALMA(8,38).tpl ├── 22 MACD EMA(9,36).tpl ├── 23 ZigZag(10xM5).tpl ├── 24 ZigZag(10xM5) + NLMA.tpl ├── 25 Tunnel Trend.tpl ├── 30 --------------------------------------------.tpl ├── 33 BFX No Volume.tpl ├── 34 LFX Monitor.tpl ├── 35 Equity Recorder.tpl ├── 36 Minimal (ChartInfos).tpl ├── 37 Empty (no indicators).tpl ├── 40 --------------------------------------------.tpl ├── Default.tpl ├── Offline.tpl ├── OptimizationReport.htm ├── Statement.htm ├── StatementDetailed.htm ├── StrategyTester.htm └── attic │ ├── ALMA(38), NLMA(20).tpl │ ├── ALMA(38).tpl │ ├── Awesome (MACD).tpl │ ├── Bollinger Bands(100).tpl │ ├── Default (OfflineTicker).tpl │ ├── Default (OfflineTicker=Off).tpl │ ├── Gammarat Channel.tpl │ ├── HalfTrend.tpl │ ├── JMA(50).tpl │ ├── L'mas Tunnel.tpl │ ├── MACD(38,46).tpl │ ├── SATL.tpl │ ├── StdDev.tpl │ ├── SuperTrend.tpl │ ├── TriDiff.tpl │ ├── Tunnel Trend + CCI.tpl │ ├── ZigZag(10) extension.tpl │ ├── ZigZag(24).tpl │ ├── ZigZag(30) + NLMA(25).tpl │ └── ZigZag(30) + T3(10).tpl └── templates5 └── .gitkeep /.gitattributes: -------------------------------------------------------------------------------- 1 | # default: self-detect the content type (text vs. binary) 2 | * text=auto 3 | 4 | 5 | # enforce content type "text" to fix mixed line-endings in the repo 6 | *.h text 7 | *.htm text 8 | *.html text 9 | *.ini text 10 | *.md text 11 | *.mq4 text 12 | *.mq5 text 13 | *.mqh text 14 | *.sh text 15 | *.txt text 16 | 17 | 18 | # set content encodings 19 | * encoding=UTF-8 20 | *.mqh encoding=CP1252 21 | *.mq4 encoding=CP1252 22 | *.mq5 encoding=CP1252 23 | *.tpl encoding=CP1252 24 | 25 | 26 | # checkout with Windows line-endings (not yet supported by EGit) 27 | *.tpl text eol=crlf 28 | hotkeys.ini text eol=crlf 29 | 30 | 31 | # Gitgub Linguist overrides 32 | /etc/** linguist-detectable=false 33 | /files/** linguist-detectable=false 34 | /sounds/** linguist-detectable=false 35 | /templates/** linguist-detectable=false 36 | *.mqh linguist-language=MQL4 37 | 38 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | updates: 4 | - package-ecosystem: github-actions 5 | directory: / 6 | schedule: 7 | interval: weekly 8 | open-pull-requests-limit: 1 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # never ignore the following files 2 | !.gitattributes 3 | !.gitkeep 4 | 5 | # ignore Eclipse directories and files 6 | /.externalToolBuilders 7 | /.settings 8 | /.buildpath 9 | /.project* 10 | 11 | # ignore the following directories and files 12 | /bin/.mqlcrc 13 | /files 14 | mqlcache.dat 15 | *.ex[45] 16 | 17 | # ignore distributed/linked/log folders 18 | /mql*/files 19 | /mql*/images 20 | /mql*/logs 21 | /mql*/presets 22 | /mql*/projects 23 | /mql*/shared projects 24 | 25 | # ignore tester related files 26 | /tester 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | [![Build Status](https://img.shields.io/badge/Build_status-passed-green?style=flat&logo=GitHub&color=%234cc61e)](https://github.com/rosasurfer/mt4-mql-framework/actions#) 3 | 4 | 5 | ## MQL application framework for MetaTrader 4 6 | 7 | ----- 8 | 9 | ### MetaQuotes terminal support 10 | 11 | ###### July 2025: 12 | - MetaQuotes stops supporting terminals older than build 1440. 13 | 14 | ###### December 2024: 15 | - MetaQuotes stops supporting terminals older than build 1420. 16 | 17 | ###### Mai 2024: 18 | - MetaQuotes stops supporting terminals older than build 1412. 19 | 20 | ###### March 2024: 21 | - MetaQuotes stops supporting terminals older than build 1408. 22 | 23 | ###### February 2024: 24 | - MetaQuotes stops supporting terminals older than build 1402. 25 | 26 | ###### January 2024: 27 | - MetaQuotes stops supporting terminals older than build 1400. 28 | 29 | ###### December 2023: 30 | - MetaQuotes stops supporting terminals older than build 1380. 31 | 32 | ###### May 2023: 33 | - MetaQuotes stops supporting terminals older than build 1370. 34 | 35 | ###### March 2022: 36 | - MetaQuotes stops supporting terminals older than build 1347. 37 | 38 | ###### December 2021: 39 | - MetaQuotes stops supporting terminals older than build 1340. 40 | 41 | ###### July 2021: 42 | - MetaQuotes stops supporting terminals older than build 1310. 43 | 44 | ###### March 2021: 45 | - MetaQuotes stops supporting terminals older than build 1280. 46 | 47 | ###### November 2020: 48 | - MetaQuotes stops supporting terminals older than build 1220. 49 | 50 | ###### March 2019: 51 | - MetaQuotes stops supporting terminals older than build 1118. 52 | 53 | ###### October 2017: 54 | - MetaQuotes stops supporting terminals older than build 1065. 55 | 56 | ###### August 2016: 57 | - MetaQuotes stops supporting terminals older than build 940. 58 | 59 | ###### May 2015: 60 | - MetaQuotes stops supporting terminals older than build 745. 61 | -------------------------------------------------------------------------------- /bin/.mqlcrc.dist: -------------------------------------------------------------------------------- 1 | # 2 | # Copy this file to "~/.mqlcrc" and adjust the settings to your system. 3 | # ---------------------------------------------------------------------------------------------------- 4 | # Configuration for the MQL compiler script. Compiler locations may also be specified via environment. 5 | # Environment settings have higher priority than settings in this file. 6 | # 7 | # Paths support Unix and Windows notation. 8 | # Names with spaces must be quoted. Backward slashes must be doubled. 9 | # 10 | 11 | # path to the MT4 compiler for MQL4.0 (terminal builds <= 509) 12 | MT4_METALANG=':\\\\metalang.exe' 13 | 14 | # path to the MT4 MetaEditor for MQL4.5 (terminal builds > 509) 15 | MT4_METAEDITOR=':/windows-path/metaeditor.exe' 16 | 17 | # path to the MT5 MetaEditor for MQL5 (all MT5 builds) 18 | MT5_METAEDITOR='/c/unix-path/metaeditor64.exe' 19 | 20 | 21 | # source paths and predefined MQL4 versions 22 | mql40Sources+=('') 23 | mql40Sources+=('') 24 | 25 | mql45Sources+=('') 26 | mql45Sources+=('') 27 | 28 | 29 | # source paths and predefined include directories 30 | includeDirs['']=''; 31 | includeDirs['']=''; 32 | -------------------------------------------------------------------------------- /bin/README.md: -------------------------------------------------------------------------------- 1 | 2 | ### How to compile MQL programs from the command line? 3 | -------------------------------------------------------------------------------- /bin/debugview/Download.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://learn.microsoft.com/en-us/sysinternals/downloads/debugview 3 | -------------------------------------------------------------------------------- /bin/debugview/exclude-themida.ini: -------------------------------------------------------------------------------- 1 | DebugView Filter Definition File v1.0 2 | 3 | * 4 | GetScanList*;%s-----------------------------------------------*;--- Themida Professional --*;--- (c)2009 Oreans Technologies --*;-----------------------------------------------* 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | FFFFFF 24 | FF 25 | FFFFFF 26 | FF0080 27 | FFFFFF 28 | 4080FF 29 | FFFFFF 30 | 808040 31 | FFFFFF 32 | FF8000 33 | 0 34 | FF8080 35 | 0 36 | 80FF80 37 | 0 38 | FFFF80 39 | 0 40 | 80FF80 41 | 0 42 | 80FFFF 43 | FFFFFF 44 | FF 45 | FFFFFF 46 | FF0080 47 | FFFFFF 48 | 4080FF 49 | FFFFFF 50 | 808040 51 | FFFFFF 52 | FF8000 53 | 0 54 | FF8080 55 | 0 56 | 80FF80 57 | 0 58 | FFFF80 59 | 0 60 | 80FF80 61 | 0 62 | 80FFFF 63 | 80FFFF 64 | -------------------------------------------------------------------------------- /bin/debugview/include-rosasurfer.ini: -------------------------------------------------------------------------------- 1 | DebugView Filter Definition File v1.0 2 | 3 | ] Metatrader;] MT4;] MT5;] Tester;] T ;] MT4Expander 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | FFFFFF 25 | FF 26 | FFFFFF 27 | FF0080 28 | FFFFFF 29 | 4080FF 30 | FFFFFF 31 | 808040 32 | FFFFFF 33 | FF8000 34 | 0 35 | FF8080 36 | 0 37 | 80FF80 38 | 0 39 | FFFF80 40 | 0 41 | 80FF80 42 | 0 43 | 80FFFF 44 | FFFFFF 45 | FF 46 | FFFFFF 47 | FF0080 48 | FFFFFF 49 | 4080FF 50 | FFFFFF 51 | 808040 52 | FFFFFF 53 | FF8000 54 | 0 55 | FF8080 56 | 0 57 | 80FF80 58 | 0 59 | FFFF80 60 | 0 61 | 80FF80 62 | 0 63 | 80FFFF 64 | -------------------------------------------------------------------------------- /config/account-config.example.ini: -------------------------------------------------------------------------------- 1 | [Account] 2 | Company = 3 | Currency = 4 | Name = 5 | Alias = ; any string, obfuscates the account number in outbound messages (e.g. "real-USD-account") 6 | MaxOpenTickets = 7 | MaxOpenLots = 8 | Type = demo|real 9 | -------------------------------------------------------------------------------- /config/hotkeys.ini: -------------------------------------------------------------------------------- 1 | 2 | Instrument Infos=Alt+I 3 | 4 | 5 | 6 | Chart.Objects.UnselectAll=Alt+U 7 | Chart.Refresh=Alt+R 8 | Chart.SendTick=Alt+T 9 | Chart.ToggleAccountBalance=Ctrl+A 10 | Chart.ToggleOpenOrders=Alt+O 11 | Chart.ToggleTradeHistory=Alt+H 12 | Chart.ToggleUnitSize=Alt+D 13 | Config=Alt+C 14 | EA.ToggleMetrics=Alt+M 15 | Empty=Ctrl+P 16 | MarketWatch.Symbols=Ctrl+S 17 | ParameterStepper.Down=Alt+L 18 | ParameterStepper.Up=Alt+K 19 | ReopenAlerts=Alt+A 20 | SuperBars.TimeframeDown=Ctrl+L 21 | SuperBars.TimeframeUp=Ctrl+K 22 | 23 | 24 | -------------------------------------------------------------------------------- /config/start-proxy-off.ini: -------------------------------------------------------------------------------- 1 | 2 | ; There must be no whitespace before or after an equal sign. 3 | 4 | ; General settings 5 | EnableDDE=false 6 | EnableNews=false 7 | 8 | ; Proxy settings 9 | ProxyEnable=false 10 | ProxyServer=127.0.0.1:50087 11 | ProxyType=SOCKS5 12 | 13 | ; FTP settings 14 | FTPEnable=false 15 | 16 | ; MQL settings 17 | ExpertsEnable=true 18 | ExpertsDllImport=true 19 | ExpertsDllConfirm=false 20 | ExpertsExpImport=true 21 | ExpertsTrades=true 22 | ExpertsTradesConfirm=false 23 | 24 | ; Run script 25 | Script=CustomizeTerminal 26 | ScriptParameters= 27 | -------------------------------------------------------------------------------- /config/start-proxy-on.ini: -------------------------------------------------------------------------------- 1 | 2 | ; There must be no whitespace before or after an equal sign. 3 | 4 | ; General settings 5 | EnableDDE=false 6 | EnableNews=false 7 | 8 | ; Proxy settings 9 | ProxyEnable=true 10 | ProxyServer=127.0.0.1:50087 11 | ProxyType=SOCKS5 12 | 13 | ; FTP settings 14 | FTPEnable=false 15 | 16 | ; MQL settings 17 | ExpertsEnable=true 18 | ExpertsDllImport=true 19 | ExpertsDllConfirm=false 20 | ExpertsExpImport=true 21 | ExpertsTrades=true 22 | ExpertsTradesConfirm=false 23 | 24 | ; Run script 25 | Script=CustomizeTerminal 26 | ScriptParameters= 27 | -------------------------------------------------------------------------------- /etc/symbols/README.md: -------------------------------------------------------------------------------- 1 | 2 | For runtime creation of symbols the framework uses symbol templates in `/etc/symbols/`. 3 | 4 | @see `int rsfStdlib::CreateRawSymbol(string name, string description, string group, int digits, ...)` 5 | -------------------------------------------------------------------------------- /etc/symbols/SYMBOL_TYPE_EQUITY.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/etc/symbols/SYMBOL_TYPE_EQUITY.raw -------------------------------------------------------------------------------- /etc/symbols/SYMBOL_TYPE_FOREX.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/etc/symbols/SYMBOL_TYPE_FOREX.raw -------------------------------------------------------------------------------- /etc/symbols/SYMBOL_TYPE_INDEX.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/etc/symbols/SYMBOL_TYPE_INDEX.raw -------------------------------------------------------------------------------- /etc/symbols/SYMBOL_TYPE_PIPS.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/etc/symbols/SYMBOL_TYPE_PIPS.raw -------------------------------------------------------------------------------- /mql40/experts/ZigZag EA.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/experts/ZigZag EA.mq4 -------------------------------------------------------------------------------- /mql40/experts/tools/Account Guard.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/experts/tools/Account Guard.mq4 -------------------------------------------------------------------------------- /mql40/include/rsf/core/indicator.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/core/indicator.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/core/library.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/core/library.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/core/script.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/core/script.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/experts/README.md: -------------------------------------------------------------------------------- 1 | 2 | This directory contains common functionality used by experts only. 3 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/event/onCommand.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Process an incoming command. 3 | * 4 | * @param string cmd - command name 5 | * @param string params - command parameters 6 | * @param int keys - pressed modifier keys 7 | * 8 | * @return bool - success status of the executed command 9 | */ 10 | bool onCommand(string cmd, string params, int keys) { 11 | string fullCmd = cmd +":"+ params +":"+ keys; 12 | 13 | if (cmd == "toggle-metrics") { 14 | int direction = ifInt(keys & F_VK_SHIFT, METRIC_PREVIOUS, METRIC_NEXT); 15 | return(ToggleMetrics(direction, METRIC_NET_MONEY, METRIC_SIG_UNITS)); 16 | } 17 | else if (cmd == "toggle-open-orders") { 18 | return(ToggleOpenOrders()); 19 | } 20 | else if (cmd == "toggle-trade-history") { 21 | return(ToggleTradeHistory()); 22 | } 23 | else return(!logNotice("onCommand(1) "+ instance.name +" unsupported command: \""+ fullCmd +"\"")); 24 | 25 | return(!logWarn("onCommand(2) "+ instance.name +" cannot execute command \""+ fullCmd +"\" in status "+ StatusToStr(instance.status))); 26 | } 27 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/instance/IsTestInstance.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Whether the current instance was created in the tester. Also returns TRUE if a finished test is loaded into an online chart. 3 | * 4 | * @return bool 5 | */ 6 | bool IsTestInstance() { 7 | return(instance.isTest || __isTesting); 8 | } 9 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/instance/RestoreInstance.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Restore the internal state of the EA from a status file. 3 | * 4 | * @return bool - success status 5 | */ 6 | bool RestoreInstance() { 7 | if (IsLastError()) return(false); 8 | if (!ReadStatus()) return(false); // read and apply the status file 9 | if (!ValidateInputs()) return(false); // validate restored input parameters 10 | if (!SynchronizeStatus()) return(false); // synchronize restored order state with current server state 11 | return(true); 12 | } 13 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/instance/SetInstanceId.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Parse and set the passed instance id value. Format: "[T]123" 3 | * 4 | * @param _In_ string value - instance id value 5 | * @param _InOut_ bool error - in: mute parse errors (TRUE) or trigger a fatal error (FALSE) 6 | * out: whether parse errors occurred (stored in last_error) 7 | * @param _In_ string caller - caller identification (for error messages) 8 | * 9 | * @return bool - whether the instance id value was successfully set 10 | */ 11 | bool SetInstanceId(string value, bool &error, string caller) { 12 | string valueBak = value; 13 | bool muteErrors = error!=0; 14 | error = false; 15 | 16 | value = StrTrim(value); 17 | if (!StringLen(value)) return(false); 18 | 19 | bool isTest = false; 20 | int instanceId = 0; 21 | 22 | if (StrStartsWith(value, "T")) { 23 | isTest = true; 24 | value = StringTrimLeft(StrSubstr(value, 1)); 25 | } 26 | 27 | if (!StrIsDigits(value)) { 28 | error = true; 29 | if (muteErrors) return(!SetLastError(ERR_INVALID_PARAMETER)); 30 | return(!catch(caller +"->SetInstanceId(1) invalid instance id value: \""+ valueBak +"\" (must be digits only)", ERR_INVALID_PARAMETER)); 31 | } 32 | 33 | int iValue = StrToInteger(value); 34 | if (iValue < INSTANCE_ID_MIN || iValue > INSTANCE_ID_MAX) { 35 | error = true; 36 | if (muteErrors) return(!SetLastError(ERR_INVALID_PARAMETER)); 37 | return(!catch(caller +"->SetInstanceId(2) invalid instance id value: \""+ valueBak +"\" (range error)", ERR_INVALID_PARAMETER)); 38 | } 39 | 40 | instance.isTest = isTest; 41 | instance.id = iValue; 42 | Instance.ID = ifString(IsTestInstance(), "T", "") + StrPadLeft(instance.id, 3, "0"); 43 | SS.InstanceName(); 44 | return(true); 45 | } 46 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/instance/defines.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Instance id related constants and global vars. 3 | */ 4 | 5 | #define INSTANCE_ID_MIN 1 // range of valid instance ids 6 | #define INSTANCE_ID_MAX 999 // 7 | 8 | 9 | int instance.id; // actual instance id (also used to generate magic order numbers) 10 | string instance.name = ""; 11 | datetime instance.created; // local system time (also in tester) 12 | datetime instance.started; // trade server time (modeled in tester) 13 | datetime instance.stopped; // trade server time (modeled in tester) 14 | bool instance.isTest; // whether the instance is a test 15 | int instance.status; 16 | double instance.startEquity; 17 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/log/GetLogFilename.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Return the full name of the instance logfile. 3 | * 4 | * @return string - filename or an empty string in case of errors 5 | */ 6 | string GetLogFilename() { 7 | string name = GetStatusFilename(); 8 | if (!StringLen(name)) return(""); 9 | return(StrLeftTo(name, ".", -1) +".log"); 10 | } 11 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/metric/RecordMetrics.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Update the recorder with current metric values. 3 | * 4 | * @return int - error status 5 | */ 6 | int RecordMetrics() { 7 | if (recorder.mode == RECORDER_CUSTOM) { 8 | int size = ArraySize(metric.ready); 9 | if (size > METRIC_NET_MONEY) metric.currValue[METRIC_NET_MONEY] = stats[METRIC_NET_MONEY][S_TOTAL_PROFIT]; 10 | if (size > METRIC_NET_UNITS) metric.currValue[METRIC_NET_UNITS] = stats[METRIC_NET_UNITS][S_TOTAL_PROFIT]; 11 | if (size > METRIC_SIG_UNITS) metric.currValue[METRIC_SIG_UNITS] = stats[METRIC_SIG_UNITS][S_TOTAL_PROFIT]; 12 | } 13 | return(NO_ERROR); 14 | } 15 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/metric/defines.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Metric related constants and global vars. 3 | */ 4 | 5 | #define METRIC_NET_MONEY 1 // default metrics 6 | #define METRIC_NET_UNITS 2 7 | #define METRIC_SIG_UNITS 3 8 | 9 | #define METRIC_NEXT 1 // directions for toggling the status display via command 10 | #define METRIC_PREVIOUS -1 11 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/onTick.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Generic template for an EA's onTick() function. 3 | * 4 | * @return int - error status 5 | */ 6 | int onTick() { 7 | if (!instance.status) return(catch("onTick(1) illegal instance.status: "+ instance.status, ERR_ILLEGAL_STATE)); 8 | double signal[3]; 9 | 10 | if (__isChart) { 11 | if (!HandleCommands()) return(last_error); // process incoming commands (may switch on/off the instance) 12 | } 13 | 14 | if (instance.status != STATUS_STOPPED) { 15 | if (instance.status == STATUS_WAITING) { 16 | if (IsStartSignal(signal)) { 17 | StartTrading(signal); 18 | } 19 | } 20 | else if (instance.status == STATUS_TRADING) { 21 | UpdateStatus(); // update client-side status 22 | 23 | if (IsStopSignal(signal)) { 24 | StopTrading(signal); 25 | } 26 | else { // update server-side status 27 | ManageOpenPositions(); // add/reduce/reverse positions, take (partial) profits 28 | UpdatePendingOrders(); // update entry and/or exit limits 29 | } 30 | } 31 | RecordMetrics(); 32 | } 33 | return(last_error); 34 | } 35 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/CreateStatusBox_6.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Creates a status display box for 6 lines. Consists of overlapping rectangles made of font "Webdings", char "g". 3 | * Called from onInit() only. 4 | * 5 | * @return bool - success status 6 | */ 7 | bool CreateStatusBox() { 8 | if (!__isChart) return(true); 9 | 10 | int x[]={2, 66, 136}, y=50, fontSize=54, sizeofX=ArraySize(x); 11 | color bgColor = LemonChiffon; 12 | 13 | for (int i=0; i < sizeofX; i++) { 14 | string label = ProgramName() +".statusbox."+ (i+1); 15 | if (ObjectFind(label) == -1) if (!ObjectCreateRegister(label, OBJ_LABEL)) return(false); 16 | ObjectSet(label, OBJPROP_CORNER, CORNER_TOP_LEFT); 17 | ObjectSet(label, OBJPROP_XDISTANCE, x[i]); 18 | ObjectSet(label, OBJPROP_YDISTANCE, y); 19 | ObjectSetText(label, "g", fontSize, "Webdings", bgColor); 20 | } 21 | return(!catch("CreateStatusBox(1)")); 22 | } 23 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/SS.All.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * ShowStatus: Update all string representations. 3 | */ 4 | void SS.All() { 5 | SS.InstanceName(); 6 | SS.MetricDescription(); 7 | SS.OpenLots(); 8 | SS.ClosedTrades(); 9 | SS.TotalProfit(); 10 | SS.ProfitStats(); 11 | } 12 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/SS.ClosedTrades.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * ShowStatus: Update the string summary of the closed trades. 3 | */ 4 | void SS.ClosedTrades() { 5 | int size = ArrayRange(history, 0); 6 | if (!size) { 7 | status.closedTrades = "-"; 8 | } 9 | else { 10 | CalculateStats(); 11 | 12 | switch (status.activeMetric) { 13 | case METRIC_NET_MONEY: 14 | status.closedTrades = size +" trades avg: "+ NumberToStr(stats[METRIC_NET_MONEY][S_TRADES_AVG_PROFIT], "R+.2") +" "+ AccountCurrency(); 15 | break; 16 | case METRIC_NET_UNITS: 17 | status.closedTrades = size +" trades avg: "+ NumberToStr(stats[METRIC_NET_UNITS][S_TRADES_AVG_PROFIT]/pUnit, "R+."+ pDigits) +" "+ spUnit; 18 | break; 19 | case METRIC_SIG_UNITS: 20 | status.closedTrades = size +" trades avg: "+ NumberToStr(stats[METRIC_SIG_UNITS][S_TRADES_AVG_PROFIT]/pUnit, "R+."+ pDigits) +" "+ spUnit; 21 | break; 22 | 23 | default: 24 | return(!catch("SS.ClosedTrades(1) "+ instance.name +" illegal value of status.activeMetric: "+ status.activeMetric, ERR_ILLEGAL_STATE)); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/SS.MetricDescription.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * ShowStatus: Update the description of the displayed metric. 3 | */ 4 | void SS.MetricDescription() { 5 | switch (status.activeMetric) { 6 | case METRIC_NET_MONEY: 7 | status.metricDescription = "Net PnL after all costs in "+ AccountCurrency() + NL + "-----------------------------------"; 8 | break; 9 | case METRIC_NET_UNITS: 10 | status.metricDescription = "Net PnL after all costs in "+ spUnit + NL + "---------------------------------"+ ifString(spUnit=="point", "--", ""); 11 | break; 12 | case METRIC_SIG_UNITS: 13 | status.metricDescription = "Signal PnL before spread/any costs in "+ spUnit + NL + "-------------------------------------------------"+ ifString(spUnit=="point", "--", ""); 14 | break; 15 | 16 | default: 17 | return(!catch("SS.MetricDescription(1) "+ instance.name +" illegal value of status.activeMetric: "+ status.activeMetric, ERR_ILLEGAL_STATE)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/SS.OpenLots.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * ShowStatus: Update the string representation of the open position size. 3 | */ 4 | void SS.OpenLots() { 5 | if (!open.lots) status.openLots = "-"; 6 | else if (open.type == OP_LONG) status.openLots = "+"+ NumberToStr(open.lots, ".+") +" lot"; 7 | else status.openLots = "-"+ NumberToStr(open.lots, ".+") +" lot"; 8 | } 9 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/SS.ProfitStats.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * ShowStatus: Update the string representaton of the PnL statistics. 3 | */ 4 | void SS.ProfitStats() { 5 | // not before a position was opened 6 | if (!open.ticket && !ArrayRange(history, 0)) { 7 | status.profitStats = ""; 8 | } 9 | else { 10 | string sMaxProfit="", sMaxDrawdown=""; 11 | int metric = status.activeMetric; 12 | 13 | switch (metric) { 14 | case METRIC_NET_MONEY: 15 | if (ShowProfitInPercent) { 16 | sMaxProfit = NumberToStr(MathDiv(stats[metric][S_MAX_PROFIT ], instance.startEquity) * 100, "R+.2"); 17 | sMaxDrawdown = NumberToStr(MathDiv(stats[metric][S_MAX_ABS_DRAWDOWN], instance.startEquity) * 100, "R+.2"); 18 | } 19 | else { 20 | sMaxProfit = NumberToStr(stats[metric][S_MAX_PROFIT ], "R+.2"); 21 | sMaxDrawdown = NumberToStr(stats[metric][S_MAX_ABS_DRAWDOWN], "R+.2"); 22 | } 23 | break; 24 | 25 | case METRIC_NET_UNITS: 26 | case METRIC_SIG_UNITS: 27 | sMaxProfit = NumberToStr(stats[metric][S_MAX_PROFIT ]/pUnit, "R+."+ pDigits); 28 | sMaxDrawdown = NumberToStr(stats[metric][S_MAX_ABS_DRAWDOWN]/pUnit, "R+."+ pDigits); 29 | break; 30 | 31 | default: 32 | return(!catch("SS.ProfitStats(1) "+ instance.name +" illegal value of status.activeMetric: "+ status.activeMetric, ERR_ILLEGAL_STATE)); 33 | } 34 | status.profitStats = StringConcatenate("(", sMaxDrawdown, "/", sMaxProfit, ")"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/SS.TotalProfit.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * ShowStatus: Update the string representation of the total instance PnL. 3 | */ 4 | void SS.TotalProfit() { 5 | // not before a position was opened 6 | if (!open.ticket && !ArrayRange(history, 0)) { 7 | status.totalProfit = "-"; 8 | } 9 | else { 10 | int metric = status.activeMetric; 11 | switch (metric) { 12 | case METRIC_NET_MONEY: 13 | if (ShowProfitInPercent) status.totalProfit = NumberToStr(MathDiv(stats[metric][S_TOTAL_PROFIT], instance.startEquity) * 100, "R+.2") +"%"; 14 | else status.totalProfit = NumberToStr(stats[metric][S_TOTAL_PROFIT], "R+.2") +" "+ AccountCurrency(); 15 | break; 16 | 17 | case METRIC_NET_UNITS: 18 | case METRIC_SIG_UNITS: 19 | status.totalProfit = NumberToStr(stats[metric][S_TOTAL_PROFIT]/pUnit, "R+."+ pDigits) +" "+ spUnit; 20 | break; 21 | 22 | default: 23 | return(!catch("SS.TotalProfit(1) "+ instance.name +" illegal value of status.activeMetric: "+ status.activeMetric, ERR_ILLEGAL_STATE)); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/ShowOpenOrders.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Display open orders. 3 | * 4 | * @param bool show - display status: 5 | * TRUE - show orders 6 | * FALSE - hide displayed orders 7 | * 8 | * @return int - number of displayed orders or EMPTY (-1) in case of errors 9 | */ 10 | int ShowOpenOrders(bool show) { 11 | show = show!=0; 12 | int orders = 0; 13 | 14 | if (show) { 15 | string types[] = {"buy", "sell"}; 16 | color clrs[] = {CLR_OPEN_LONG, CLR_OPEN_SHORT}; 17 | 18 | if (open.ticket != NULL) { 19 | double openPrice = ifDouble(status.activeMetric == METRIC_SIG_UNITS, open.priceSig, open.price); 20 | string label = StringConcatenate("#", open.ticket, " ", types[open.type], " ", NumberToStr(open.lots, ".+"), " at ", NumberToStr(openPrice, PriceFormat)); 21 | 22 | if (ObjectFind(label) == -1) ObjectCreate(label, OBJ_ARROW, 0, 0, 0); 23 | ObjectSet (label, OBJPROP_ARROWCODE, SYMBOL_ORDEROPEN); 24 | ObjectSet (label, OBJPROP_COLOR, clrs[open.type]); 25 | ObjectSet (label, OBJPROP_TIME1, open.time); 26 | ObjectSet (label, OBJPROP_PRICE1, openPrice); 27 | ObjectSetText(label, instance.name); 28 | orders++; 29 | } 30 | } 31 | else { 32 | for (int i=ObjectsTotal()-1; i >= 0; i--) { 33 | label = ObjectName(i); 34 | 35 | if (StringGetChar(label, 0) == '#') { 36 | if (ObjectType(label) == OBJ_ARROW) { 37 | int arrow = ObjectGet(label, OBJPROP_ARROWCODE); 38 | color clr = ObjectGet(label, OBJPROP_COLOR); 39 | 40 | if (arrow == SYMBOL_ORDEROPEN) { 41 | if (clr!=CLR_OPEN_LONG && clr!=CLR_OPEN_SHORT) continue; 42 | } 43 | else if (arrow == SYMBOL_ORDERCLOSE) { 44 | if (clr!=CLR_OPEN_TAKEPROFIT && clr!=CLR_OPEN_STOPLOSS) continue; 45 | } 46 | ObjectDelete(label); 47 | } 48 | } 49 | } 50 | } 51 | 52 | if (!catch("ShowOpenOrders(1)")) 53 | return(orders); 54 | return(EMPTY); 55 | } 56 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/StatusDescription.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Return a description of an instance status code. 3 | * 4 | * @param int status 5 | * 6 | * @return string - description or an empty string in case of errors 7 | */ 8 | string StatusDescription(int status) { 9 | switch (status) { 10 | case NULL : return("(undefined)"); 11 | case STATUS_WAITING: return("waiting" ); 12 | case STATUS_TRADING: return("trading" ); 13 | case STATUS_STOPPED: return("stopped" ); 14 | } 15 | return(_EMPTY_STR(catch("StatusDescription(1) "+ instance.name +" invalid parameter status: "+ status, ERR_INVALID_PARAMETER))); 16 | } 17 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/StatusToStr.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Return a readable representation of an instance status code. 3 | * 4 | * @param int status 5 | * 6 | * @return string 7 | */ 8 | string StatusToStr(int status) { 9 | switch (status) { 10 | case NULL : return("(null)" ); 11 | case STATUS_WAITING: return("STATUS_WAITING"); 12 | case STATUS_TRADING: return("STATUS_TRADING"); 13 | case STATUS_STOPPED: return("STATUS_STOPPED"); 14 | } 15 | return(_EMPTY_STR(catch("StatusToStr(1) "+ instance.name +" invalid parameter status: "+ status, ERR_INVALID_PARAMETER))); 16 | } 17 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/defines.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Status related constants and global vars. 3 | */ 4 | 5 | #define STATUS_WAITING 1 // instance is switched on, has no open orders and waits for trade signals 6 | #define STATUS_TRADING 2 // instance is switched on and manages open orders 7 | #define STATUS_STOPPED 3 // instance is switched off (no open orders, no trading) 8 | 9 | // volatile status vars 10 | string status.filename = ""; // filepath relative to the MQL sandbox directory 11 | int status.activeMetric = 1; 12 | bool status.showOpenOrders; 13 | bool status.showTradeHistory; 14 | 15 | // cache vars to speed-up ShowStatus() 16 | string status.metricDescription = ""; 17 | string status.openLots = ""; 18 | string status.closedTrades = ""; 19 | string status.totalProfit = ""; 20 | string status.profitStats = ""; 21 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/file/FindStatusFile.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Find an existing status file for the specified instance. 3 | * 4 | * @param int instanceId - instance id 5 | * @param bool isTest - whether the instance is a test instance 6 | * 7 | * @return string - file path relative to the MQL "files" directory; 8 | * an empty string if no file was found or in case of errors 9 | */ 10 | string FindStatusFile(int instanceId, bool isTest) { 11 | isTest = isTest!=0; 12 | if (instanceId < INSTANCE_ID_MIN || instanceId > INSTANCE_ID_MAX) return(_EMPTY_STR(catch("FindStatusFile(1) "+ instance.name +" invalid parameter instanceId: "+ instanceId, ERR_INVALID_PARAMETER))); 13 | 14 | string sandboxDir = GetMqlSandboxPath() +"\\"; 15 | string statusDir = "presets\\"+ ifString(isTest, "Tester", GetAccountCompanyId()) +"\\"; 16 | string basePattern = ProgramName() +", "+ Symbol() +",* id="+ StrPadLeft(""+ instanceId, 3, "0") +".set"; // matches files with and w/o user-specified data in the name 17 | string pathPattern = sandboxDir + statusDir + basePattern; 18 | 19 | string result[]; 20 | int size = FindFileNames(pathPattern, result, FF_FILESONLY); 21 | if (size > 1) return(_EMPTY_STR(catch("FindStatusFile(2) "+ instance.name +" multiple files found matching pattern \""+ pathPattern +"\"", ERR_RUNTIME_ERROR))); 22 | if (size < 1) return(""); 23 | 24 | return(statusDir + result[0]); 25 | } 26 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/file/GetStatusFilename.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Return the name of the status file. If the name is not yet set, an attempt is made to find an existing status file. 3 | * 4 | * @param bool relative [optional] - whether to return the absolute path or the path relative to the MQL "files" directory 5 | * (default: absolute path) 6 | * 7 | * @return string - filename or an empty string in case of errors 8 | */ 9 | string GetStatusFilename(bool relative = false) { 10 | relative = relative!=0; 11 | 12 | if (status.filename == "") { 13 | status.filename = FindStatusFile(instance.id, instance.isTest); // intentionally trigger an error if instance.id is not set 14 | if (status.filename == "") return(""); 15 | } 16 | 17 | if (relative) 18 | return(status.filename); 19 | return(GetMqlSandboxPath() +"\\"+ status.filename); 20 | } 21 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/file/ReadStatus.General.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Read/validate account, symbol and test infos (if any) stored in the status file. 3 | * 4 | * @param string file - status filename 5 | * 6 | * @return bool - success status 7 | */ 8 | bool ReadStatus.General(string file) { 9 | string section = "General"; 10 | string sAccount = GetIniStringA(file, section, "Account", ""); // string Account = ICMarkets:12345678 (demo) 11 | string sSymbol = GetIniStringA(file, section, "Symbol", ""); // string Symbol = EURUSD 12 | string sTestSymbol = GetIniStringA(file, "Test", "Symbol", ""); // string Test.Symbol = EURUSD 13 | 14 | if (sTestSymbol == "") { 15 | string sCurrentAccount = GetAccountCompanyId() +":"+ GetAccountNumber(); 16 | if (!StrCompareI(StrLeftTo(sAccount, " ("), sCurrentAccount)) return(!catch("ReadStatus.General(1) "+ instance.name +" account mis-match: current \""+ sCurrentAccount +"\" vs. \""+ sAccount +"\" in status file \""+ file +"\"", ERR_INVALID_CONFIG_VALUE)); 17 | if (!StrCompareI(sSymbol, Symbol())) return(!catch("ReadStatus.General(2) "+ instance.name +" symbol mis-match: current \""+ Symbol() +"\" vs. \""+ sSymbol +"\" in status file \""+ file +"\"", ERR_INVALID_CONFIG_VALUE)); 18 | } 19 | else { 20 | if (!StrCompareI(sTestSymbol, Symbol())) return(!catch("ReadStatus.General(3) "+ instance.name +" symbol mis-match: current \""+ Symbol() +"\" vs. \""+ sTestSymbol +"\" in status file \""+ file +"\"", ERR_INVALID_CONFIG_VALUE)); 21 | } 22 | return(!catch("ReadStatus.General(4)")); 23 | } 24 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/file/ReadStatus.Targets.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Read and restore StopLoss and TakeProfit targets from the status file. 3 | * 4 | * @param string file - status filename 5 | * 6 | * @return bool - success status 7 | */ 8 | bool ReadStatus.Targets(string file) { 9 | string section = "Inputs"; 10 | 11 | Initial.TakeProfit = GetIniInt(file, section, "Initial.TakeProfit" ); // int Initial.TakeProfit = 100 12 | Initial.StopLoss = GetIniInt(file, section, "Initial.StopLoss" ); // int Initial.StopLoss = 50 13 | Target1 = GetIniInt(file, section, "Target1" ); // int Target1 = 0 14 | Target1.ClosePercent = GetIniInt(file, section, "Target1.ClosePercent"); // int Target1.ClosePercent = 0 15 | Target1.MoveStopTo = GetIniInt(file, section, "Target1.MoveStopTo" ); // int Target1.MoveStopTo = 1 16 | Target2 = GetIniInt(file, section, "Target2" ); // int Target2 = 20 17 | Target2.ClosePercent = GetIniInt(file, section, "Target2.ClosePercent"); // int Target2.ClosePercent = 30 18 | Target2.MoveStopTo = GetIniInt(file, section, "Target2.MoveStopTo" ); // int Target2.MoveStopTo = 0 19 | Target3 = GetIniInt(file, section, "Target3" ); // int Target3 = 40 20 | Target3.ClosePercent = GetIniInt(file, section, "Target3.ClosePercent"); // int Target3.ClosePercent = 30 21 | Target3.MoveStopTo = GetIniInt(file, section, "Target3.MoveStopTo" ); // int Target3.MoveStopTo = 0 22 | Target4 = GetIniInt(file, section, "Target4" ); // int Target4 = 60 23 | Target4.ClosePercent = GetIniInt(file, section, "Target4.ClosePercent"); // int Target4.ClosePercent = 30 24 | Target4.MoveStopTo = GetIniInt(file, section, "Target4.MoveStopTo" ); // int Target4.MoveStopTo = 0 25 | 26 | return(!catch("ReadStatus.Targets(1)")); 27 | } 28 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/file/ReadStatus.TradeHistory.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Read and restore the trade history from the status file. 3 | * 4 | * @param string file - status filename 5 | * 6 | * @return bool - success status 7 | */ 8 | bool ReadStatus.TradeHistory(string file) { 9 | // read history keys 10 | string section = "Trade history", keys[], sTrade=""; 11 | int size = GetIniKeys(file, section, keys), pos; 12 | if (size < 0) return(false); 13 | 14 | // restore found keys 15 | for (int i=0; i < size; i++) { 16 | sTrade = GetIniStringA(file, section, keys[i], ""); // [full|part].{i} = {data} 17 | pos = ReadStatus.HistoryRecord(keys[i], sTrade); 18 | if (pos < 0) return(!catch("ReadStatus.TradeHistory(1) "+ instance.name +" invalid history record in status file \""+ file +"\", key: \""+ keys[i] +"\"", ERR_INVALID_FILE_FORMAT)); 19 | } 20 | return(!catch("ReadStatus.TradeHistory(2)")); 21 | } 22 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/file/SaveStatus.General.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Write account, symbol and test infos (if any) to the status file. 3 | * 4 | * @param string file - status filename 5 | * @param bool fileExists - whether the status file exists 6 | * 7 | * @return bool - success status 8 | */ 9 | bool SaveStatus.General(string file, bool fileExists) { 10 | fileExists = fileExists!=0; 11 | 12 | string separator = ""; 13 | if (!fileExists) separator = CRLF; // an empty line separator 14 | 15 | string section = "General"; 16 | WriteIniString(file, section, "Account", GetAccountCompanyId() +":"+ GetAccountNumber() +" ("+ ifString(IsDemoFix(), "demo", "real") +")"+ ifString(__isTesting, separator, "")); 17 | 18 | if (!__isTesting) { 19 | WriteIniString(file, section, "AccountCurrency", AccountCurrency()); 20 | WriteIniString(file, section, "Symbol", Symbol() + separator); 21 | } 22 | else { 23 | section = "Test"; 24 | WriteIniString(file, section, "Currency", AccountCurrency()); 25 | WriteIniString(file, section, "Symbol", Symbol()); 26 | WriteIniString(file, section, "TimeRange", TimeToStr(Test.GetStartDate(), TIME_DATE) +"-"+ TimeToStr(Test.GetEndDate()-1*DAY, TIME_DATE)); 27 | WriteIniString(file, section, "Period", PeriodDescription()); 28 | WriteIniString(file, section, "BarModel", BarModelDescription(__Test.barModel)); 29 | WriteIniString(file, section, "Spread", DoubleToStr((_Ask-_Bid)/pUnit, pDigits) +" "+ spUnit); 30 | double commission = GetCommission(); 31 | string sCommission = DoubleToStr(commission, 2); 32 | if (NE(commission, 0)) { 33 | double tickValue = MarketInfo(Symbol(), MODE_TICKVALUE); 34 | double tickSize = MarketInfo(Symbol(), MODE_TICKSIZE); 35 | double price = MathDiv(commission, MathDiv(tickValue, tickSize)); 36 | sCommission = sCommission +" ("+ DoubleToStr(price/pUnit, pDigits) +" "+ spUnit +")"; 37 | } 38 | WriteIniString(file, section, "Commission", sCommission + separator); 39 | } 40 | return(!catch("SaveStatus.General(1)")); 41 | } 42 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/file/SaveStatus.Targets.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Write input parameters for StopLoss and TakeProfit targets to the status file. 3 | * 4 | * @param string file - status filename 5 | * @param bool fileExists - whether the status file exists 6 | * 7 | * @return bool - success status 8 | */ 9 | bool SaveStatus.Targets(string file, bool fileExists) { 10 | fileExists = fileExists!=0; 11 | 12 | string separator = ""; 13 | if (!fileExists) separator = CRLF; // an empty line separator 14 | 15 | string section = "Inputs"; 16 | WriteIniString(file, section, "Initial.TakeProfit", /*int*/ Initial.TakeProfit ); 17 | WriteIniString(file, section, "Initial.StopLoss", /*int*/ Initial.StopLoss + separator); 18 | WriteIniString(file, section, "Target1", /*int*/ Target1 ); 19 | WriteIniString(file, section, "Target1.ClosePercent", /*int*/ Target1.ClosePercent); 20 | WriteIniString(file, section, "Target1.MoveStopTo", /*int*/ Target1.MoveStopTo + separator); 21 | WriteIniString(file, section, "Target2", /*int*/ Target2 ); 22 | WriteIniString(file, section, "Target2.ClosePercent", /*int*/ Target2.ClosePercent); 23 | WriteIniString(file, section, "Target2.MoveStopTo", /*int*/ Target2.MoveStopTo + separator); 24 | WriteIniString(file, section, "Target3", /*int*/ Target3 ); 25 | WriteIniString(file, section, "Target3.ClosePercent", /*int*/ Target3.ClosePercent); 26 | WriteIniString(file, section, "Target3.MoveStopTo", /*int*/ Target3.MoveStopTo + separator); 27 | WriteIniString(file, section, "Target4", /*int*/ Target4 ); 28 | WriteIniString(file, section, "Target4.ClosePercent", /*int*/ Target4.ClosePercent); 29 | WriteIniString(file, section, "Target4.MoveStopTo", /*int*/ Target4.MoveStopTo + separator); 30 | 31 | return(!catch("SaveStatus.Targets(1)")); 32 | } 33 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/file/SaveStatus.TradeHistory.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Write the trade history to the status file. 3 | * 4 | * @param string file - status filename 5 | * @param bool fileExists - whether the status file exists 6 | * 7 | * @return bool - success status 8 | */ 9 | bool SaveStatus.TradeHistory(string file, bool fileExists) { 10 | fileExists = fileExists!=0; 11 | 12 | string separator = ""; 13 | if (!fileExists) separator = CRLF; // an empty line separator 14 | 15 | double netProfit, netProfitP, sigProfitP; 16 | 17 | string section = "Trade history"; 18 | int size = ArrayRange(history, 0); 19 | for (int i=0; i < size; i++) { 20 | WriteIniString(file, section, "full."+ i, HistoryRecordToStr(i, false)); 21 | netProfit += history[i][H_NETPROFIT_M ]; 22 | netProfitP += history[i][H_NETPROFIT_P ]; 23 | sigProfitP += history[i][H_SIG_PROFIT_P]; 24 | } 25 | 26 | size = ArrayRange(partialClose, 0); 27 | for (i=0; i < size; i++) { 28 | WriteIniString(file, section, "part."+ i, HistoryRecordToStr(i, true)); 29 | } 30 | 31 | // cross-check stored 'close' stats 32 | if (NE(netProfit, stats[METRIC_NET_MONEY][S_CLOSED_PROFIT], 2)) return(!catch("SaveStatus.TradeHistory(1) "+ instance.name +" sum(history[NETPROFIT_M]) != stats.closedNetProfit (" + NumberToStr(netProfit, ".2+") +" != "+ NumberToStr(stats[METRIC_NET_MONEY][S_CLOSED_PROFIT], ".2+") +")", ERR_ILLEGAL_STATE)); 33 | if (NE(netProfitP, stats[METRIC_NET_UNITS][S_CLOSED_PROFIT], Digits)) return(!catch("SaveStatus.TradeHistory(2) "+ instance.name +" sum(history[NETPROFIT_P]) != stats.closedNetProfitP (" + NumberToStr(netProfitP, "."+ Digits +"+") +" != "+ NumberToStr(stats[METRIC_NET_UNITS][S_CLOSED_PROFIT], "."+ Digits +"+") +")", ERR_ILLEGAL_STATE)); 34 | if (NE(sigProfitP, stats[METRIC_SIG_UNITS][S_CLOSED_PROFIT], Digits)) return(!catch("SaveStatus.TradeHistory(3) "+ instance.name +" sum(history[SIG_PROFIT_P]) != stats.closedSigProfitP ("+ NumberToStr(sigProfitP, "."+ Digits +"+") +" != "+ NumberToStr(stats[METRIC_SIG_UNITS][S_CLOSED_PROFIT], "."+ Digits +"+") +")", ERR_ILLEGAL_STATE)); 35 | 36 | return(!catch("SaveStatus.TradeHistory(4)")); 37 | } 38 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/file/SetStatusFilename.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Initializes the name of the used status file. Requires 'instance.id' and 'instance.created' to be set. 3 | * 4 | * If the strategy implements the function GetStatusFilenameData() the returned string will be inserted into the resulting 5 | * filename. This can be used to insert distinctive runtime parameters into the name (e.g. SL/TP vars or trading modes). 6 | * 7 | * @return bool - success status 8 | */ 9 | bool SetStatusFilename() { 10 | if (status.filename != "") return(!catch("SetStatusFilename(1) "+ instance.name +" cannot modify an already set status filename: \""+ status.filename +"\"", ERR_ILLEGAL_STATE)); 11 | if (!instance.id) return(!catch("SetStatusFilename(2) "+ instance.name +" illegal value of instance.id: 0", ERR_ILLEGAL_STATE)); 12 | if (!instance.created) return(!catch("SetStatusFilename(3) "+ instance.name +" cannot create status filename (instance.created not set)", ERR_ILLEGAL_STATE)); 13 | 14 | string userData = StrTrim(GetStatusFilenameData()); 15 | if (userData != "") userData = userData +", "; 16 | 17 | string directory = "presets\\"+ ifString(IsTestInstance(), "Tester", GetAccountCompanyId()) +"\\"; 18 | string baseName = ProgramName() +", "+ Symbol() +","+ PeriodDescription() +" "+ userData + GmtTimeFormat(instance.created, "%Y-%m-%d %H.%M") +", id="+ StrPadLeft(instance.id, 3, "0") +".set"; 19 | status.filename = directory + baseName; 20 | 21 | return(!catch("SetStatusFilename(4)")); 22 | } 23 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/volatile/RemoveVolatileStatus.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Remove stored volatile runtime vars from chart and chart window. 3 | * 4 | * @return bool - success status 5 | */ 6 | bool RemoveVolatileStatus() { 7 | string name = ProgramName(); 8 | 9 | // input string Instance.ID 10 | if (__isChart) { 11 | string key = name +".Instance.ID"; 12 | string sValue = RemoveWindowStringA(__ExecutionContext[EC.chart], key); 13 | Chart.RestoreString(key, sValue, true); 14 | } 15 | 16 | // int status.activeMetric 17 | if (__isChart) { 18 | key = name +".status.activeMetric"; 19 | int iValue = RemoveWindowIntegerA(__ExecutionContext[EC.chart], key); 20 | Chart.RestoreInt(key, iValue, true); 21 | } 22 | 23 | // bool status.showOpenOrders 24 | if (__isChart) { 25 | key = name +".status.showOpenOrders"; 26 | bool bValue = RemoveWindowIntegerA(__ExecutionContext[EC.chart], key); 27 | Chart.RestoreBool(key, bValue, true); 28 | } 29 | 30 | // bool status.showTradeHistory 31 | if (__isChart) { 32 | key = name +".status.showTradeHistory"; 33 | bValue = RemoveWindowIntegerA(__ExecutionContext[EC.chart], key); 34 | Chart.RestoreBool(key, bValue, true); 35 | } 36 | 37 | // event object for chart commands 38 | if (__isChart) { 39 | key = "EA.status"; 40 | if (ObjectFind(key) != -1) ObjectDelete(key); 41 | } 42 | return(!catch("RemoveVolatileStatus(1)")); 43 | } 44 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/volatile/StoreVolatileStatus.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Store volatile runtime vars in chart and chart window (for template reload, terminal restart, recompilation etc). 3 | * 4 | * @return bool - success status 5 | */ 6 | bool StoreVolatileStatus() { 7 | string name = ProgramName(); 8 | 9 | // input string Instance.ID 10 | string value = ifString(instance.isTest, "T", "") + StrPadLeft(instance.id, 3, "0"); 11 | Instance.ID = value; 12 | if (__isChart) { 13 | string key = name +".Instance.ID"; 14 | SetWindowStringA(__ExecutionContext[EC.chart], key, value); 15 | Chart.StoreString(key, value); 16 | } 17 | 18 | // int status.activeMetric 19 | if (__isChart) { 20 | key = name +".status.activeMetric"; 21 | SetWindowIntegerA(__ExecutionContext[EC.chart], key, status.activeMetric); 22 | Chart.StoreInt(key, status.activeMetric); 23 | } 24 | 25 | // bool status.showOpenOrders 26 | if (__isChart) { 27 | key = name +".status.showOpenOrders"; 28 | SetWindowIntegerA(__ExecutionContext[EC.chart], key, ifInt(status.showOpenOrders, 1, -1)); 29 | Chart.StoreBool(key, status.showOpenOrders); 30 | } 31 | 32 | // bool status.showTradeHistory 33 | if (__isChart) { 34 | key = name +".status.showTradeHistory"; 35 | SetWindowIntegerA(__ExecutionContext[EC.chart], key, ifInt(status.showTradeHistory, 1, -1)); 36 | Chart.StoreBool(key, status.showTradeHistory); 37 | } 38 | return(!catch("StoreVolatileStatus(1)")); 39 | } 40 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/volatile/ToggleMetrics.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Toggle the EA display status between available metrics. 3 | * 4 | * @param int direction - METRIC_NEXT|METRIC_PREVIOUS 5 | * @param int minId - min metric id 6 | * @param int maxId - max metric id 7 | * 8 | * @return bool - success status 9 | */ 10 | bool ToggleMetrics(int direction, int minId, int maxId) { 11 | if (direction!=METRIC_NEXT && direction!=METRIC_PREVIOUS) return(!catch("ToggleMetrics(1) "+ instance.name +" invalid parameter direction: "+ direction, ERR_INVALID_PARAMETER)); 12 | 13 | int prevMetric = status.activeMetric; 14 | 15 | status.activeMetric += direction; 16 | if (status.activeMetric < minId) status.activeMetric = maxId; 17 | if (status.activeMetric > maxId) status.activeMetric = minId; 18 | StoreVolatileStatus(); 19 | SS.All(); 20 | 21 | if (prevMetric==METRIC_SIG_UNITS || status.activeMetric==METRIC_SIG_UNITS) { 22 | if (status.showOpenOrders) { 23 | ToggleOpenOrders(false); 24 | ToggleOpenOrders(false); 25 | } 26 | if (status.showTradeHistory) { 27 | ToggleTradeHistory(false); 28 | ToggleTradeHistory(false); 29 | } 30 | } 31 | return(true); 32 | } 33 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/volatile/ToggleOpenOrders.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Toggle the display of open orders. 3 | * 4 | * @param bool soundOnNoOrders [optional] - whether to play a sound if no open orders exist (default: yes) 5 | * 6 | * @return bool - success status 7 | */ 8 | bool ToggleOpenOrders(bool soundOnNoOrders = true) { 9 | soundOnNoOrders = soundOnNoOrders!=0; 10 | 11 | // toggle status 12 | bool show = !status.showOpenOrders; 13 | 14 | if (show) { 15 | int orders = ShowOpenOrders(true); 16 | if (!orders) { // Without any open orders status must be set to 'off' 17 | show = false; // and existing markers cleared. 18 | if (soundOnNoOrders) PlaySoundEx("Plonk.wav"); 19 | } 20 | } 21 | if (!show) orders = ShowOpenOrders(false); 22 | if (orders < 0) return(false); 23 | 24 | // store status 25 | status.showOpenOrders = show; 26 | StoreVolatileStatus(); 27 | 28 | if (__isTesting) WindowRedraw(); 29 | return(!catch("ToggleOpenOrders(2)")); 30 | } 31 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/status/volatile/ToggleTradeHistory.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Toggle the display of closed trades. 3 | * 4 | * @param bool soundOnNoTrades [optional] - whether to play a sound if no closed trades exist (default: yes) 5 | * 6 | * @return bool - success status 7 | */ 8 | bool ToggleTradeHistory(bool soundOnNoTrades = true) { 9 | soundOnNoTrades = soundOnNoTrades!=0; 10 | 11 | // toggle status 12 | bool show = !status.showTradeHistory; 13 | 14 | if (show) { 15 | int trades = ShowTradeHistory(true); 16 | if (!trades) { // Without any closed trades status must be set to 'off' 17 | show = false; // and existing markers cleared. 18 | if (soundOnNoTrades) PlaySoundEx("Plonk.wav"); 19 | } 20 | } 21 | if (!show) trades = ShowTradeHistory(false); 22 | if (trades < 0) return(false); 23 | 24 | // store status 25 | status.showTradeHistory = show; 26 | StoreVolatileStatus(); 27 | 28 | if (__isTesting) WindowRedraw(); 29 | return(!catch("ToggleTradeHistory(1)")); 30 | } 31 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/test/ReadTestConfiguration.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Read the test configuration. 3 | * 4 | * @return bool - success status 5 | */ 6 | bool ReadTestConfiguration() { 7 | if (__isTesting) { 8 | string section = "Tester."+ ProgramName(); 9 | test.disableTickValueWarning = GetConfigBool(section, "DisableTickValueWarning", test.disableTickValueWarning); 10 | test.reduceStatusWrites = GetConfigBool(section, "ReduceStatusWrites", test.reduceStatusWrites); 11 | 12 | if (IsVisualMode()) { 13 | test.onPositionOpenPause = GetConfigBool(section, "OnPositionOpenPause", test.onPositionOpenPause); 14 | test.onPositionClosePause = GetConfigBool(section, "OnPositionClosePause", test.onPositionClosePause); 15 | test.onPartialClosePause = GetConfigBool(section, "OnPartialClosePause", test.onPartialClosePause); 16 | test.onSessionBreakPause = GetConfigBool(section, "OnSessionBreakPause", test.onSessionBreakPause); 17 | test.onStopPause = GetConfigBool(section, "OnStopPause", test.onStopPause); 18 | } 19 | } 20 | return(!catch("ReadTestConfiguration(1)")); 21 | } 22 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/test/defines.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Global vars for test debug settings (configurable via framework config). 3 | */ 4 | 5 | bool test.reduceStatusWrites = true; // whether to reduce status file I/O in tester 6 | 7 | bool test.onPositionOpenPause = false; // whether to pause a visual test after a position open event 8 | bool test.onPositionClosePause = false; // whether to pause a visual test after a position close event 9 | bool test.onPartialClosePause = false; // whether to pause a visual test after a partial close event 10 | bool test.onSessionBreakPause = false; // whether to pause a visual test after a session break event 11 | 12 | bool test.onStopPause = true; // whether to pause a visual test after a stop event 13 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/trade/CalculateMagicNumber.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Calculate a magic order number for the instance. 3 | * 4 | * @param int instanceId - instance id 5 | * 6 | * @return int - magic number or NULL in case of errors 7 | */ 8 | int CalculateMagicNumber(int instanceId) { 9 | if (STRATEGY_ID < 101 || STRATEGY_ID > 1023) return(!catch("CalculateMagicNumber(1) "+ instance.name +" illegal strategy id: "+ STRATEGY_ID, ERR_ILLEGAL_STATE)); 10 | if (instanceId < INSTANCE_ID_MIN || instanceId > INSTANCE_ID_MAX) return(!catch("CalculateMagicNumber(2) "+ instance.name +" invalid parameter instanceId: "+ instanceId, ERR_INVALID_PARAMETER)); 11 | 12 | int strategy = STRATEGY_ID; // 101-1023 (10 bit) 13 | int instance = instanceId; // 001-999 (14 bit, used to be 1000-9999) 14 | 15 | return((strategy<<22) + (instance<<8)); // the remaining 8 bit are not used 16 | } 17 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/trade/IsMyOrder.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Whether the currently selected ticket belongs to the current strategy and/or the current instance. 3 | * 4 | * @param int instanceId - instance to check the ticket against (NULL: check against strategy only) 5 | * 6 | * @return bool 7 | */ 8 | bool IsMyOrder(int instanceId) { 9 | if (OrderSymbol() == Symbol()) { 10 | int strategy = OrderMagicNumber() >> 22; 11 | if (strategy == STRATEGY_ID) { 12 | int instance = OrderMagicNumber() >> 8 & 0x3FFF; // 14 bit starting at bit 8: instance id 13 | return(!instanceId || instance==instanceId); 14 | } 15 | } 16 | return(false); 17 | } 18 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/trade/onPositionClose.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Event handler for an unexpectedly closed position. 3 | * 4 | * @param string message - error message 5 | * @param int error - error code 6 | * 7 | * @return int - error status (if set the program will be terminated) 8 | */ 9 | int onPositionClose(string message, int error) { 10 | if (!error) return(logDebug(message)); // no error 11 | 12 | if (__isTesting) return(catch(message, error)); // tester: terminate on every error 13 | 14 | // online 15 | if (error == ERR_CONCURRENT_MODIFICATION) { 16 | logWarn(message, error); // continue, it seems the position was closed manually 17 | return(NO_ERROR); 18 | } 19 | return(catch(message, error)); // termination 20 | } 21 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/trade/signal/SignalOperationToStr.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Return a readable representation of a signal operation flag. 3 | * 4 | * @param int flag 5 | * 6 | * @return string - readable flag or an empty string in case of errors 7 | */ 8 | string SignalOperationToStr(int flag) { 9 | switch (flag) { 10 | case NULL: return("(undefined)" ); 11 | case SIG_OP_LONG: return("SIG_OP_LONG" ); 12 | case SIG_OP_SHORT: return("SIG_OP_SHORT" ); 13 | case SIG_OP_CLOSE_ALL: return("SIG_OP_CLOSE_ALL" ); 14 | case SIG_OP_CLOSE_LONG: return("SIG_OP_CLOSE_LONG" ); 15 | case SIG_OP_CLOSE_SHORT: return("SIG_OP_CLOSE_SHORT"); 16 | } 17 | return(_EMPTY_STR(catch("SignalOperationToStr(1) "+ instance.name +" invalid parameter flag: "+ flag, ERR_INVALID_PARAMETER))); 18 | } 19 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/trade/signal/SignalTypeToStr.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Return a readable representation of a signal type. 3 | * 4 | * @param int type 5 | * 6 | * @return string - readable constant or an empty string in case of errors 7 | */ 8 | string SignalTypeToStr(int type) { 9 | switch (type) { 10 | case NULL: return("(undefined)" ); 11 | case SIG_TYPE_TIME: return("SIG_TYPE_TIME" ); 12 | case SIG_TYPE_STOPLOSS: return("SIG_TYPE_STOPLOSS" ); 13 | case SIG_TYPE_TAKEPROFIT: return("SIG_TYPE_TAKEPROFIT"); 14 | case SIG_TYPE_ZIGZAG: return("SIG_TYPE_ZIGZAG" ); 15 | } 16 | return(_EMPTY_STR(catch("SignalTypeToStr(1) "+ instance.name +" invalid parameter type: "+ type, ERR_INVALID_PARAMETER))); 17 | } 18 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/trade/signal/defines.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Signal related constants. 3 | */ 4 | 5 | //double signal[3]; // always a local var 6 | 7 | #define SIG_TYPE 0 // indexes of signal[] 8 | #define SIG_PRICE 1 9 | #define SIG_OP 2 10 | 11 | #define SIG_TYPE_TIME 1 // signal types 12 | #define SIG_TYPE_STOPLOSS 2 13 | #define SIG_TYPE_TAKEPROFIT 3 14 | #define SIG_TYPE_ZIGZAG 4 15 | #define SIG_TYPE_TUNNEL 5 16 | 17 | #define SIG_OP_LONG 1 // signal trade flags, can be combined 18 | #define SIG_OP_SHORT 2 19 | #define SIG_OP_CLOSE_LONG 4 20 | #define SIG_OP_CLOSE_SHORT 8 21 | #define SIG_OP_CLOSE_ALL 12 // SIG_OP_CLOSE_LONG | SIG_OP_CLOSE_SHORT 22 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/validation/ValidateInputs.ID.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Validate and apply input parameter "Instance.ID". 3 | * 4 | * @return bool - whether an instance id value was successfully restored (the status file is not checked) 5 | */ 6 | bool ValidateInputs.ID() { 7 | bool errorFlag = true; 8 | 9 | if (!SetInstanceId(Instance.ID, errorFlag, "ValidateInputs.ID(1)")) { 10 | if (errorFlag) onInputError("ValidateInputs.ID(2) invalid input parameter Instance.ID: \""+ Instance.ID +"\""); 11 | return(false); 12 | } 13 | return(true); 14 | } 15 | -------------------------------------------------------------------------------- /mql40/include/rsf/experts/validation/onInputError.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Error handler for invalid input parameters. Depending on the execution context a terminating/non-terminating error is set. 3 | * 4 | * @param string message - error message 5 | * 6 | * @return int - error status 7 | */ 8 | int onInputError(string message) { 9 | int error = ERR_INVALID_PARAMETER; 10 | 11 | if (ProgramInitReason() == IR_PARAMETERS) 12 | return(logError(message, error)); // non-terminating error 13 | return(catch(message, error)); // terminating error 14 | } 15 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/ExplodeStrings.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Convert a memory buffer containing null terminated strings into an MQL string array. Conversion stops when the end of the 3 | * buffer is reached or a string terminator is followed by a second null character, whichever comes first. The resulting MQL 4 | * string array will always contain at least one (possibly empty) string element. 5 | * 6 | * @param int buffer[] - memory buffer containing null terminated strings 7 | * @param string results[] - resulting MQL string array 8 | * 9 | * @return int - number of converted string elements (at least one) or NULL in case of errors 10 | */ 11 | int ExplodeStrings(int buffer[], string &results[]) { 12 | string sValue = ""; 13 | int resultsSize = ArrayResize(results, 0); 14 | int length; 15 | int fromAddr = GetIntsAddress(buffer); // memory start address 16 | int toAddr = fromAddr + ArraySize(buffer)*4; // first address after memory end address (must not be accessed) 17 | 18 | for (int addr=fromAddr; addr < toAddr; addr+=(length+1)) { 19 | sValue = GetStringA(addr); 20 | length = StringLen(sValue); 21 | 22 | if (!length && resultsSize) 23 | break; 24 | 25 | resultsSize = ArrayResize(results, resultsSize+1); 26 | results[resultsSize-1] = StringSubstr(sValue, 0, toAddr-addr); 27 | } 28 | 29 | if (!catch("ExplodeStrings(1)")) 30 | return(resultsSize); 31 | return(0); 32 | } 33 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/InitializeByteBuffer.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/functions/InitializeByteBuffer.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/functions/JoinBools.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Verbindet die Werte eines Boolean-Arrays unter Verwendung des angegebenen Separators. 3 | * 4 | * @param bool values[] - Array mit Ausgangswerten 5 | * @param string separator [optional] - zu verwendender Separator (default: ", ") 6 | * 7 | * @return string - resultierender String oder Leerstring, falls ein Fehler auftrat 8 | */ 9 | string JoinBools(bool values[], string separator = ", ") { 10 | if (ArrayDimension(values) > 1) return(_EMPTY_STR(catch("JoinBools(1) too many dimensions of parameter values: "+ ArrayDimension(values), ERR_INCOMPATIBLE_ARRAY))); 11 | 12 | string strings[]; 13 | 14 | int size = ArraySize(values); 15 | ArrayResize(strings, size); 16 | 17 | for (int i=0; i < size; i++) { 18 | if (values[i] == 0) strings[i] = "false"; 19 | else if (values[i] == 1) strings[i] = "true"; 20 | else strings[i] = values[i]; // vars may contain non-boolean values 21 | } 22 | 23 | string result = JoinStrings(strings, separator); 24 | 25 | if (ArraySize(strings) > 0) 26 | ArrayResize(strings, 0); 27 | 28 | return(result); 29 | } 30 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/JoinDoubles.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Verbindet die Werte eines Double-Arrays unter Verwendung des angegebenen Separators. 3 | * 4 | * @param double values[] - Array mit Ausgangswerten 5 | * @param string separator [optional] - zu verwendender Separator (default: ", ") 6 | * 7 | * @return string - resultierender String oder Leerstring, falls ein Fehler auftrat 8 | */ 9 | string JoinDoubles(double values[], string separator = ", ") { 10 | if (ArrayDimension(values) > 1) return(_EMPTY_STR(catch("JoinDoubles(1) too many dimensions of parameter values: "+ ArrayDimension(values), ERR_INCOMPATIBLE_ARRAY))); 11 | 12 | string strings[]; 13 | 14 | int size = ArraySize(values); 15 | ArrayResize(strings, size); 16 | 17 | for (int i=0; i < size; i++) { 18 | if (values[i] == EMPTY_VALUE) strings[i] = "EMPTY_VALUE"; 19 | else if (values[i] == INT_MIN) strings[i] = "INT_MIN"; 20 | else strings[i] = NumberToStr(values[i], ".1+"); 21 | } 22 | 23 | string result = JoinStrings(strings, separator); 24 | 25 | if (ArraySize(strings) > 0) { 26 | ArrayResize(strings, 0); 27 | } 28 | return(result); 29 | } 30 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/JoinDoublesEx.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Verbindet die Werte eines Double-Arrays mit bis zu 16 Nachkommastellen unter Verwendung des angegebenen Separators. 3 | * 4 | * @param double values[] - Array mit Ausgangswerten 5 | * @param int digits - Anzahl der Nachkommastellen (0-16) 6 | * @param string separator [optional] - zu verwendender Separator (default: ", ") 7 | * 8 | * @return string - resultierender String oder Leerstring, falls ein Fehler auftrat 9 | */ 10 | string JoinDoublesEx(double values[], int digits, string separator = ", ") { 11 | if (ArrayDimension(values) > 1) return(_EMPTY_STR(catch("JoinDoublesEx(1) too many dimensions of parameter values: "+ ArrayDimension(values), ERR_INCOMPATIBLE_ARRAY))); 12 | if (digits < 0 || digits > 16) return(_EMPTY_STR(catch("JoinDoublesEx(2) illegal parameter digits: "+ digits, ERR_INVALID_PARAMETER))); 13 | 14 | string strings[]; 15 | 16 | int size = ArraySize(values); 17 | ArrayResize(strings, size); 18 | 19 | for (int i=0; i < size; i++) { 20 | if (values[i] == EMPTY_VALUE) strings[i] = "EMPTY_VALUE"; 21 | else if (values[i] == INT_MIN) strings[i] = "INT_MIN"; 22 | else strings[i] = DoubleToStrEx(values[i], digits); 23 | if (!StringLen(strings[i])) return(""); 24 | } 25 | 26 | string result = JoinStrings(strings, separator); 27 | 28 | if (ArraySize(strings) > 0) { 29 | ArrayResize(strings, 0); 30 | } 31 | return(result); 32 | } 33 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/JoinInts.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Verbindet die Werte eines Integer-Arrays unter Verwendung des angegebenen Separators. 3 | * 4 | * @param int values[] - Array mit Ausgangswerten 5 | * @param string separator [optional] - zu verwendender Separator (default: ", ") 6 | * 7 | * @return string - resultierender String oder Leerstring, falls ein Fehler auftrat 8 | */ 9 | string JoinInts(int values[], string separator = ", ") { 10 | if (ArrayDimension(values) > 1) return(_EMPTY_STR(catch("JoinInts(1) too many dimensions of parameter values: "+ ArrayDimension(values), ERR_INCOMPATIBLE_ARRAY))); 11 | 12 | string strings[]; 13 | 14 | int size = ArraySize(values); 15 | ArrayResize(strings, size); 16 | 17 | for (int i=0; i < size; i++) { 18 | strings[i] = values[i]; 19 | } 20 | 21 | string result = JoinStrings(strings, separator); 22 | if (ArraySize(strings) > 0) 23 | ArrayResize(strings, 0); 24 | return(result); 25 | } 26 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/MD5Hash.mqh: -------------------------------------------------------------------------------- 1 | 2 | #import "rsfMT4Expander.dll" 3 | string MD5Hash(int buffer[], int size); 4 | #import 5 | 6 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/ParseDateTime.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/functions/ParseDateTime.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/functions/ParseTimeRange.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Parse a time range description and return the resulting time parts. 3 | * 4 | * @param _In_ string range - time range description (format: 09:12-18:34) 5 | * @param _Out_ int from - range start time in minutes since Midnight (server time) 6 | * @param _Out_ int to - range end time in minutes since Midnight (server time) 7 | * @param _Out_ int period - largest price period usable for matching range calculations 8 | * 9 | * @return bool - success status 10 | */ 11 | bool ParseTimeRange(string range, int &from, int &to, int &period) { 12 | if (!StrContains(range, "-")) return(false); 13 | int result[]; 14 | 15 | string sFrom = StrTrim(StrLeftTo(range, "-")); 16 | if (!ParseDateTime(sFrom, DATE_OPTIONAL, result)) return(false); 17 | if (result[PT_HAS_DATE] || result[PT_SECOND]) return(false); 18 | int _from = result[PT_HOUR]*60 + result[PT_MINUTE]; 19 | 20 | string sTo = StrTrim(StrRightFrom(range, "-")); 21 | if (!ParseDateTime(sTo, DATE_OPTIONAL, result)) return(false); 22 | if (result[PT_HAS_DATE] || result[PT_SECOND]) return(false); 23 | int _to = result[PT_HOUR]*60 + result[PT_MINUTE]; 24 | 25 | if (_from >= _to) return(false); 26 | from = _from; 27 | to = _to; 28 | 29 | if (!(from % PERIOD_H1 + to % PERIOD_H1)) period = PERIOD_H1; 30 | else if (!(from % PERIOD_M30 + to % PERIOD_M30)) period = PERIOD_M30; 31 | else if (!(from % PERIOD_M15 + to % PERIOD_M15)) period = PERIOD_M15; 32 | else if (!(from % PERIOD_M5 + to % PERIOD_M5)) period = PERIOD_M5; 33 | else period = PERIOD_M1; 34 | 35 | return(true); 36 | } 37 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/SortClosedTickets.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/functions/SortClosedTickets.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/functions/iBarShiftNext.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/functions/iBarShiftNext.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/functions/iBarShiftPrevious.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/functions/iBarShiftPrevious.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/functions/lfx.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/functions/lfx.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/functions/scriptrunner.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/functions/scriptrunner.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/Abs.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns the absolute value of an integer. Integer-Version von MathAbs(). 3 | * 4 | * @param int value 5 | * 6 | * @return int 7 | */ 8 | int Abs(int value) { 9 | if (value == INT_MIN) return(INT_MAX); 10 | if (value < 0) return(-value); 11 | return(value); 12 | } 13 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/LoglevelDescription.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Return the description of a loglevel constant. 3 | * 4 | * @param int level - loglevel 5 | * 6 | * @return string 7 | */ 8 | string LoglevelDescription(int level) { 9 | // Also implemented in the Expander but here I prefer static MQL strings, as it's in the hot path of the logger. 10 | 11 | switch (level) { 12 | case LOG_DEBUG : return("DEBUG" ); 13 | case LOG_INFO : return("INFO" ); 14 | case LOG_NOTICE: return("NOTICE"); 15 | case LOG_WARN : return("WARN" ); 16 | case LOG_ERROR : return("ERROR" ); 17 | case LOG_FATAL : return("FATAL" ); 18 | case LOG_OFF : return("OFF" ); // not a regular loglevel 19 | } 20 | return(StringConcatenate("", level)); 21 | } 22 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/Max.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns the largest of the specified integer values. Integer version of MathMax(). 3 | * 4 | * @param int a 5 | * @param int b 6 | * @param int c [optional] 7 | * 8 | * @return int 9 | */ 10 | int Max(int a, int b, int c = INT_MIN) { 11 | int result = a; 12 | if (b > result) result = b; 13 | if (c > result) result = c; 14 | return(result); 15 | } 16 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/Min.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns the smallest of the specified integer values. Integer version of MathMin(). 3 | * 4 | * @param int a 5 | * @param int b 6 | * @param int c [optional] 7 | * 8 | * @return int 9 | */ 10 | int Min(int a, int b, int c = INT_MAX) { 11 | int result = a; 12 | if (b < result) result = b; 13 | if (c < result) result = c; 14 | return(result); 15 | } 16 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/PeriodDescription.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Return the description of a timeframe identifier. Supports custom timeframes. 3 | * 4 | * @param int period [optional] - timeframe identifier or number of minutes per period (default: the current chart period) 5 | * 6 | * @return string 7 | */ 8 | string PeriodDescription(int period = NULL) { 9 | // We need an MQL implementation, as DLL calls may be disabled. This one should match the one in the MT4Expander. 10 | 11 | if (!period) period = Period(); 12 | 13 | switch (period) { 14 | case PERIOD_M1: return("M1"); // 1 minute 15 | case PERIOD_M2: return("M2"); // 2 minutes (custom timeframe) 16 | case PERIOD_M3: return("M3"); // 3 minutes (custom timeframe) 17 | case PERIOD_M4: return("M4"); // 4 minutes (custom timeframe) 18 | case PERIOD_M5: return("M5"); // 5 minutes 19 | case PERIOD_M6: return("M6"); // 6 minutes (custom timeframe) 20 | case PERIOD_M10: return("M10"); // 10 minutes (custom timeframe) 21 | case PERIOD_M12: return("M12"); // 12 minutes (custom timeframe) 22 | case PERIOD_M15: return("M15"); // 15 minutes 23 | case PERIOD_M20: return("M20"); // 20 minutes (custom timeframe) 24 | case PERIOD_M30: return("M30"); // 30 minutes 25 | case PERIOD_H1: return("H1"); // 1 hour 26 | case PERIOD_H2: return("H2"); // 2 hours (custom timeframe) 27 | case PERIOD_H3: return("H3"); // 3 hours (custom timeframe) 28 | case PERIOD_H4: return("H4"); // 4 hours 29 | case PERIOD_H6: return("H6"); // 6 hours (custom timeframe) 30 | case PERIOD_H8: return("H8"); // 8 hours (custom timeframe) 31 | case PERIOD_H12: return("H12"); // 12 hours (custom timeframe) 32 | case PERIOD_D1: return("D1"); // 1 day 33 | case PERIOD_W1: return("W1"); // 1 week 34 | case PERIOD_MN1: return("MN1"); // 1 month 35 | case PERIOD_Q1: return("Q1"); // 1 quarter (custom timeframe) 36 | } 37 | return(StringConcatenate("", period)); 38 | } 39 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/README.md: -------------------------------------------------------------------------------- 1 | 2 | This directory contains functionality which is used in both MQL4 and MQL5, and is 100% compatible. 3 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/StrContains.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Whether a string contains a substring (case-sensitive). 3 | * 4 | * @param string str - string to inspect 5 | * @param string substr - substring 6 | * 7 | * @return bool 8 | */ 9 | bool StrContains(string str, string substr) { 10 | if (!StringLen(substr)) 11 | return(!catch("StrContains(1) illegal parameter substr: \""+ substr +"\"", ERR_INVALID_PARAMETER)); 12 | return(StringFind(str, substr) != -1); 13 | } 14 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/StrLeft.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Return the left part of a string. 3 | * 4 | * If 'n' is positive the function returns the 'n' left-most chars of the string. 5 | * e.g. StrLeft("ABCDEFG", 2) => "AB" 6 | * 7 | * If 'n' is negative the function returns all except the 'n' right-most chars of the string. 8 | * e.g. StrLeft("ABCDEFG", -2) => "ABCDE" 9 | * 10 | * @param string str - string to process 11 | * @param int n 12 | * 13 | * @return string 14 | */ 15 | string StrLeft(string str, int n) { 16 | if (n > 0) return(StrSubstr(str, 0, n)); 17 | if (n < 0) return(StrSubstr(str, 0, StringLen(str)+n)); 18 | return(""); 19 | } 20 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/StrPadRight.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Pad a string right-side to a minimum length using a pad string. 3 | * 4 | * @param string str - source string 5 | * @param int padLength - minimum length of the resulting string 6 | * @param string padString [optional] - substring used for padding (default: space chars) 7 | * 8 | * @return string 9 | */ 10 | string StrPadRight(string str, int padLength, string padString = " ") { 11 | while (StringLen(str) < padLength) { 12 | str = StringConcatenate(str, padString); 13 | } 14 | return(str); 15 | } 16 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/StrSubstr.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Drop-in replacement for the badly designed built-in function StringSubstr(). 3 | * Fix for StringSubstr(string, start, length = 0) in which case the built-in function returns the whole string. 4 | * 5 | * Additionally this implementation supports negative values for parameters "start" and "length". 6 | * 7 | * @param string str - string to process 8 | * @param int start - start offset; if negative counted from the end of the string 9 | * @param int length - number of chars to return: 10 | * if positive chars on the right side of the start offset 11 | * if negative chars on the left side of the start offset 12 | * @return string 13 | */ 14 | string StrSubstr(string str, int start, int length = INT_MAX) { 15 | if (length == 0) return(""); // return an empty string if length is zero 16 | 17 | int _start = start; 18 | if (_start < 0) _start = Max(0, _start + StringLen(str)); 19 | 20 | if (length < 0) { 21 | _start += 1 + length; 22 | length = Abs(length); 23 | } 24 | 25 | if (length == INT_MAX) { 26 | length = INT_MAX - _start; // _start + length must not be larger than INT_MAX 27 | } 28 | 29 | return(StringSubstr(str, _start, length)); 30 | } 31 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/shared/StrTrim.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Trim white space characters from both sides of a string. 3 | * 4 | * @param string str 5 | * 6 | * @return string - trimmed string 7 | */ 8 | string StrTrim(string str) { 9 | return(StringTrimLeft(StringTrimRight(str))); 10 | } 11 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/ta/ADR.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Calculate and return the Average Daily Range of the current symbol. Implemented as LWMA(20, TrueRange). 3 | * 4 | * @param int flags [optional] - controls error behavior (default: trigger a fatal error) 5 | * F_ERR_NO_HISTORY_DATA: silently handle ERR_NO_HISTORY_DATA 6 | * 7 | * @return double - ADR value in quote units or NULL in case of errors 8 | */ 9 | double iADR(int flags = NULL) { 10 | int maPeriods = 20, error; // TODO: convert to current timeframe for non-FXT brokers 11 | 12 | double ranges[]; 13 | ArrayResize(ranges, maPeriods); 14 | ArraySetAsSeries(ranges, true); 15 | 16 | for (int i=0; i < maPeriods; i++) { 17 | ranges[i] = iATR(NULL, PERIOD_D1, 1, i+1); 18 | 19 | if (!ranges[i]) { 20 | error = intOr(GetLastError(), ERR_NO_HISTORY_DATA); 21 | break; 22 | } 23 | } 24 | 25 | if (!error) { 26 | double adr = iMAOnArray(ranges, WHOLE_ARRAY, maPeriods, 0, MODE_LWMA, 0); 27 | error = GetLastError(); 28 | if (!error || error==ERS_HISTORY_UPDATE) return(adr); 29 | } 30 | 31 | if (error==ERR_NO_HISTORY_DATA && flags & F_ERR_NO_HISTORY_DATA) 32 | return(!SetLastError(error)); 33 | return(!catch("iADR(1)", error)); 34 | } 35 | -------------------------------------------------------------------------------- /mql40/include/rsf/functions/ta/ALMA.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Calculate the weights of an ALMA using the formula of a Gaussian normal distribution. 3 | * 4 | * @param _In_ int periods - number of MA periods 5 | * @param _In_ double offset - offset of the desired distribution, recommended value: 0.85 6 | * @param _In_ double sigma - sigma (steepness) of the desired distribution, recommended value: 6.0 7 | * @param _Out_ double weights[] - array receiving the resulting MA weights 8 | * 9 | * @return bool - success status 10 | * 11 | * @see http://web.archive.org/web/20180307031850/http://www.arnaudlegoux.com/ 12 | */ 13 | bool ALMA.CalculateWeights(int periods, double offset, double sigma, double &weights[]) { 14 | if (periods <= 0) return(!catch("ALMA.CalculateWeights(1) invalid parameter periods: "+ periods +" (out of range)", ERR_INVALID_PARAMETER)); 15 | if (offset < 0 || offset > 1) return(!catch("ALMA.CalculateWeights(2) invalid parameter offset: "+ NumberToStr(offset, ".1+") +" (out of range)", ERR_INVALID_PARAMETER)); 16 | if (sigma <= 0) return(!catch("ALMA.CalculateWeights(3) invalid parameter sigma: "+ NumberToStr(sigma, ".1+") +" (must be positive)", ERR_INVALID_PARAMETER)); 17 | 18 | if (ArraySize(weights) != periods) 19 | ArrayResize(weights, periods); 20 | 21 | double dist = (periods-1) * offset; // m: resulting distance of vertex from the oldest bar 22 | double s = periods / sigma; // s: resulting steepness 23 | double weightsSum = 0; 24 | 25 | for (int j, i=0; i < periods; i++) { 26 | j = periods-1-i; 27 | weights[j] = MathExp(-(i-dist)*(i-dist)/(2*s*s)); 28 | weightsSum += weights[j]; 29 | } 30 | for (i=0; i < periods; i++) { // normalize weights: sum = 1 (100%) 31 | weights[i] /= weightsSum; 32 | } 33 | 34 | return(!catch("ALMA.CalculateWeights(4)")); 35 | } 36 | -------------------------------------------------------------------------------- /mql40/include/rsf/indicators/README.md: -------------------------------------------------------------------------------- 1 | 2 | This directory contains separate init/deinit functionality of large indicators. It's outsourced to improve code readability. 3 | -------------------------------------------------------------------------------- /mql40/include/rsf/indicators/chartinfos/deinit.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/indicators/chartinfos/deinit.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/shared.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * MQL constants shared with the MT4Expander. 3 | * 4 | * In MQL4 the redefinition of built-in constants with the same value is allowed. Not so in MQL5. 5 | */ 6 | 7 | // in C++ already defined 8 | #define INT_MIN 0x80000000 // minimum signed int value (-2147483648) 9 | #define INT_MAX 0x7FFFFFFF // maximum signed int value (+2147483647) 10 | 11 | 12 | // fully shared constants 13 | #include 14 | #include 15 | 16 | 17 | // in C++ defined with the same value but a different type 18 | #define NO_ERROR ERR_NO_ERROR // 0x0L 19 | #define CLR_NONE 0xFFFFFFFF // 0xFFFFFFFFL 20 | 21 | 22 | // MetaQuotes constants replaced by framework aliases (too long names or odd wording) 23 | #define ERR_DLLFUNC_CRITICALERROR ERR_DLL_EXCEPTION 24 | #define ERR_EXTERNAL_CALLS_NOT_ALLOWED ERR_EX4_CALLS_NOT_ALLOWED 25 | #define ERR_FILE_BUFFER_ALLOCATION_ERROR ERR_FILE_BUFFER_ALLOC_ERROR 26 | #define ERR_FILE_CANNOT_CLEAN_DIRECTORY ERR_FILE_CANT_CLEAN_DIRECTORY 27 | #define ERR_FILE_CANNOT_DELETE_DIRECTORY ERR_FILE_CANT_DELETE_DIRECTORY 28 | #define ERR_FILE_NOT_EXIST ERR_FILE_NOT_FOUND 29 | #define ERR_FILE_WRONG_HANDLE ERR_FILE_UNKNOWN_HANDLE 30 | #define ERR_FUNC_NOT_ALLOWED_IN_TESTING ERR_FUNC_NOT_ALLOWED_IN_TESTER 31 | #define ERR_HISTORY_WILL_UPDATED ERS_HISTORY_UPDATE // status code, not an error 32 | #define ERR_INCORRECT_SERIESARRAY_USING ERR_SERIES_NOT_AVAILABLE 33 | #define ERR_INVALID_FUNCTION_PARAMVALUE ERR_INVALID_PARAMETER 34 | #define ERR_INVALID_STOPS ERR_INVALID_STOP 35 | #define ERR_NOTIFICATION_ERROR ERR_NOTIFICATION_SEND_ERROR 36 | #define ERR_NO_ORDER_SELECTED ERR_NO_TICKET_SELECTED 37 | #define ERR_SOME_ARRAY_ERROR ERR_ARRAY_ERROR 38 | #define ERR_SOME_FILE_ERROR ERR_FILE_ERROR 39 | #define ERR_SOME_OBJECT_ERROR ERR_OBJECT_ERROR 40 | #define ERR_UNKNOWN_SYMBOL ERR_SYMBOL_NOT_AVAILABLE 41 | -------------------------------------------------------------------------------- /mql40/include/rsf/stddefines.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/stddefines.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/stdfunctions.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/stdfunctions.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/structs/Bar.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/structs/Bar.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/structs/ExecutionContext.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Struct EXECUTION_CONTEXT 3 | * 4 | * A storage context for runtime variables, data exchange and communication between MQL modules and MT4Expander DLL. 5 | * 6 | * @see https://github.com/rosasurfer/mt4-expander/blob/master/header/struct/rsf/ExecutionContext.h 7 | * 8 | * 9 | * TODO: integrate __STATUS_OFF, __STATUS_OFF.reason 10 | */ 11 | #import "rsfMT4Expander.dll" 12 | 13 | // available MQL getters 14 | string ec_ProgramName (int ec[]); 15 | string ec_SuperProgramName (int pid); 16 | int ec_SuperLoglevel (int pid); 17 | int ec_SuperLoglevelDebug (int pid); 18 | int ec_SuperLoglevelTerminal(int pid); 19 | int ec_SuperLoglevelAlert (int pid); 20 | int ec_SuperLoglevelFile (int pid); 21 | int ec_SuperLoglevelMail (int pid); 22 | int ec_SuperLoglevelSMS (int pid); 23 | 24 | // available MQL setters 25 | int ec_SetProgramCoreFunction(int ec[], int id); 26 | int ec_SetRecorder (int ec[], int mode); 27 | string ec_SetAccountServer (int ec[], string server); 28 | int ec_SetAccountNumber (int ec[], int number); 29 | int ec_SetDllError (int ec[], int error); 30 | int ec_SetMqlError (int ec[], int error); 31 | int ec_SetLoglevel (int ec[], int level); 32 | int ec_SetLoglevelDebug (int ec[], int level); 33 | int ec_SetLoglevelTerminal (int ec[], int level); 34 | int ec_SetLoglevelAlert (int ec[], int level); 35 | int ec_SetLoglevelFile (int ec[], int level); 36 | int ec_SetLoglevelMail (int ec[], int level); 37 | int ec_SetLoglevelSMS (int ec[], int level); 38 | 39 | // helpers 40 | string EXECUTION_CONTEXT_toStr (int ec[]); 41 | string lpEXECUTION_CONTEXT_toStr(int lpEc); 42 | #import 43 | -------------------------------------------------------------------------------- /mql40/include/rsf/structs/LFXOrder.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/structs/LFXOrder.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/structs/mt4/HistoryHeader.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/structs/mt4/HistoryHeader.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/structs/mt4/SymbolGroup.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/structs/mt4/SymbolGroup.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/structs/mt4/SymbolSelected.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * MT4 struct SYMBOL_SELECTED (Dateiformat "symbols.sel") 3 | * 4 | * @link https://github.com/rosasurfer/mt4-expander/blob/master/header/struct/mt4/SymbolSelected.h 5 | */ 6 | -------------------------------------------------------------------------------- /mql40/include/rsf/structs/mt4/Tick.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * MT4 struct TICK (Dateiformat "ticks.raw") 3 | * 4 | * @link https://github.com/rosasurfer/mt4-expander/blob/master/header/struct/mt4/Tick.h 5 | */ 6 | -------------------------------------------------------------------------------- /mql40/include/rsf/structs/win32/ProcessInformation.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Win32 struct PROCESS_INFORMATION 3 | * 4 | * struct PROCESS_INFORMATION { 5 | * HANDLE hProcess; // 4 6 | * HANDLE hThread; // 4 7 | * DWORD dwProcessId; // 4 8 | * DWORD dwThreadId; // 4 9 | * }; // 16 byte 10 | */ 11 | #import "rsfMT4Expander.dll" 12 | int pi_hProcess (/*PROCESS_INFORMATION*/int pi[]); 13 | int pi_hThread (/*PROCESS_INFORMATION*/int pi[]); 14 | int pi_ProcessId(/*PROCESS_INFORMATION*/int pi[]); 15 | int pi_ThreadId (/*PROCESS_INFORMATION*/int pi[]); 16 | #import 17 | -------------------------------------------------------------------------------- /mql40/include/rsf/structs/win32/SecurityAttributes.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * Win32 struct SECURITY_ATTRIBUTES 3 | * 4 | * struct SECURITY_ATTRIBUTES { 5 | * DWORD nLength; // 4 6 | * LPVOID lpSecurityDescriptor; // 4 7 | * BOOL bInheritHandle; // 4 8 | * }; // 12 byte 9 | */ 10 | #import "rsfMT4Expander.dll" 11 | int sa_Length (/*SECURITY_ATTRIBUTES*/int sa[]); 12 | int sa_SecurityDescriptor(/*SECURITY_ATTRIBUTES*/int sa[]); 13 | bool sa_InheritHandle (/*SECURITY_ATTRIBUTES*/int sa[]); 14 | #import 15 | -------------------------------------------------------------------------------- /mql40/include/rsf/structs/win32/StartupInfo.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/structs/win32/StartupInfo.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/structs/win32/Win32FindData.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/structs/win32/Win32FindData.mqh -------------------------------------------------------------------------------- /mql40/include/rsf/timezones.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/include/rsf/timezones.mqh -------------------------------------------------------------------------------- /mql40/indicators/.attic/4 Bar Fractal.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * 4 Bar Fractal 3 | */ 4 | #include 5 | int __InitFlags[]; 6 | int __DeinitFlags[]; 7 | 8 | ////////////////////////////////////////////////////// Configuration //////////////////////////////////////////////////////// 9 | 10 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #property indicator_chart_window 17 | #property indicator_buffers 2 18 | 19 | #property indicator_color1 Blue 20 | #property indicator_color2 Red 21 | 22 | #property indicator_width1 1 23 | #property indicator_width2 1 24 | 25 | double up[]; 26 | double down[]; 27 | 28 | 29 | /** 30 | * Initialization 31 | * 32 | * @return int - error status 33 | */ 34 | int onInit() { 35 | SetIndexBuffer(0, up); SetIndexStyle (0, DRAW_ARROW); SetIndexArrow (0, 241); 36 | SetIndexBuffer(1, down); SetIndexStyle (1, DRAW_ARROW); SetIndexArrow (1, 242); 37 | 38 | IndicatorShortName(WindowExpertName()); 39 | return(0); 40 | } 41 | 42 | 43 | /** 44 | * Main function 45 | * 46 | * @return int - error status 47 | */ 48 | int onTick() { 49 | for (int bar=1; bar <= ChangedBars; bar++) { 50 | if (bar+3 <= Bars) { 51 | if (Close[bar] > Open[bar] && Close[bar] > High[bar+1] && Close[bar] > High[bar+3]) { 52 | up[bar] = Low[bar] - 0.5*iATR(NULL, NULL, 10, bar); 53 | } 54 | if (Close[bar] < Open[bar] && Close[bar] < Low[bar+1] && Close[bar] < Low[bar+3]) { 55 | down[bar] = High[bar] + 0.5*iATR(NULL, NULL, 10, bar); 56 | } 57 | } 58 | } 59 | return(catch("onTick(1)")); 60 | } 61 | -------------------------------------------------------------------------------- /mql40/indicators/.attic/DEMA.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/DEMA.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/Ehlers 2-Pole-SuperSmoother.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/Ehlers 2-Pole-SuperSmoother.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/Ehlers Fisher Transform.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/Ehlers Fisher Transform.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/FATL.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/FATL.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/Fractal Dimension Index.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/Fractal Dimension Index.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/Pivot Level.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/Pivot Level.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/RSI.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/RSI.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/SATL.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/SATL.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/Stochastic of RSI.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/Stochastic of RSI.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/Stochastic.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/Stochastic.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/TEMA.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/TEMA.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/TriEMA.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/TriEMA.mq4 -------------------------------------------------------------------------------- /mql40/indicators/.attic/Trix.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/.attic/Trix.mq4 -------------------------------------------------------------------------------- /mql40/indicators/ALMA.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/ALMA.mq4 -------------------------------------------------------------------------------- /mql40/indicators/BFX No Volume.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/BFX No Volume.mq4 -------------------------------------------------------------------------------- /mql40/indicators/Bollinger Bands.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/Bollinger Bands.mq4 -------------------------------------------------------------------------------- /mql40/indicators/ChartInfos.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/ChartInfos.mq4 -------------------------------------------------------------------------------- /mql40/indicators/Grid.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/Grid.mq4 -------------------------------------------------------------------------------- /mql40/indicators/HalfTrend.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/HalfTrend.mq4 -------------------------------------------------------------------------------- /mql40/indicators/Heikin-Ashi.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/Heikin-Ashi.mq4 -------------------------------------------------------------------------------- /mql40/indicators/Jurik Moving Average.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/Jurik Moving Average.mq4 -------------------------------------------------------------------------------- /mql40/indicators/Keltner Channel SR.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/Keltner Channel SR.mq4 -------------------------------------------------------------------------------- /mql40/indicators/Keltner Channel.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/Keltner Channel.mq4 -------------------------------------------------------------------------------- /mql40/indicators/LFX-Monitor.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/LFX-Monitor.mq4 -------------------------------------------------------------------------------- /mql40/indicators/MACD.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/MACD.mq4 -------------------------------------------------------------------------------- /mql40/indicators/Moving Average.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/Moving Average.mq4 -------------------------------------------------------------------------------- /mql40/indicators/NonLagMA.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/NonLagMA.mq4 -------------------------------------------------------------------------------- /mql40/indicators/SuperBars.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/SuperBars.mq4 -------------------------------------------------------------------------------- /mql40/indicators/SuperTrend.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/SuperTrend.mq4 -------------------------------------------------------------------------------- /mql40/indicators/Tillson T3 Moving Average.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/Tillson T3 Moving Average.mq4 -------------------------------------------------------------------------------- /mql40/indicators/ZigZag.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/indicators/ZigZag.mq4 -------------------------------------------------------------------------------- /mql40/libraries/MT4iQuickChannel.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/libraries/MT4iQuickChannel.dll -------------------------------------------------------------------------------- /mql40/libraries/rsfHistory1.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/libraries/rsfHistory1.mq4 -------------------------------------------------------------------------------- /mql40/libraries/rsfHistory2.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/libraries/rsfHistory2.mq4 -------------------------------------------------------------------------------- /mql40/libraries/rsfHistory3.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/libraries/rsfHistory3.mq4 -------------------------------------------------------------------------------- /mql40/libraries/rsfMT4Expander.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/libraries/rsfMT4Expander.dll -------------------------------------------------------------------------------- /mql40/libraries/rsfStdlib.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/libraries/rsfStdlib.mq4 -------------------------------------------------------------------------------- /mql40/libraries/wget.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/libraries/wget.exe -------------------------------------------------------------------------------- /mql40/scripts/Chart.Objects.DeleteAll.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/Chart.Objects.DeleteAll.mq4 -------------------------------------------------------------------------------- /mql40/scripts/Chart.Objects.UnselectAll.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/Chart.Objects.UnselectAll.mq4 -------------------------------------------------------------------------------- /mql40/scripts/Chart.Refresh.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/Chart.Refresh.mq4 -------------------------------------------------------------------------------- /mql40/scripts/Chart.SendTick.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/Chart.SendTick.mq4 -------------------------------------------------------------------------------- /mql40/scripts/Chart.ToggleAccountBalance.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * Chart.ToggleAccountBalance 3 | * 4 | * Send a command to the ChartInfos indicator to toggle the display of the account balance. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | string modifiers = ""; 20 | if (IsVirtualKeyDown(VK_ESCAPE)) modifiers = modifiers +",VK_ESCAPE"; 21 | if (IsVirtualKeyDown(VK_TAB)) modifiers = modifiers +",VK_TAB"; 22 | if (IsVirtualKeyDown(VK_CAPITAL)) modifiers = modifiers +",VK_CAPITAL"; // CAPSLOCK key 23 | if (IsVirtualKeyDown(VK_SHIFT)) modifiers = modifiers +",VK_SHIFT"; 24 | if (IsVirtualKeyDown(VK_CONTROL)) modifiers = modifiers +",VK_CONTROL"; 25 | if (IsVirtualKeyDown(VK_MENU)) modifiers = modifiers +",VK_MENU"; // ALT key 26 | if (IsVirtualKeyDown(VK_LWIN)) modifiers = modifiers +",VK_LWIN"; 27 | if (IsVirtualKeyDown(VK_RWIN)) modifiers = modifiers +",VK_RWIN"; 28 | 29 | SendChartCommand("ChartInfos.command", "toggle-account-balance::"+ StrRight(modifiers, -1)); 30 | return(catch("onStart(1)")); 31 | } 32 | -------------------------------------------------------------------------------- /mql40/scripts/Chart.ToggleOpenOrders.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * Chart.ToggleOpenOrders 3 | * 4 | * Send a command to a running EA or the ChartInfos indicator to toggle the display of open orders. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | if (__isTesting) Tester.Pause(); 20 | 21 | string command = "toggle-open-orders"; 22 | string params = ""; 23 | string modifiers = ifString(IsVirtualKeyDown(VK_SHIFT), "VK_SHIFT", ""); 24 | 25 | command = command +":"+ params +":"+ modifiers; 26 | 27 | // send to a running EA or the ChartInfos indicator 28 | if (ObjectFind("EA.status") == 0) SendChartCommand("EA.command", command); 29 | else SendChartCommand("ChartInfos.command", command); 30 | return(last_error); 31 | } 32 | -------------------------------------------------------------------------------- /mql40/scripts/Chart.ToggleTradeHistory.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * Chart.ToggleTradeHistory 3 | * 4 | * Send a command to a running EA or the ChartInfos indicator to toggle the display of the trade history. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | #include 12 | 13 | 14 | /** 15 | * Main function 16 | * 17 | * @return int - error status 18 | */ 19 | int onStart() { 20 | if (__isTesting) Tester.Pause(); 21 | 22 | string command = "toggle-trade-history"; 23 | string params = ""; 24 | string modifiers = ifString(IsVirtualKeyDown(VK_SHIFT), "VK_SHIFT", ""); 25 | 26 | command = command +":"+ params +":"+ modifiers; 27 | 28 | // send to a running EA or the ChartInfos indicator 29 | if (ObjectFind("EA.status") == 0) SendChartCommand("EA.command", command); 30 | else SendChartCommand("ChartInfos.command", command); 31 | return(last_error); 32 | } 33 | -------------------------------------------------------------------------------- /mql40/scripts/Chart.ToggleUnitSize.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * Chart.ToggleUnitSize 3 | * 4 | * Sends a command to the ChartInfos indicator to toggle the location of the unitsize display between "top" and "bottom". 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | string modifiers = ""; 20 | if (IsVirtualKeyDown(VK_ESCAPE)) modifiers = modifiers +",VK_ESCAPE"; 21 | if (IsVirtualKeyDown(VK_TAB)) modifiers = modifiers +",VK_TAB"; 22 | if (IsVirtualKeyDown(VK_CAPITAL)) modifiers = modifiers +",VK_CAPITAL"; // CAPSLOCK key 23 | if (IsVirtualKeyDown(VK_SHIFT)) modifiers = modifiers +",VK_SHIFT"; 24 | if (IsVirtualKeyDown(VK_CONTROL)) modifiers = modifiers +",VK_CONTROL"; 25 | if (IsVirtualKeyDown(VK_MENU)) modifiers = modifiers +",VK_MENU"; // ALT key 26 | if (IsVirtualKeyDown(VK_LWIN)) modifiers = modifiers +",VK_LWIN"; 27 | if (IsVirtualKeyDown(VK_RWIN)) modifiers = modifiers +",VK_RWIN"; 28 | 29 | SendChartCommand("ChartInfos.command", "toggle-unit-size::"+ StrRight(modifiers, -1)); 30 | return(catch("onStart(1)")); 31 | } 32 | -------------------------------------------------------------------------------- /mql40/scripts/CountOpenOrders.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * Loggt die Anzahl der offenen Tickets. 3 | */ 4 | #include 5 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 6 | int __DeinitFlags[]; 7 | #include 8 | #include 9 | 10 | 11 | /** 12 | * Main-Funktion 13 | * 14 | * @return int - error status 15 | */ 16 | int onStart() { 17 | string msg = OrdersTotal() +" open orders"; 18 | logInfo("onStart(1) "+ msg); 19 | Comment(NL, NL, NL, msg); 20 | return(last_error); 21 | } 22 | -------------------------------------------------------------------------------- /mql40/scripts/CustomPositions.LogOrders.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * CustomPositions.LogOrders 3 | * 4 | * Send a command to the ChartInfos indicator to log all order tickets of custom positions. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main-Funktion 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | string command = "log-custom-positions"; 20 | string params = ""; 21 | string modifiers = ifString(IsVirtualKeyDown(VK_SHIFT), "VK_SHIFT", ""); 22 | 23 | command = command +":"+ params +":"+ modifiers; 24 | 25 | SendChartCommand("ChartInfos.command", command); 26 | return(catch("onStart(1)")); 27 | } 28 | -------------------------------------------------------------------------------- /mql40/scripts/CustomPositions.ToggleProfit.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/CustomPositions.ToggleProfit.mq4 -------------------------------------------------------------------------------- /mql40/scripts/CustomPositions.ToggleRisk.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * CustomPositions.ToggleRisk 3 | * 4 | * Send a command to the ChartInfos indicator to toggle the MaxRisk display of custom positions. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | SendChartCommand("ChartInfos.command", "toggle-risk"); 20 | return(catch("onStart(1)")); 21 | } 22 | -------------------------------------------------------------------------------- /mql40/scripts/CustomizeTerminal.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * Remove search box and MQL5 community button from the terminal's toolbar. 3 | */ 4 | #include 5 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 6 | int __DeinitFlags[]; 7 | #include 8 | #include 9 | #include 10 | 11 | 12 | /** 13 | * Main function 14 | * 15 | * @return int - error status 16 | */ 17 | int onStart() { 18 | int hWnd = GetTerminalMainWindow(); if (!hWnd) return(last_error); 19 | int hToolbar = GetDlgItem(hWnd, IDC_TOOLBAR); if (!hToolbar) return(catch("onStart(1) terminal toolbar not found", ERR_RUNTIME_ERROR)); 20 | 21 | // find and remove a search box control (it contains the community button) 22 | int hSearchCtrl = GetDlgItem(hToolbar, IDC_TOOLBAR_SEARCHBOX); 23 | if (hSearchCtrl != 0) { 24 | PostMessageA(hSearchCtrl, WM_CLOSE, 0, 0); 25 | while (IsWindow(hSearchCtrl)) { 26 | Sleep(100); 27 | } 28 | if (!RedrawWindow(hToolbar, NULL, NULL, RDW_ERASE|RDW_INVALIDATE)) return(catch("onStart(2)->RedrawWindow() failed", ERR_WIN32_ERROR)); 29 | } 30 | 31 | // if search box control not found, find/remove an independent community button 32 | if (!hSearchCtrl) { 33 | int hBtnCtrl = GetDlgItem(hToolbar, IDC_TOOLBAR_COMMUNITY_BUTTON); 34 | if (hBtnCtrl != 0) PostMessageA(hBtnCtrl, WM_CLOSE, 0, 0); 35 | } 36 | return(catch("onStart(3)")); 37 | } 38 | -------------------------------------------------------------------------------- /mql40/scripts/DebugMarketInfo.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/DebugMarketInfo.mq4 -------------------------------------------------------------------------------- /mql40/scripts/EA.Resume.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * EA.Resume 3 | * 4 | * Send a "resume" command to a running EA. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | // supporting EAs maintain a chart object holding the instance id and the status 20 | string sid="", status="", label="EA.status"; 21 | bool isActive = false; 22 | 23 | // check chart for an active EA 24 | if (ObjectFind(label) == 0) { 25 | string text = StrTrim(ObjectDescription(label)); // format: {sid}|{status} 26 | sid = StrLeftTo(text, "|"); 27 | status = StrRightFrom(text, "|"); 28 | isActive = (status!="" && status!="undefined"); 29 | } 30 | 31 | if (isActive) { 32 | if (__isTesting) Tester.Pause(); 33 | 34 | PlaySoundEx("Windows Notify.wav"); // confirm sending the command 35 | int button = MessageBoxEx(ProgramName(), ifString(IsDemoFix(), "", "- Real Account -\n\n") +"Do you really want to resume EA instance "+ sid +"?", MB_ICONQUESTION|MB_OKCANCEL); 36 | if (button != IDOK) return(catch("onStart(1)")); 37 | SendChartCommand("EA.command", "resume"); 38 | } 39 | else { 40 | PlaySoundEx("Windows Chord.wav"); 41 | MessageBoxEx(ProgramName(), "No EA found.", MB_ICONEXCLAMATION|MB_OK); 42 | } 43 | return(catch("onStart(2)")); 44 | } 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /mql40/scripts/EA.Start Long.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * EA.Start Long 3 | * 4 | * Send a "start:long" command to a running EA. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | // supporting EAs maintain a chart object holding the instance id and the status 20 | string sid="", status="", label="EA.status"; 21 | bool isActive = false; 22 | 23 | // check chart for an active EA 24 | if (ObjectFind(label) == 0) { 25 | string text = StrTrim(ObjectDescription(label)); // format: {sid}|{status} 26 | sid = StrLeftTo(text, "|"); 27 | status = StrRightFrom(text, "|"); 28 | isActive = (status!="" && status!="undefined"); 29 | } 30 | 31 | if (isActive) { 32 | if (__isTesting) Tester.Pause(); 33 | 34 | PlaySoundEx("Windows Notify.wav"); // confirm sending the command 35 | int button = MessageBoxEx(ProgramName(), ifString(IsDemoFix(), "", "- Real Account -\n\n") +"Do you really want to start EA instance "+ sid +" long?", MB_ICONQUESTION|MB_OKCANCEL); 36 | if (button != IDOK) return(catch("onStart(1)")); 37 | SendChartCommand("EA.command", "start:long"); 38 | } 39 | else { 40 | PlaySoundEx("Windows Chord.wav"); 41 | MessageBoxEx(ProgramName(), "No EA found.", MB_ICONEXCLAMATION|MB_OK); 42 | } 43 | return(catch("onStart(2)")); 44 | } 45 | -------------------------------------------------------------------------------- /mql40/scripts/EA.Start Short.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * EA.Start Short 3 | * 4 | * Send a "start:short" command to a running EA. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | // supporting EAs maintain a chart object holding the instance id and the status 20 | string sid="", status="", label="EA.status"; 21 | bool isActive = false; 22 | 23 | // check chart for an active EA 24 | if (ObjectFind(label) == 0) { 25 | string text = StrTrim(ObjectDescription(label)); // format: {sid}|{status} 26 | sid = StrLeftTo(text, "|"); 27 | status = StrRightFrom(text, "|"); 28 | isActive = (status!="" && status!="undefined"); 29 | } 30 | 31 | if (isActive) { 32 | if (__isTesting) Tester.Pause(); 33 | 34 | PlaySoundEx("Windows Notify.wav"); // confirm sending the command 35 | int button = MessageBoxEx(ProgramName(), ifString(IsDemoFix(), "", "- Real Account -\n\n") +"Do you really want to start EA instance "+ sid +" short?", MB_ICONQUESTION|MB_OKCANCEL); 36 | if (button != IDOK) return(catch("onStart(1)")); 37 | SendChartCommand("EA.command", "start:short"); 38 | } 39 | else { 40 | PlaySoundEx("Windows Chord.wav"); 41 | MessageBoxEx(ProgramName(), "No EA found.", MB_ICONEXCLAMATION|MB_OK); 42 | } 43 | return(catch("onStart(2)")); 44 | } 45 | -------------------------------------------------------------------------------- /mql40/scripts/EA.Start.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * EA.Start 3 | * 4 | * Send a "start" command to a running EA. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | // supporting EAs maintain a chart object holding the instance id and the status 20 | string sid="", status="", label="EA.status"; 21 | bool isActive = false; 22 | 23 | // check chart for an active EA 24 | if (ObjectFind(label) == 0) { 25 | string text = StrTrim(ObjectDescription(label)); // format: {sid}|{status} 26 | sid = StrLeftTo(text, "|"); 27 | status = StrRightFrom(text, "|"); 28 | isActive = (status!="" && status!="undefined"); 29 | } 30 | 31 | if (isActive) { 32 | if (__isTesting) Tester.Pause(); 33 | 34 | PlaySoundEx("Windows Notify.wav"); // confirm sending the command 35 | int button = MessageBoxEx(ProgramName(), ifString(IsDemoFix(), "", "- Real Account -\n\n") +"Do you really want to start EA instance "+ sid +"?", MB_ICONQUESTION|MB_OKCANCEL); 36 | if (button != IDOK) return(catch("onStart(1)")); 37 | SendChartCommand("EA.command", "start"); 38 | } 39 | else { 40 | PlaySoundEx("Windows Chord.wav"); 41 | MessageBoxEx(ProgramName(), "No EA found.", MB_ICONEXCLAMATION|MB_OK); 42 | } 43 | return(catch("onStart(2)")); 44 | } 45 | -------------------------------------------------------------------------------- /mql40/scripts/EA.Stop.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * EA.Stop 3 | * 4 | * Send a "stop" command to a running EA. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | // supporting EAs maintain a chart object holding the instance id and the status 20 | string sid="", status="", label="EA.status"; 21 | bool isActive = false; 22 | 23 | // check chart for an active EA 24 | if (ObjectFind(label) == 0) { 25 | string text = StrTrim(ObjectDescription(label)); // format: {sid}|{status} 26 | sid = StrLeftTo(text, "|"); 27 | status = StrRightFrom(text, "|"); 28 | isActive = (status!="" && status!="undefined"); 29 | } 30 | 31 | if (isActive) { 32 | if (__isTesting) Tester.Pause(); 33 | 34 | PlaySoundEx("Windows Notify.wav"); // confirm sending the command 35 | int button = MessageBoxEx(ProgramName(), ifString(IsDemoFix(), "", "- Real Account -\n\n") +"Do you really want to stop EA instance "+ sid +"?", MB_ICONQUESTION|MB_OKCANCEL); 36 | if (button != IDOK) return(catch("onStart(1)")); 37 | SendChartCommand("EA.command", "stop"); 38 | } 39 | else { 40 | PlaySoundEx("Windows Chord.wav"); 41 | MessageBoxEx(ProgramName(), "No EA found.", MB_ICONEXCLAMATION|MB_OK); 42 | } 43 | return(catch("onStart(2)")); 44 | } 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /mql40/scripts/EA.ToggleMetrics.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * EA.ToggleMetrics 3 | * 4 | * Send a command to a running EA to toggle the status between calculated/displayed metrics. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | string command = "toggle-metrics"; 20 | string params = ""; 21 | string modifiers = ifString(IsVirtualKeyDown(VK_SHIFT), "VK_SHIFT", ""); 22 | 23 | command = command +":"+ params +":"+ modifiers; 24 | 25 | // send to an active EA 26 | if (ObjectFind("EA.status") == 0) { 27 | SendChartCommand("EA.command", command); 28 | } 29 | return(last_error); 30 | } 31 | -------------------------------------------------------------------------------- /mql40/scripts/EA.Wait.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * EA.Wait 3 | * 4 | * Send a "wait" command to a running EA. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | // supporting EAs maintain a chart object holding the instance id and the status 20 | string sid="", status="", label="EA.status"; 21 | bool isActive = false; 22 | 23 | // check chart for an active EA 24 | if (ObjectFind(label) == 0) { 25 | string text = StrTrim(ObjectDescription(label)); // format: {sid}|{status} 26 | sid = StrLeftTo(text, "|"); 27 | status = StrRightFrom(text, "|"); 28 | isActive = (status!="" && status!="undefined"); 29 | } 30 | 31 | if (isActive) { 32 | if (__isTesting) Tester.Pause(); 33 | 34 | PlaySoundEx("Windows Notify.wav"); // confirm sending the command 35 | int button = MessageBoxEx(ProgramName(), ifString(IsDemoFix(), "", "- Real Account -\n\n") +"Do you really want to enable status \"waiting\" on EA instance "+ sid +"?", MB_ICONQUESTION|MB_OKCANCEL); 36 | if (button != IDOK) return(catch("onStart(1)")); 37 | SendChartCommand("EA.command", "wait"); 38 | } 39 | else { 40 | PlaySoundEx("Windows Chord.wav"); 41 | MessageBoxEx(ProgramName(), "No EA found.", MB_ICONEXCLAMATION|MB_OK); 42 | } 43 | return(catch("onStart(2)")); 44 | } 45 | -------------------------------------------------------------------------------- /mql40/scripts/Empty.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/Empty.mq4 -------------------------------------------------------------------------------- /mql40/scripts/LFX-Monitor TA=123456.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * Schickt dem LFX-Monitor-Indikator des aktuellen Charts die Nachricht, den Trade-Account umzuschalten. 3 | */ 4 | #include 5 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 6 | int __DeinitFlags[]; 7 | #include 8 | #include 9 | 10 | 11 | /** 12 | * Main-Funktion 13 | * 14 | * @return int - error status 15 | */ 16 | int onStart() { 17 | SendChartCommand("LFX-Monitor.command", "trade-account:{account-company},{account-number}"); 18 | return(catch("onStart(1)")); 19 | } 20 | -------------------------------------------------------------------------------- /mql40/scripts/LFX-Monitor TA=Off.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * Schickt dem LFX-Monitor-Indikator des aktuellen Charts die Nachricht, den Trade-Account umzuschalten. 3 | */ 4 | #include 5 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 6 | int __DeinitFlags[]; 7 | #include 8 | #include 9 | 10 | 11 | /** 12 | * Main-Funktion 13 | * 14 | * @return int - error status 15 | */ 16 | int onStart() { 17 | SendChartCommand("LFX-Monitor.command", "trade-account"); // switch back to the current/own trade account 18 | return(catch("onStart(1)")); 19 | } 20 | -------------------------------------------------------------------------------- /mql40/scripts/LFX.Buy Limit.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/LFX.Buy Limit.mq4 -------------------------------------------------------------------------------- /mql40/scripts/LFX.Buy.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/LFX.Buy.mq4 -------------------------------------------------------------------------------- /mql40/scripts/LFX.ClosePositions.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/LFX.ClosePositions.mq4 -------------------------------------------------------------------------------- /mql40/scripts/LFX.ExecuteTradeCmd.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/LFX.ExecuteTradeCmd.mq4 -------------------------------------------------------------------------------- /mql40/scripts/LFX.OpenPosition.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/LFX.OpenPosition.mq4 -------------------------------------------------------------------------------- /mql40/scripts/LFX.Sell Limit.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/LFX.Sell Limit.mq4 -------------------------------------------------------------------------------- /mql40/scripts/LFX.Sell.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/LFX.Sell.mq4 -------------------------------------------------------------------------------- /mql40/scripts/MarketWatch.Symbols.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/MarketWatch.Symbols.mq4 -------------------------------------------------------------------------------- /mql40/scripts/ParameterStepper.Down.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * ParameterStepper Down 3 | * 4 | * Send a command to listening programs to decrease a program-specific parameter. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | if (__isTesting) Tester.Pause(); 20 | 21 | string modifiers = ""; 22 | if (IsVirtualKeyDown(VK_ESCAPE)) modifiers = modifiers +",VK_ESCAPE"; 23 | if (IsVirtualKeyDown(VK_TAB)) modifiers = modifiers +",VK_TAB"; 24 | if (IsVirtualKeyDown(VK_CAPITAL)) modifiers = modifiers +",VK_CAPITAL"; // CAPSLOCK key 25 | if (IsVirtualKeyDown(VK_SHIFT)) modifiers = modifiers +",VK_SHIFT"; 26 | if (IsVirtualKeyDown(VK_CONTROL)) modifiers = modifiers +",VK_CONTROL"; 27 | if (IsVirtualKeyDown(VK_MENU)) modifiers = modifiers +",VK_MENU"; // ALT key 28 | if (IsVirtualKeyDown(VK_LWIN)) modifiers = modifiers +",VK_LWIN"; 29 | if (IsVirtualKeyDown(VK_RWIN)) modifiers = modifiers +",VK_RWIN"; 30 | 31 | SendChartCommand("ParameterStepper.command", "parameter:down:"+ StrRight(modifiers, -1)); 32 | return(catch("onStart(1)")); 33 | } 34 | -------------------------------------------------------------------------------- /mql40/scripts/ParameterStepper.Up.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * ParameterStepper Up 3 | * 4 | * Send a command to listening programs to increase a program-specific parameter. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | if (__isTesting) Tester.Pause(); 20 | 21 | string modifiers = ""; 22 | if (IsVirtualKeyDown(VK_ESCAPE)) modifiers = modifiers +",VK_ESCAPE"; 23 | if (IsVirtualKeyDown(VK_TAB)) modifiers = modifiers +",VK_TAB"; 24 | if (IsVirtualKeyDown(VK_CAPITAL)) modifiers = modifiers +",VK_CAPITAL"; // CAPSLOCK key 25 | if (IsVirtualKeyDown(VK_SHIFT)) modifiers = modifiers +",VK_SHIFT"; 26 | if (IsVirtualKeyDown(VK_CONTROL)) modifiers = modifiers +",VK_CONTROL"; 27 | if (IsVirtualKeyDown(VK_MENU)) modifiers = modifiers +",VK_MENU"; // ALT key 28 | if (IsVirtualKeyDown(VK_LWIN)) modifiers = modifiers +",VK_LWIN"; 29 | if (IsVirtualKeyDown(VK_RWIN)) modifiers = modifiers +",VK_RWIN"; 30 | 31 | SendChartCommand("ParameterStepper.command", "parameter:up:"+ StrRight(modifiers, -1)); 32 | return(catch("onStart(1)")); 33 | } 34 | -------------------------------------------------------------------------------- /mql40/scripts/ReopenAlerts.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * Reopen the alert dialog window. 3 | */ 4 | #include 5 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 6 | int __DeinitFlags[]; 7 | #include 8 | #include 9 | 10 | 11 | /** 12 | * Main function 13 | * 14 | * @return int - error status 15 | */ 16 | int onStart() { 17 | if (!ReopenAlertDialog(false)) { 18 | PlaySoundEx("Plonk.wav"); // "Alert" window not found 19 | } 20 | return(catch("onStart(1)")); 21 | } 22 | -------------------------------------------------------------------------------- /mql40/scripts/SuperBars.TimeframeDown.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * SuperBars Down 3 | * 4 | * Send a command to the SuperBars indicator to switch to the next lower timeframe. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | if (__isTesting) Tester.Pause(); 20 | 21 | string modifiers = ""; 22 | if (IsVirtualKeyDown(VK_ESCAPE)) modifiers = modifiers +",VK_ESCAPE"; 23 | if (IsVirtualKeyDown(VK_TAB)) modifiers = modifiers +",VK_TAB"; 24 | if (IsVirtualKeyDown(VK_CAPITAL)) modifiers = modifiers +",VK_CAPITAL"; // CAPSLOCK key 25 | if (IsVirtualKeyDown(VK_CONTROL)) modifiers = modifiers +",VK_CONTROL"; 26 | if (IsVirtualKeyDown(VK_MENU)) modifiers = modifiers +",VK_MENU"; // ALT key 27 | if (IsVirtualKeyDown(VK_LWIN)) modifiers = modifiers +",VK_LWIN"; 28 | if (IsVirtualKeyDown(VK_RWIN)) modifiers = modifiers +",VK_RWIN"; 29 | 30 | if (IsVirtualKeyDown(VK_SHIFT)) { 31 | modifiers = modifiers +",VK_SHIFT"; 32 | SendChartCommand("TrendBars.command", "barwidth:decrease:"+ StrRight(modifiers, -1)); 33 | } 34 | else { 35 | SendChartCommand("SuperBars.command", "timeframe:down:"+ StrRight(modifiers, -1)); 36 | } 37 | return(catch("onStart(1)")); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /mql40/scripts/SuperBars.TimeframeUp.mq4: -------------------------------------------------------------------------------- 1 | /** 2 | * SuperBars Up 3 | * 4 | * Send a command to the SuperBars indicator to switch to the next higher timeframe. 5 | */ 6 | #include 7 | int __InitFlags[] = {INIT_NO_BARS_REQUIRED}; 8 | int __DeinitFlags[]; 9 | #include 10 | #include 11 | 12 | 13 | /** 14 | * Main function 15 | * 16 | * @return int - error status 17 | */ 18 | int onStart() { 19 | if (__isTesting) Tester.Pause(); 20 | 21 | string modifiers = ""; 22 | if (IsVirtualKeyDown(VK_ESCAPE)) modifiers = modifiers +",VK_ESCAPE"; 23 | if (IsVirtualKeyDown(VK_TAB)) modifiers = modifiers +",VK_TAB"; 24 | if (IsVirtualKeyDown(VK_CAPITAL)) modifiers = modifiers +",VK_CAPITAL"; // CAPSLOCK key 25 | if (IsVirtualKeyDown(VK_CONTROL)) modifiers = modifiers +",VK_CONTROL"; 26 | if (IsVirtualKeyDown(VK_MENU)) modifiers = modifiers +",VK_MENU"; // ALT key 27 | if (IsVirtualKeyDown(VK_LWIN)) modifiers = modifiers +",VK_LWIN"; 28 | if (IsVirtualKeyDown(VK_RWIN)) modifiers = modifiers +",VK_RWIN"; 29 | 30 | if (IsVirtualKeyDown(VK_SHIFT)) { 31 | modifiers = modifiers +",VK_SHIFT"; 32 | SendChartCommand("TrendBars.command", "barwidth:increase:"+ StrRight(modifiers, -1)); 33 | } 34 | else { 35 | SendChartCommand("SuperBars.command", "timeframe:up:"+ StrRight(modifiers, -1)); 36 | } 37 | return(catch("onStart(1)")); 38 | } 39 | -------------------------------------------------------------------------------- /mql40/scripts/Tools.MetaEditor.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql40/scripts/Tools.MetaEditor.mq4 -------------------------------------------------------------------------------- /mql45/experts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql45/experts/.gitkeep -------------------------------------------------------------------------------- /mql45/include/rsf/MT4Expander.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * MT4Expander import declarations 3 | */ 4 | #import "rsfMT4Expander.dll" 5 | 6 | // terminal status, terminal interaction 7 | int GetTerminalMainWindow(); 8 | 9 | // date/time 10 | string GmtTimeFormatW(datetime time, string format); 11 | 12 | // conversion functions 13 | string ErrorToStrW(int error); 14 | string LoglevelToStrW(int level); 15 | string MessageBoxButtonToStrW(int id); 16 | 17 | // other helpers 18 | int GetLastWin32Error(); 19 | int PlaySoundW(string soundfile); 20 | #import 21 | -------------------------------------------------------------------------------- /mql45/include/rsf/MT4iQuickChannel.mqh: -------------------------------------------------------------------------------- 1 | ../../../mql40/include/rsf/MT4iQuickChannel.mqh -------------------------------------------------------------------------------- /mql45/include/rsf/functions/shared: -------------------------------------------------------------------------------- 1 | ../../../../mql40/include/rsf/functions/shared -------------------------------------------------------------------------------- /mql45/include/rsf/shared.mqh: -------------------------------------------------------------------------------- 1 | /** 2 | * MQL constants shared with the MT4Expander. 3 | * 4 | * When the MT4Expander is compiled definitions are read from directory "mql4/include/shared" and not from here. 5 | * Nevertheless, these constants exists in both MQL versions and in MT4Expander, and have everywhere the same values. 6 | * 7 | * Unlike in MQL4, the redefinition of constants with the same value is not allowed in MQL5. 8 | */ 9 | 10 | // in C++ already defined 11 | #ifndef INT_MIN 12 | #define INT_MIN 0x80000000 // minimum signed int value (-2147483648) 13 | #define INT_MAX 0x7FFFFFFF // maximum signed int value (+2147483647) 14 | #endif 15 | 16 | 17 | // mirror the file structure of "mql4/include/rsf/shared.mqh" 18 | #include 19 | #include 20 | 21 | 22 | // in C++ defined with the same value but a different type 23 | #define CLR_NONE 0xFFFFFFFF // 0xFFFFFFFFL 24 | 25 | 26 | // MetaQuotes constants replaced by framework aliases (too long names or odd wording) 27 | #ifndef ERR_DLLFUNC_CRITICALERROR 28 | #define ERR_DLLFUNC_CRITICALERROR ERR_DLL_EXCEPTION 29 | #define ERR_EXTERNAL_CALLS_NOT_ALLOWED ERR_EX4_CALLS_NOT_ALLOWED 30 | #define ERR_FILE_BUFFER_ALLOCATION_ERROR ERR_FILE_BUFFER_ALLOC_ERROR 31 | #define ERR_FILE_CANNOT_CLEAN_DIRECTORY ERR_FILE_CANT_CLEAN_DIRECTORY 32 | #define ERR_FILE_CANNOT_DELETE_DIRECTORY ERR_FILE_CANT_DELETE_DIRECTORY 33 | #define ERR_FILE_NOT_EXIST ERR_FILE_NOT_FOUND 34 | #define ERR_FILE_WRONG_HANDLE ERR_FILE_UNKNOWN_HANDLE 35 | #define ERR_FUNC_NOT_ALLOWED_IN_TESTING ERR_FUNC_NOT_ALLOWED_IN_TESTER 36 | #define ERR_HISTORY_WILL_UPDATED ERS_HISTORY_UPDATE // status code, not an error 37 | #define ERR_INCORRECT_SERIESARRAY_USING ERR_SERIES_NOT_AVAILABLE 38 | #define ERR_INVALID_FUNCTION_PARAMVALUE ERR_INVALID_PARAMETER 39 | #define ERR_INVALID_STOPS ERR_INVALID_STOP 40 | #define ERR_NOTIFICATION_ERROR ERR_NOTIFICATION_SEND_ERROR 41 | #define ERR_NO_ORDER_SELECTED ERR_NO_TICKET_SELECTED 42 | #define ERR_SOME_ARRAY_ERROR ERR_ARRAY_ERROR 43 | #define ERR_SOME_FILE_ERROR ERR_FILE_ERROR 44 | #define ERR_SOME_OBJECT_ERROR ERR_OBJECT_ERROR 45 | #define ERR_UNKNOWN_SYMBOL ERR_SYMBOL_NOT_AVAILABLE 46 | #endif 47 | -------------------------------------------------------------------------------- /mql45/include/rsf/win32defines.mqh: -------------------------------------------------------------------------------- 1 | ../../../mql40/include/rsf/win32defines.mqh -------------------------------------------------------------------------------- /mql45/indicators/BFX Core Volume v1.20.0.ex4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql45/indicators/BFX Core Volume v1.20.0.ex4 -------------------------------------------------------------------------------- /mql45/indicators/XU v4-XARDFX.ex4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql45/indicators/XU v4-XARDFX.ex4 -------------------------------------------------------------------------------- /mql45/libraries/BankersFX Lib.ex4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql45/libraries/BankersFX Lib.ex4 -------------------------------------------------------------------------------- /mql45/scripts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/mql45/scripts/.gitkeep -------------------------------------------------------------------------------- /mql50/experts/.gitkeep: -------------------------------------------------------------------------------- 1 | /scripts/ 2 | -------------------------------------------------------------------------------- /mql50/include/.gitkeep: -------------------------------------------------------------------------------- 1 | /scripts/ 2 | -------------------------------------------------------------------------------- /mql50/indicators/.gitkeep: -------------------------------------------------------------------------------- 1 | /scripts/ 2 | -------------------------------------------------------------------------------- /mql50/libraries/.gitkeep: -------------------------------------------------------------------------------- 1 | /scripts/ 2 | -------------------------------------------------------------------------------- /mql50/scripts/.gitkeep: -------------------------------------------------------------------------------- 1 | /scripts/ 2 | -------------------------------------------------------------------------------- /sounds/Alarm.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Alarm.wav -------------------------------------------------------------------------------- /sounds/AlarmMulti.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/AlarmMulti.wav -------------------------------------------------------------------------------- /sounds/Alert down.wav: -------------------------------------------------------------------------------- 1 | Buzzer.wav -------------------------------------------------------------------------------- /sounds/Alert up.wav: -------------------------------------------------------------------------------- 1 | Alert2.wav -------------------------------------------------------------------------------- /sounds/Alert.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Alert.wav -------------------------------------------------------------------------------- /sounds/Alert2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Alert2.wav -------------------------------------------------------------------------------- /sounds/AlertDefault.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/AlertDefault.wav -------------------------------------------------------------------------------- /sounds/AutoChase.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/AutoChase.wav -------------------------------------------------------------------------------- /sounds/Beacon.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Beacon.wav -------------------------------------------------------------------------------- /sounds/Bell 1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Bell 1.wav -------------------------------------------------------------------------------- /sounds/Bell 2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Bell 2.wav -------------------------------------------------------------------------------- /sounds/Big Ben.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Big Ben.wav -------------------------------------------------------------------------------- /sounds/Bulk.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Bulk.wav -------------------------------------------------------------------------------- /sounds/Buzzer.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Buzzer.wav -------------------------------------------------------------------------------- /sounds/Cashing.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Cashing.wav -------------------------------------------------------------------------------- /sounds/Chotoneto.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Chotoneto.wav -------------------------------------------------------------------------------- /sounds/Close.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Close.wav -------------------------------------------------------------------------------- /sounds/CloseOrder.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/CloseOrder.wav -------------------------------------------------------------------------------- /sounds/Connect.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Connect.wav -------------------------------------------------------------------------------- /sounds/Connected.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Connected.wav -------------------------------------------------------------------------------- /sounds/Didup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Didup.wav -------------------------------------------------------------------------------- /sounds/Dingdong.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Dingdong.wav -------------------------------------------------------------------------------- /sounds/Disconn.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Disconn.wav -------------------------------------------------------------------------------- /sounds/Disconnect.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Disconnect.wav -------------------------------------------------------------------------------- /sounds/Drop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Drop.wav -------------------------------------------------------------------------------- /sounds/Email.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Email.wav -------------------------------------------------------------------------------- /sounds/Error.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Error.wav -------------------------------------------------------------------------------- /sounds/Event.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Event.wav -------------------------------------------------------------------------------- /sounds/Exit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Exit.wav -------------------------------------------------------------------------------- /sounds/Expert.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Expert.wav -------------------------------------------------------------------------------- /sounds/Fun.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Fun.wav -------------------------------------------------------------------------------- /sounds/Function.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Function.wav -------------------------------------------------------------------------------- /sounds/Horn.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Horn.wav -------------------------------------------------------------------------------- /sounds/Inside Bar.wav: -------------------------------------------------------------------------------- 1 | Exit.wav -------------------------------------------------------------------------------- /sounds/Knopka-N.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Knopka-N.wav -------------------------------------------------------------------------------- /sounds/Knopka-Y.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Knopka-Y.wav -------------------------------------------------------------------------------- /sounds/Ku-ku.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Ku-ku.wav -------------------------------------------------------------------------------- /sounds/Laser.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Laser.wav -------------------------------------------------------------------------------- /sounds/MarginLow.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/MarginLow.wav -------------------------------------------------------------------------------- /sounds/MarginStopout.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/MarginStopout.wav -------------------------------------------------------------------------------- /sounds/News.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/News.wav -------------------------------------------------------------------------------- /sounds/Night.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Night.wav -------------------------------------------------------------------------------- /sounds/Notify.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Notify.wav -------------------------------------------------------------------------------- /sounds/OK.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/OK.wav -------------------------------------------------------------------------------- /sounds/Oh-oh.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Oh-oh.wav -------------------------------------------------------------------------------- /sounds/Online.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Online.wav -------------------------------------------------------------------------------- /sounds/Ooops.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Ooops.wav -------------------------------------------------------------------------------- /sounds/OrderFailed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/OrderFailed.wav -------------------------------------------------------------------------------- /sounds/OrderModified.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/OrderModified.wav -------------------------------------------------------------------------------- /sounds/OrderOk.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/OrderOk.wav -------------------------------------------------------------------------------- /sounds/OrderRequote.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/OrderRequote.wav -------------------------------------------------------------------------------- /sounds/OrderTimeout.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/OrderTimeout.wav -------------------------------------------------------------------------------- /sounds/Parameter Step.wav: -------------------------------------------------------------------------------- 1 | OrderModified.wav -------------------------------------------------------------------------------- /sounds/PhoneCalling.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/PhoneCalling.wav -------------------------------------------------------------------------------- /sounds/PhoneRinging.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/PhoneRinging.wav -------------------------------------------------------------------------------- /sounds/Plonk.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Plonk.wav -------------------------------------------------------------------------------- /sounds/Price Advance.wav: -------------------------------------------------------------------------------- 1 | AlertDefault.wav -------------------------------------------------------------------------------- /sounds/Price Decline.wav: -------------------------------------------------------------------------------- 1 | Snap.wav -------------------------------------------------------------------------------- /sounds/Prrrp.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Prrrp.wav -------------------------------------------------------------------------------- /sounds/Signal Down.wav: -------------------------------------------------------------------------------- 1 | Dingdong.wav -------------------------------------------------------------------------------- /sounds/Signal Up.wav: -------------------------------------------------------------------------------- 1 | Windows Alert.wav -------------------------------------------------------------------------------- /sounds/Siren.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Siren.wav -------------------------------------------------------------------------------- /sounds/Snap.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Snap.wav -------------------------------------------------------------------------------- /sounds/Snitch.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Snitch.wav -------------------------------------------------------------------------------- /sounds/Sonar.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Sonar.wav -------------------------------------------------------------------------------- /sounds/Sunduk.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Sunduk.wav -------------------------------------------------------------------------------- /sounds/Tick.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Tick.wav -------------------------------------------------------------------------------- /sounds/Type.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Type.wav -------------------------------------------------------------------------------- /sounds/Viber Message.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Viber Message.wav -------------------------------------------------------------------------------- /sounds/Volatility 1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Volatility 1.wav -------------------------------------------------------------------------------- /sounds/Volatility 2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Volatility 2.wav -------------------------------------------------------------------------------- /sounds/Volatility 3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Volatility 3.wav -------------------------------------------------------------------------------- /sounds/Whoof.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Whoof.wav -------------------------------------------------------------------------------- /sounds/Windows Alert.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Alert.wav -------------------------------------------------------------------------------- /sounds/Windows Batterie kritisch.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Batterie kritisch.wav -------------------------------------------------------------------------------- /sounds/Windows Batterie niedrig.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Batterie niedrig.wav -------------------------------------------------------------------------------- /sounds/Windows Benachrichtigung.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Benachrichtigung.wav -------------------------------------------------------------------------------- /sounds/Windows Chimes.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Chimes.wav -------------------------------------------------------------------------------- /sounds/Windows Chord.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Chord.wav -------------------------------------------------------------------------------- /sounds/Windows Confirm.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Confirm.wav -------------------------------------------------------------------------------- /sounds/Windows Drucken abgeschlossen.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Drucken abgeschlossen.wav -------------------------------------------------------------------------------- /sounds/Windows Hinweis.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Hinweis.wav -------------------------------------------------------------------------------- /sounds/Windows Informationsleiste.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Informationsleiste.wav -------------------------------------------------------------------------------- /sounds/Windows Kritischer Fehler.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Kritischer Fehler.wav -------------------------------------------------------------------------------- /sounds/Windows Notify.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Notify.wav -------------------------------------------------------------------------------- /sounds/Windows Ping.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Ping.wav -------------------------------------------------------------------------------- /sounds/Windows Sprechblase.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Windows Sprechblase.wav -------------------------------------------------------------------------------- /sounds/Work.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Work.wav -------------------------------------------------------------------------------- /sounds/Wutch.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Wutch.wav -------------------------------------------------------------------------------- /sounds/Zirp.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/Zirp.wav -------------------------------------------------------------------------------- /sounds/speech/0 IVONA Text-to-Speech.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://nextup.com/ivona/ 3 | IDList= 4 | HotKey=0 5 | [{000214A0-0000-0000-C000-000000000046}] 6 | Prop3=19,11 7 | -------------------------------------------------------------------------------- /sounds/speech/Euro-Dollar position is 10 pips in profit.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/speech/Euro-Dollar position is 10 pips in profit.mp3 -------------------------------------------------------------------------------- /sounds/speech/IncomingMail.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/speech/IncomingMail.wav -------------------------------------------------------------------------------- /sounds/speech/OrderCancelled.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/speech/OrderCancelled.wav -------------------------------------------------------------------------------- /sounds/speech/OrderExecutionFailed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/speech/OrderExecutionFailed.wav -------------------------------------------------------------------------------- /sounds/speech/OrderFilled.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/speech/OrderFilled.wav -------------------------------------------------------------------------------- /sounds/speech/OrderPending.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/speech/OrderPending.wav -------------------------------------------------------------------------------- /sounds/speech/PositionClosed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/speech/PositionClosed.wav -------------------------------------------------------------------------------- /sounds/speech/ReversingPosition.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/speech/ReversingPosition.wav -------------------------------------------------------------------------------- /sounds/speech/TargetFilled.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/speech/TargetFilled.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick+1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick+1.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick+2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick+2.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick+3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick+3.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick+4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick+4.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick+5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick+5.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick+6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick+6.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick+7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick+7.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick+8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick+8.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick+9.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick+9.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick-1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick-1.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick-2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick-2.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick-3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick-3.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick-4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick-4.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick-5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick-5.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick-6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick-6.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick-7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick-7.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick-8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick-8.wav -------------------------------------------------------------------------------- /sounds/ticks/Tick-9.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosasurfer/mt4-mql-framework/c6c139027aadd9ce8b72cdabbcb002aede99d093/sounds/ticks/Tick-9.wav -------------------------------------------------------------------------------- /templates4/01 Default.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | symbol=GBPUSD 5 | period=60 6 | digits=5 7 | 8 | leftpos=9229 9 | scale=1 10 | graph=1 11 | fore=0 12 | grid=0 13 | volume=0 14 | ohlc=0 15 | askline=0 16 | days=0 17 | descriptions=1 18 | scroll=0 19 | shift=1 20 | shift_size=50 21 | 22 | fixed_pos=620 23 | window_left=0 24 | window_top=0 25 | window_right=1292 26 | window_bottom=812 27 | window_type=3 28 | 29 | background_color=16316664 30 | foreground_color=0 31 | barup_color=30720 32 | bardown_color=210 33 | bullcandle_color=30720 34 | bearcandle_color=210 35 | chartline_color=11119017 36 | volumes_color=30720 37 | grid_color=14474460 38 | askline_color=11823615 39 | stops_color=17919 40 | 41 | 42 | height=300 43 | 44 | 45 | name=main 46 | 47 | 48 | 49 | name=Custom Indicator 50 | 51 | name=Grid 52 | flags=347 53 | window_num=0 54 | 55 | show_data=0 56 | 57 | 58 | 59 | name=Custom Indicator 60 | 61 | name=ChartInfos 62 | flags=347 63 | window_num=0 64 | 65 | show_data=0 66 | 67 | 68 | 69 | name=Custom Indicator 70 | 71 | name=SuperBars 72 | flags=339 73 | window_num=0 74 | 75 | show_data=0 76 | 77 | 78 | 79 | name=Custom Indicator 80 | 81 | name=Inside Bars 82 | flags=339 83 | window_num=0 84 | 85 | Timeframe=D1 86 | NumberOfInsideBars=3 87 | 88 | 89 | period_flags=31 90 | show_data=0 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /templates4/02 Default (AutoScroll).tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | symbol=GBPUSD 5 | period=60 6 | digits=5 7 | 8 | leftpos=9229 9 | scale=1 10 | graph=1 11 | fore=0 12 | grid=0 13 | volume=0 14 | ohlc=0 15 | askline=0 16 | days=0 17 | descriptions=1 18 | scroll=1 19 | shift=1 20 | shift_size=10 21 | 22 | fixed_pos=620 23 | window_left=0 24 | window_top=0 25 | window_right=1292 26 | window_bottom=812 27 | window_type=3 28 | 29 | background_color=16316664 30 | foreground_color=0 31 | barup_color=30720 32 | bardown_color=210 33 | bullcandle_color=30720 34 | bearcandle_color=210 35 | chartline_color=11119017 36 | volumes_color=30720 37 | grid_color=14474460 38 | askline_color=11823615 39 | stops_color=17919 40 | 41 | 42 | height=300 43 | 44 | 45 | name=main 46 | 47 | 48 | 49 | name=Custom Indicator 50 | 51 | name=Grid 52 | flags=347 53 | window_num=0 54 | 55 | show_data=0 56 | 57 | 58 | 59 | name=Custom Indicator 60 | 61 | name=ChartInfos 62 | flags=347 63 | window_num=0 64 | 65 | show_data=0 66 | 67 | 68 | 69 | name=Custom Indicator 70 | 71 | name=SuperBars 72 | flags=339 73 | window_num=0 74 | 75 | 76 | 77 | show_data=0 78 | 79 | 80 | 81 | name=Custom Indicator 82 | 83 | name=Inside Bars 84 | flags=339 85 | window_num=0 86 | 87 | Timeframe=D1 88 | NumberOfInsideBars=3 89 | 90 | 91 | period_flags=31 92 | show_data=0 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /templates4/10 --------------------------------------------.tpl: -------------------------------------------------------------------------------- 1 | 01 Default.tpl -------------------------------------------------------------------------------- /templates4/11 ADR(80).tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=GBPUSD 3 | period=60 4 | digits=5 5 | 6 | leftpos=9229 7 | scale=1 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=0 17 | shift=1 18 | shift_size=50 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1292 24 | window_bottom=812 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=250 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | show_data=0 74 | 75 | 76 | 77 | 78 | height=100 79 | fixed_height=0 80 | 81 | name=Custom Indicator 82 | 83 | name=Average Range 84 | flags=339 85 | window_num=1 86 | 87 | TrueRange=1 88 | MA.Method=SMA | LWMA* | EMA | SMMA 89 | MA.Periods=80 90 | 91 | 92 | color_0=16711680 93 | weight_0=2 94 | show_data=1 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /templates4/20 --------------------------------------------.tpl: -------------------------------------------------------------------------------- 1 | 01 Default.tpl -------------------------------------------------------------------------------- /templates4/30 --------------------------------------------.tpl: -------------------------------------------------------------------------------- 1 | 01 Default.tpl -------------------------------------------------------------------------------- /templates4/34 LFX Monitor.tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=GBPAUD 3 | period=60 4 | digits=5 5 | 6 | leftpos=17392 7 | scale=1 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=1 17 | shift=1 18 | shift_size=50 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=47 23 | window_right=996 24 | window_bottom=632 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=10 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=LFX-Monitor 50 | flags=339 51 | window_num=0 52 | 53 | AUDLFX.Enabled=1 54 | CADLFX.Enabled=1 55 | CHFLFX.Enabled=1 56 | EURLFX.Enabled=1 57 | GBPLFX.Enabled=1 58 | JPYLFX.Enabled=1 59 | NZDLFX.Enabled=1 60 | USDLFX.Enabled=1 61 | NOKFX7.Enabled=1 62 | SEKFX7.Enabled=1 63 | SGDFX7.Enabled=1 64 | ZARFX7.Enabled=1 65 | USDX.Enabled=1 66 | EURX.Enabled=1 67 | XAUI.Enabled=1 68 | Recording.Enabled=1 69 | Recording.HistoryDirectory=history/XTrade-Synthetic 70 | Recording.HistoryFormat=400 71 | 72 | 73 | color_0=4294967295 74 | show_data=0 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /templates4/35 Equity Recorder.tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=GBPAUD 3 | period=60 4 | digits=5 5 | 6 | leftpos=17392 7 | scale=1 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=1 17 | shift=1 18 | shift_size=10 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1292 24 | window_bottom=812 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=300 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=EquityRecorder 50 | flags=339 51 | window_num=0 52 | 53 | 54 | 55 | show_data=1 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /templates4/36 Minimal (ChartInfos).tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=GBPUSD 3 | period=60 4 | digits=5 5 | 6 | leftpos=9229 7 | scale=1 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=1 17 | shift=1 18 | shift_size=10 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1292 24 | window_bottom=812 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=300 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=ChartInfos 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /templates4/37 Empty (no indicators).tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=GBPAUD 3 | period=60 4 | digits=5 5 | 6 | leftpos=17392 7 | scale=1 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=1 17 | shift=1 18 | shift_size=10 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1292 24 | window_bottom=812 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=300 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /templates4/40 --------------------------------------------.tpl: -------------------------------------------------------------------------------- 1 | 01 Default.tpl -------------------------------------------------------------------------------- /templates4/Default.tpl: -------------------------------------------------------------------------------- 1 | 01 Default.tpl -------------------------------------------------------------------------------- /templates4/Offline.tpl: -------------------------------------------------------------------------------- 1 | 2 | offline=1 3 | 4 | symbol=GBPUSD 5 | period=60 6 | digits=5 7 | 8 | leftpos=9229 9 | scale=1 10 | graph=1 11 | fore=0 12 | grid=0 13 | volume=0 14 | ohlc=0 15 | askline=0 16 | days=0 17 | descriptions=1 18 | scroll=0 19 | shift=1 20 | shift_size=50 21 | 22 | fixed_pos=620 23 | window_left=0 24 | window_top=0 25 | window_right=1292 26 | window_bottom=812 27 | window_type=3 28 | 29 | background_color=16316664 30 | foreground_color=0 31 | barup_color=30720 32 | bardown_color=210 33 | bullcandle_color=30720 34 | bearcandle_color=210 35 | chartline_color=11119017 36 | volumes_color=30720 37 | grid_color=14474460 38 | askline_color=11823615 39 | stops_color=17919 40 | 41 | 42 | height=300 43 | 44 | 45 | name=main 46 | 47 | 48 | 49 | name=Custom Indicator 50 | 51 | name=Grid 52 | flags=347 53 | window_num=0 54 | 55 | show_data=0 56 | 57 | 58 | 59 | name=Custom Indicator 60 | 61 | name=ChartInfos 62 | flags=347 63 | window_num=0 64 | 65 | Offline.Ticker=0 66 | 67 | 68 | show_data=0 69 | 70 | 71 | 72 | name=Custom Indicator 73 | 74 | name=SuperBars 75 | flags=339 76 | window_num=0 77 | 78 | show_data=0 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /templates4/OptimizationReport.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Strategy Tester: <!--EXPERTNAME--> 5 | 6 | 7 | 8 | 9 | 14 | 19 | 25 | 26 | 27 |
28 |
Optimization Report
29 |
30 |
()

31 | 32 | 33 | 34 |
35 |
36 | 37 | 38 |
39 |
40 | -------------------------------------------------------------------------------- /templates4/StrategyTester.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Strategy Tester: <!--EXPERTNAME--> 5 | 6 | 7 | 8 | 9 | 14 | 19 | 25 | 26 | 27 |
28 |
Strategy Tester Report
29 |
30 |
()

31 | 32 | 33 | 34 |
35 |
36 | 37 | 38 |
39 |
40 | -------------------------------------------------------------------------------- /templates4/attic/ALMA(38), NLMA(20).tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=USDCHF 3 | period=30 4 | digits=5 5 | 6 | leftpos=13564 7 | scale=2 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | scroll=0 13 | shift=1 14 | ohlc=0 15 | askline=0 16 | days=0 17 | descriptions=1 18 | shift_size=50 19 | fixed_pos=620 20 | 21 | window_left=0 22 | window_top=0 23 | window_right=1304 24 | window_bottom=1032 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=8421504 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=100 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | 74 | 75 | show_data=0 76 | 77 | 78 | 79 | name=Custom Indicator 80 | 81 | name=ALMA 82 | flags=339 83 | window_num=0 84 | 85 | MA.Periods=38 86 | UpTrend.Color=3329330 87 | DownTrend.Color=255 88 | Draw.Type=Line | Dot* 89 | Draw.Width=3 90 | 91 | 92 | show_data=1 93 | 94 | 95 | 96 | name=Custom Indicator 97 | 98 | name=NonLagMA 99 | flags=339 100 | window_num=0 101 | 102 | WaveCycle.Periods=20 103 | Color.UpTrend=14772545 104 | Color.DownTrend=65535 105 | 106 | 107 | show_data=1 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /templates4/attic/ALMA(38).tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=USDCHF 3 | period=60 4 | digits=5 5 | 6 | leftpos=13564 7 | scale=2 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=0 17 | shift=1 18 | shift_size=50 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1304 24 | window_bottom=1032 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=100 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | show_data=0 74 | 75 | 76 | 77 | name=Custom Indicator 78 | 79 | name=ALMA 80 | flags=339 81 | window_num=0 82 | 83 | MA.Periods=38 84 | UpTrend.Color=16711680 85 | DownTrend.Color=255 86 | Background.Color=16748574 87 | Draw.Type=Line | Dot* 88 | Draw.Width=4 89 | 90 | 91 | show_data=1 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /templates4/attic/Awesome (MACD).tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=USDCHF 3 | period=60 4 | digits=5 5 | 6 | leftpos=13564 7 | scale=4 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | scroll=0 13 | shift=1 14 | ohlc=0 15 | askline=0 16 | days=0 17 | descriptions=1 18 | shift_size=50 19 | fixed_pos=620 20 | 21 | window_left=0 22 | window_top=0 23 | window_right=1304 24 | window_bottom=780 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=8421504 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=110 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | 74 | 75 | show_data=0 76 | 77 | 78 | 79 | name=Custom Indicator 80 | 81 | name=Moving Average 82 | flags=339 83 | window_num=0 84 | 85 | MA.Periods=5 86 | MA.Method=SMA 87 | 88 | 89 | show_data=1 90 | 91 | 92 | 93 | name=Custom Indicator 94 | 95 | name=Moving Average 96 | flags=339 97 | window_num=0 98 | 99 | MA.Periods=34 100 | MA.Method=SMA 101 | UpTrend.Color=16711680 102 | DownTrend.Color=16711680 103 | 104 | 105 | show_data=1 106 | 107 | 108 | 109 | 110 | height=27 111 | 112 | name=Awesome Oscillator 113 | color=32768 114 | style=0 115 | weight=2 116 | color2=255 117 | style2=0 118 | weight2=2 119 | show_data=1 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /templates4/attic/Default (OfflineTicker).tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=GBPUSD 3 | period=60 4 | digits=5 5 | 6 | leftpos=9229 7 | scale=1 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | scroll=0 13 | shift=1 14 | ohlc=0 15 | askline=0 16 | days=0 17 | descriptions=1 18 | shift_size=50 19 | fixed_pos=620 20 | 21 | window_left=0 22 | window_top=0 23 | window_right=1292 24 | window_bottom=812 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=8421504 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=300 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | show_data=0 74 | 75 | 76 | 77 | name=Custom Indicator 78 | 79 | name=OfflineTicker 80 | flags=347 81 | window_num=0 82 | 83 | show_data=0 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /templates4/attic/Default (OfflineTicker=Off).tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=GBPUSD 3 | period=60 4 | digits=5 5 | 6 | leftpos=9229 7 | scale=1 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | scroll=0 13 | shift=1 14 | ohlc=0 15 | askline=0 16 | days=0 17 | descriptions=1 18 | shift_size=50 19 | fixed_pos=620 20 | 21 | window_left=0 22 | window_top=0 23 | window_right=1292 24 | window_bottom=812 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=8421504 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=300 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | Offline.Ticker=0 64 | 65 | 66 | show_data=0 67 | 68 | 69 | 70 | name=Custom Indicator 71 | 72 | name=SuperBars 73 | flags=339 74 | window_num=0 75 | 76 | show_data=0 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /templates4/attic/Gammarat Channel.tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=GBPUSD 3 | period=60 4 | digits=5 5 | 6 | leftpos=9229 7 | scale=2 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=0 17 | shift=1 18 | shift_size=50 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1292 24 | window_bottom=812 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=300 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | show_data=0 74 | 75 | 76 | 77 | name=Custom Indicator 78 | 79 | name=.attic/Gammarat Channel 80 | flags=339 81 | window_num=0 82 | 83 | MA.Periods=111 84 | MA.AppliedPrice=Weighted 85 | Bands.Deviations=2.5 86 | Bands.Color=16436871 87 | Bands.LineWidth=3 88 | RepaintingMode=1 89 | MarkReversals=0 90 | AlertsOn=1 91 | 92 | 93 | 94 | color_0=16711935 95 | style_0=2 96 | color_1=16436871 97 | color_2=16436871 98 | color_3=16711680 99 | color_4=16711680 100 | color_5=16711935 101 | weight_5=2 102 | 103 | show_data=1 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /templates4/attic/HalfTrend.tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=USDCHF 3 | period=60 4 | digits=5 5 | 6 | leftpos=13564 7 | scale=2 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=0 17 | shift=1 18 | shift_size=50 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1304 24 | window_bottom=1032 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=100 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | show_data=0 74 | 75 | 76 | 77 | name=Custom Indicator 78 | 79 | name=HalfTrend 80 | flags=339 81 | window_num=0 82 | 83 | Periods=3 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /templates4/attic/JMA(50).tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=USDCHF 3 | period=60 4 | digits=5 5 | 6 | leftpos=13564 7 | scale=2 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=0 17 | shift=1 18 | shift_size=50 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1304 24 | window_bottom=1032 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=100 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | show_data=0 74 | 75 | 76 | 77 | name=Custom Indicator 78 | 79 | name=Jurik Moving Average 80 | flags=339 81 | window_num=0 82 | 83 | Periods=50 84 | 85 | 86 | show_data=1 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /templates4/attic/SATL.tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=USDCHF 3 | period=60 4 | digits=5 5 | 6 | leftpos=13564 7 | scale=2 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=0 17 | shift=1 18 | shift_size=50 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1304 24 | window_bottom=1032 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=100 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | show_data=0 74 | 75 | 76 | 77 | name=Custom Indicator 78 | 79 | name=.attic/SATL 80 | flags=339 81 | window_num=0 82 | 83 | Draw.Type=Dot 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /templates4/attic/SuperTrend.tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=USDCHF 3 | period=60 4 | digits=5 5 | 6 | leftpos=13564 7 | scale=2 8 | graph=1 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=0 17 | shift=1 18 | shift_size=50 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1304 24 | window_bottom=1032 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=100 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | show_data=0 74 | 75 | 76 | 77 | name=Custom Indicator 78 | 79 | name=SuperTrend 80 | flags=339 81 | window_num=0 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /templates4/attic/ZigZag(10) extension.tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=GBPUSD 3 | period=15 4 | digits=5 5 | 6 | leftpos=9229 7 | scale=2 8 | graph=0 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=1 17 | shift=1 18 | shift_size=10 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1292 24 | window_bottom=812 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=300 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | show_data=0 74 | 75 | 76 | 77 | name=Custom Indicator 78 | 79 | name=ZigZag 80 | flags=339 81 | window_num=0 82 | 83 | ZigZag.Periods=10 84 | ZigZag.Type=Line* | Semaphores 85 | ZigZag.Width=2 86 | ZigZag.Color=16711680 87 | 88 | Donchian.ShowChannel=1 89 | Donchian.Channel.UpperColor=16711680 90 | Donchian.Channel.LowerColor=255 91 | Donchian.ShowCrossings=off | first* | all 92 | Donchian.Crossing.Symbol=dot* | narrow-ring | ring | bold-ring 93 | 94 | 95 | style_2=2 96 | style_3=2 97 | weight_4=0 98 | weight_5=0 99 | color_6=4294967295 100 | color_7=4294967295 101 | show_data=1 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /templates4/attic/ZigZag(24).tpl: -------------------------------------------------------------------------------- 1 | 2 | symbol=GBPUSD 3 | period=30 4 | digits=5 5 | 6 | leftpos=9229 7 | scale=4 8 | graph=0 9 | fore=0 10 | grid=0 11 | volume=0 12 | ohlc=0 13 | askline=0 14 | days=0 15 | descriptions=1 16 | scroll=1 17 | shift=1 18 | shift_size=10 19 | 20 | fixed_pos=620 21 | window_left=0 22 | window_top=0 23 | window_right=1292 24 | window_bottom=812 25 | window_type=3 26 | 27 | background_color=16316664 28 | foreground_color=0 29 | barup_color=30720 30 | bardown_color=210 31 | bullcandle_color=30720 32 | bearcandle_color=210 33 | chartline_color=11119017 34 | volumes_color=30720 35 | grid_color=14474460 36 | askline_color=11823615 37 | stops_color=17919 38 | 39 | 40 | height=300 41 | 42 | 43 | name=main 44 | 45 | 46 | 47 | name=Custom Indicator 48 | 49 | name=Grid 50 | flags=347 51 | window_num=0 52 | 53 | show_data=0 54 | 55 | 56 | 57 | name=Custom Indicator 58 | 59 | name=ChartInfos 60 | flags=347 61 | window_num=0 62 | 63 | show_data=0 64 | 65 | 66 | 67 | name=Custom Indicator 68 | 69 | name=SuperBars 70 | flags=339 71 | window_num=0 72 | 73 | show_data=0 74 | 75 | 76 | 77 | name=Custom Indicator 78 | 79 | name=Inside Bars 80 | flags=339 81 | window_num=0 82 | 83 | Timeframe=H1 84 | NumberOfInsideBars=3 85 | 86 | 87 | shift_0=0 88 | draw_0=0 89 | color_0=0 90 | style_0=0 91 | weight_0=0 92 | period_flags=3 93 | show_data=0 94 | 95 | 96 | 97 | name=Custom Indicator 98 | 99 | name=ZigZag 100 | flags=339 101 | window_num=0 102 | 103 | ZigZag.Periods=24 104 | ZigZag.Type=Line* | Semaphores 105 | ZigZag.Width=2 106 | Donchian.ShowChannel=1 107 | Donchian.ShowCrossings=off | first* | all 108 | Donchian.Crossing.Symbol=dot* | narrow-ring | ring | bold-ring 109 | Signal.onReversal=1 110 | Signal.onBreakout=1 111 | 112 | 113 | style_2=2 114 | style_3=2 115 | color_6=4294967295 116 | color_7=4294967295 117 | show_data=1 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /templates5/.gitkeep: -------------------------------------------------------------------------------- 1 | /scripts/ 2 | --------------------------------------------------------------------------------