├── Dockerfile ├── MT5Resources ├── Experts │ ├── Advisors │ │ ├── ExpertMACD.ex5 │ │ ├── ExpertMACD.mq5 │ │ ├── ExpertMAMA.ex5 │ │ ├── ExpertMAMA.mq5 │ │ ├── ExpertMAPSAR.ex5 │ │ ├── ExpertMAPSAR.mq5 │ │ ├── ExpertMAPSARSizeOptimized.ex5 │ │ └── ExpertMAPSARSizeOptimized.mq5 │ ├── Examples │ │ ├── ChartInChart │ │ │ ├── ChartInChart.ex5 │ │ │ └── ChartInChart.mq5 │ │ ├── Controls │ │ │ ├── Controls.ex5 │ │ │ ├── Controls.mq5 │ │ │ └── ControlsDialog.mqh │ │ ├── Correlation Matrix 3D │ │ │ ├── Correlation Matrix 3D.ex5 │ │ │ ├── Correlation Matrix 3D.mq5 │ │ │ └── Correlation Matrix 3D.mqproj │ │ ├── MACD │ │ │ ├── MACD Sample.ex5 │ │ │ └── MACD Sample.mq5 │ │ ├── Math 3D Morpher │ │ │ ├── Functions.mqh │ │ │ ├── Math 3D Morpher.ex5 │ │ │ ├── Math 3D Morpher.mq5 │ │ │ ├── Math 3D Morpher.mqproj │ │ │ └── Textures │ │ │ │ └── checker.bmp │ │ ├── Math 3D │ │ │ ├── Functions.mqh │ │ │ ├── Math 3D.ex5 │ │ │ ├── Math 3D.ico │ │ │ ├── Math 3D.mq5 │ │ │ ├── Math 3D.mqproj │ │ │ └── Sets │ │ │ │ ├── Chomolungma.set │ │ │ │ ├── ClimberDream.set │ │ │ │ ├── DoubleScrew.set │ │ │ │ ├── Granite.set │ │ │ │ ├── Hedgehog.set │ │ │ │ ├── Hill.set │ │ │ │ ├── Josephine.set │ │ │ │ ├── MultyExtremalScrew.set │ │ │ │ ├── Screw.set │ │ │ │ ├── Sink.set │ │ │ │ ├── Skin.set │ │ │ │ └── Trapfall.set │ │ └── Moving Average │ │ │ ├── Moving Average.ex5 │ │ │ └── Moving Average.mq5 │ ├── expert_zmq.ex5 │ └── expert_zmq.mq5 ├── Include │ ├── Arrays │ │ ├── Array.mqh │ │ ├── ArrayChar.mqh │ │ ├── ArrayDouble.mqh │ │ ├── ArrayFloat.mqh │ │ ├── ArrayInt.mqh │ │ ├── ArrayLong.mqh │ │ ├── ArrayObj.mqh │ │ ├── ArrayShort.mqh │ │ ├── ArrayString.mqh │ │ ├── List.mqh │ │ ├── Tree.mqh │ │ └── TreeNode.mqh │ ├── Canvas │ │ ├── Canvas.mqh │ │ ├── Canvas3D.mqh │ │ ├── Charts │ │ │ ├── ChartCanvas.mqh │ │ │ ├── HistogramChart.mqh │ │ │ ├── LineChart.mqh │ │ │ └── PieChart.mqh │ │ ├── DX │ │ │ ├── DXBox.mqh │ │ │ ├── DXBuffers.mqh │ │ │ ├── DXData.mqh │ │ │ ├── DXDispatcher.mqh │ │ │ ├── DXHandle.mqh │ │ │ ├── DXInput.mqh │ │ │ ├── DXMath.mqh │ │ │ ├── DXMesh.mqh │ │ │ ├── DXObject.mqh │ │ │ ├── DXObjectBase.mqh │ │ │ ├── DXShader.mqh │ │ │ ├── DXSurface.mqh │ │ │ ├── DXTexture.mqh │ │ │ ├── DXUtils.mqh │ │ │ └── Shaders │ │ │ │ ├── DefaultShaderPixel.hlsl │ │ │ │ └── DefaultShaderVertex.hlsl │ │ └── FlameCanvas.mqh │ ├── ChartObjects │ │ ├── ChartObject.mqh │ │ ├── ChartObjectPanel.mqh │ │ ├── ChartObjectSubChart.mqh │ │ ├── ChartObjectsArrows.mqh │ │ ├── ChartObjectsBmpControls.mqh │ │ ├── ChartObjectsChannels.mqh │ │ ├── ChartObjectsElliott.mqh │ │ ├── ChartObjectsFibo.mqh │ │ ├── ChartObjectsGann.mqh │ │ ├── ChartObjectsLines.mqh │ │ ├── ChartObjectsShapes.mqh │ │ └── ChartObjectsTxtControls.mqh │ ├── Charts │ │ └── Chart.mqh │ ├── Controls │ │ ├── BmpButton.mqh │ │ ├── Button.mqh │ │ ├── CheckBox.mqh │ │ ├── CheckGroup.mqh │ │ ├── ComboBox.mqh │ │ ├── DateDropList.mqh │ │ ├── DatePicker.mqh │ │ ├── Defines.mqh │ │ ├── Dialog.mqh │ │ ├── Edit.mqh │ │ ├── Label.mqh │ │ ├── ListView.mqh │ │ ├── Panel.mqh │ │ ├── Picture.mqh │ │ ├── RadioButton.mqh │ │ ├── RadioGroup.mqh │ │ ├── Rect.mqh │ │ ├── Scrolls.mqh │ │ ├── SpinEdit.mqh │ │ ├── Wnd.mqh │ │ ├── WndClient.mqh │ │ ├── WndContainer.mqh │ │ ├── WndObj.mqh │ │ └── res │ │ │ ├── CheckBoxOff.bmp │ │ │ ├── CheckBoxOn.bmp │ │ │ ├── Close.bmp │ │ │ ├── DateDropOff.bmp │ │ │ ├── DateDropOn.bmp │ │ │ ├── Down.bmp │ │ │ ├── DownTransp.bmp │ │ │ ├── DropOff.bmp │ │ │ ├── DropOn.bmp │ │ │ ├── Left.bmp │ │ │ ├── LeftTransp.bmp │ │ │ ├── RadioButtonOff.bmp │ │ │ ├── RadioButtonOn.bmp │ │ │ ├── Restore.bmp │ │ │ ├── Right.bmp │ │ │ ├── RightTransp.bmp │ │ │ ├── SpinDec.bmp │ │ │ ├── SpinInc.bmp │ │ │ ├── ThumbHor.bmp │ │ │ ├── ThumbVert.bmp │ │ │ ├── Turn.bmp │ │ │ ├── Up.bmp │ │ │ └── UpTransp.bmp │ ├── Expert │ │ ├── Expert.mqh │ │ ├── ExpertBase.mqh │ │ ├── ExpertMoney.mqh │ │ ├── ExpertSignal.mqh │ │ ├── ExpertTrade.mqh │ │ ├── ExpertTrailing.mqh │ │ ├── Money │ │ │ ├── MoneyFixedLot.mqh │ │ │ ├── MoneyFixedMargin.mqh │ │ │ ├── MoneyFixedRisk.mqh │ │ │ ├── MoneyNone.mqh │ │ │ └── MoneySizeOptimized.mqh │ │ ├── Signal │ │ │ ├── SignalAC.mqh │ │ │ ├── SignalAMA.mqh │ │ │ ├── SignalAO.mqh │ │ │ ├── SignalBearsPower.mqh │ │ │ ├── SignalBullsPower.mqh │ │ │ ├── SignalCCI.mqh │ │ │ ├── SignalDEMA.mqh │ │ │ ├── SignalDeMarker.mqh │ │ │ ├── SignalEnvelopes.mqh │ │ │ ├── SignalFrAMA.mqh │ │ │ ├── SignalITF.mqh │ │ │ ├── SignalMA.mqh │ │ │ ├── SignalMACD.mqh │ │ │ ├── SignalRSI.mqh │ │ │ ├── SignalRVI.mqh │ │ │ ├── SignalSAR.mqh │ │ │ ├── SignalStoch.mqh │ │ │ ├── SignalTEMA.mqh │ │ │ ├── SignalTRIX.mqh │ │ │ └── SignalWPR.mqh │ │ └── Trailing │ │ │ ├── TrailingFixedPips.mqh │ │ │ ├── TrailingMA.mqh │ │ │ ├── TrailingNone.mqh │ │ │ └── TrailingParabolicSAR.mqh │ ├── Files │ │ ├── File.mqh │ │ ├── FileBMP.mqh │ │ ├── FileBin.mqh │ │ ├── FilePipe.mqh │ │ └── FileTxt.mqh │ ├── Generic │ │ ├── ArrayList.mqh │ │ ├── HashMap.mqh │ │ ├── HashSet.mqh │ │ ├── Interfaces │ │ │ ├── ICollection.mqh │ │ │ ├── IComparable.mqh │ │ │ ├── IComparer.mqh │ │ │ ├── IEqualityComparable.mqh │ │ │ ├── IEqualityComparer.mqh │ │ │ ├── IList.mqh │ │ │ ├── IMap.mqh │ │ │ └── ISet.mqh │ │ ├── Internal │ │ │ ├── ArrayFunction.mqh │ │ │ ├── CompareFunction.mqh │ │ │ ├── DefaultComparer.mqh │ │ │ ├── DefaultEqualityComparer.mqh │ │ │ ├── EqualFunction.mqh │ │ │ ├── HashFunction.mqh │ │ │ ├── Introsort.mqh │ │ │ └── PrimeGenerator.mqh │ │ ├── LinkedList.mqh │ │ ├── Queue.mqh │ │ ├── RedBlackTree.mqh │ │ ├── SortedMap.mqh │ │ ├── SortedSet.mqh │ │ └── Stack.mqh │ ├── Graphics │ │ ├── Axis.mqh │ │ ├── ColorGenerator.mqh │ │ ├── Curve.mqh │ │ └── Graphic.mqh │ ├── Indicators │ │ ├── BillWilliams.mqh │ │ ├── Custom.mqh │ │ ├── Indicator.mqh │ │ ├── Indicators.mqh │ │ ├── Oscilators.mqh │ │ ├── Series.mqh │ │ ├── TimeSeries.mqh │ │ ├── Trend.mqh │ │ └── Volumes.mqh │ ├── Math │ │ ├── Alglib │ │ │ ├── alglib.mqh │ │ │ ├── alglibinternal.mqh │ │ │ ├── alglibmisc.mqh │ │ │ ├── ap.mqh │ │ │ ├── arrayresize.mqh │ │ │ ├── bitconvert.mqh │ │ │ ├── complex.mqh │ │ │ ├── dataanalysis.mqh │ │ │ ├── delegatefunctions.mqh │ │ │ ├── diffequations.mqh │ │ │ ├── fasttransforms.mqh │ │ │ ├── integration.mqh │ │ │ ├── interpolation.mqh │ │ │ ├── linalg.mqh │ │ │ ├── matrix.mqh │ │ │ ├── optimization.mqh │ │ │ ├── solvers.mqh │ │ │ ├── specialfunctions.mqh │ │ │ └── statistics.mqh │ │ ├── Fuzzy │ │ │ ├── dictionary.mqh │ │ │ ├── fuzzyrule.mqh │ │ │ ├── fuzzyterm.mqh │ │ │ ├── fuzzyvariable.mqh │ │ │ ├── genericfuzzysystem.mqh │ │ │ ├── helper.mqh │ │ │ ├── inferencemethod.mqh │ │ │ ├── mamdanifuzzysystem.mqh │ │ │ ├── membershipfunction.mqh │ │ │ ├── ruleparser.mqh │ │ │ ├── sugenofuzzysystem.mqh │ │ │ └── sugenovariable.mqh │ │ └── Stat │ │ │ ├── Beta.mqh │ │ │ ├── Binomial.mqh │ │ │ ├── Cauchy.mqh │ │ │ ├── ChiSquare.mqh │ │ │ ├── Exponential.mqh │ │ │ ├── F.mqh │ │ │ ├── Gamma.mqh │ │ │ ├── Geometric.mqh │ │ │ ├── Hypergeometric.mqh │ │ │ ├── Logistic.mqh │ │ │ ├── Lognormal.mqh │ │ │ ├── Math.mqh │ │ │ ├── NegativeBinomial.mqh │ │ │ ├── NoncentralBeta.mqh │ │ │ ├── NoncentralChiSquare.mqh │ │ │ ├── NoncentralF.mqh │ │ │ ├── NoncentralT.mqh │ │ │ ├── Normal.mqh │ │ │ ├── Poisson.mqh │ │ │ ├── Stat.mqh │ │ │ ├── T.mqh │ │ │ ├── Uniform.mqh │ │ │ └── Weibull.mqh │ ├── MovingAverages.mqh │ ├── Mql │ │ └── Lang │ │ │ ├── Error.mqh │ │ │ ├── GlobalVariable.mqh │ │ │ ├── Mql.mqh │ │ │ └── Native.mqh │ ├── Object.mqh │ ├── OpenCL │ │ └── OpenCL.mqh │ ├── StdLibErr.mqh │ ├── StringToEnumInt.mqh │ ├── Strings │ │ └── String.mqh │ ├── Tools │ │ └── DateTime.mqh │ ├── Trade │ │ ├── AccountInfo.mqh │ │ ├── DealInfo.mqh │ │ ├── HistoryOrderInfo.mqh │ │ ├── OrderInfo.mqh │ │ ├── PositionInfo.mqh │ │ ├── SymbolInfo.mqh │ │ ├── TerminalInfo.mqh │ │ └── Trade.mqh │ ├── VirtualKeys.mqh │ ├── WinAPI │ │ ├── errhandlingapi.mqh │ │ ├── fileapi.mqh │ │ ├── handleapi.mqh │ │ ├── libloaderapi.mqh │ │ ├── memoryapi.mqh │ │ ├── processenv.mqh │ │ ├── processthreadsapi.mqh │ │ ├── securitybaseapi.mqh │ │ ├── sysinfoapi.mqh │ │ ├── winapi.mqh │ │ ├── winbase.mqh │ │ ├── windef.mqh │ │ ├── wingdi.mqh │ │ ├── winnt.mqh │ │ ├── winreg.mqh │ │ └── winuser.mqh │ ├── Zmq │ │ ├── AtomicCounter.mqh │ │ ├── Context.mqh │ │ ├── Errno.mqh │ │ ├── Socket.mqh │ │ ├── SocketOptions.mqh │ │ ├── Z85.mqh │ │ ├── Zmq.mqh │ │ └── ZmqMsg.mqh │ ├── controlerrors.mqh │ ├── ejtraderMT │ │ ├── Broker.mqh │ │ ├── Calendar.mqh │ │ ├── ChartControl.mqh │ │ ├── Event.mqh │ │ ├── HistoryInfo.mqh │ │ ├── Search.code-search │ │ ├── StartIndicator.mqh │ │ └── String.mqh │ └── json.mqh └── Scripts │ ├── Examples │ ├── AccountInfo │ │ ├── AccountInfoSample.ex5 │ │ ├── AccountInfoSample.mq5 │ │ └── AccountInfoSampleInit.mqh │ ├── ArrayDouble │ │ ├── ArrayDoubleSample.ex5 │ │ └── ArrayDoubleSample.mq5 │ ├── Canvas │ │ ├── CanvasSample.ex5 │ │ ├── CanvasSample.mq5 │ │ └── Charts │ │ │ ├── HistogramChartSample.ex5 │ │ │ ├── HistogramChartSample.mq5 │ │ │ ├── LineChartSample.ex5 │ │ │ ├── LineChartSample.mq5 │ │ │ ├── PieChartSample.ex5 │ │ │ └── PieChartSample.mq5 │ ├── ObjectChart │ │ ├── ChartSampleInit.mqh │ │ ├── ObjChartSample.ex5 │ │ └── ObjChartSample.mq5 │ ├── ObjectSphere │ │ ├── Sphere.mqh │ │ ├── SphereSample.ex5 │ │ └── SphereSample.mq5 │ ├── OpenCL │ │ ├── Double │ │ │ ├── BitonicSort.ex5 │ │ │ ├── BitonicSort.mq5 │ │ │ ├── FFT.ex5 │ │ │ ├── FFT.mq5 │ │ │ ├── Kernels │ │ │ │ ├── bitonicsort.cl │ │ │ │ ├── fft.cl │ │ │ │ ├── matrixmult.cl │ │ │ │ └── wavelet.cl │ │ │ ├── MatrixMult.ex5 │ │ │ ├── MatrixMult.mq5 │ │ │ ├── Wavelet.ex5 │ │ │ └── Wavelet.mq5 │ │ ├── Float │ │ │ ├── BitonicSort.ex5 │ │ │ ├── BitonicSort.mq5 │ │ │ ├── FFT.ex5 │ │ │ ├── FFT.mq5 │ │ │ ├── Kernels │ │ │ │ ├── bitonicsort.cl │ │ │ │ ├── fft.cl │ │ │ │ ├── matrixmult.cl │ │ │ │ └── wavelet.cl │ │ │ ├── MatrixMult.ex5 │ │ │ ├── MatrixMult.mq5 │ │ │ ├── Wavelet.ex5 │ │ │ └── Wavelet.mq5 │ │ └── Seascape │ │ │ ├── Seascape.cl │ │ │ ├── Seascape.ex5 │ │ │ ├── Seascape.mq5 │ │ │ └── Seascape.mqproj │ ├── OrderInfo │ │ ├── OrderInfoSample.ex5 │ │ ├── OrderInfoSample.mq5 │ │ └── OrderInfoSampleInit.mqh │ ├── PositionInfo │ │ ├── PositionInfoSample.ex5 │ │ ├── PositionInfoSample.mq5 │ │ └── PositionInfoSampleInit.mqh │ ├── Remnant 3D │ │ ├── Remnant 3D.ex5 │ │ ├── Remnant 3D.mq5 │ │ ├── Remnant 3D.mqproj │ │ └── Shaders │ │ │ ├── pixel.hlsl │ │ │ └── vertex.hlsl │ └── SymbolInfo │ │ ├── SymbolInfoSample.ex5 │ │ ├── SymbolInfoSample.mq5 │ │ └── SymbolInfoSampleInit.mqh │ ├── Test │ └── TestZmq.mq4 │ ├── UnitTests │ ├── Alglib │ │ ├── TestClasses.mq5 │ │ ├── TestClasses.mqh │ │ ├── TestInterfaces.mq5 │ │ └── TestInterfaces.mqh │ ├── Fuzzy │ │ └── TestFuzzy.mq5 │ ├── Generic │ │ ├── TestArrayList.mq5 │ │ ├── TestHashMap.mq5 │ │ ├── TestHashSet.mq5 │ │ ├── TestLinkedList.mq5 │ │ ├── TestQueue.mq5 │ │ ├── TestRedBlackTree.mq5 │ │ ├── TestSortedMap.mq5 │ │ ├── TestSortedSet.mq5 │ │ └── TestStack.mq5 │ └── Stat │ │ ├── TestStat.mq5 │ │ ├── TestStatBenchmark.mq5 │ │ └── TestStatPrecision.mq5 │ └── ZeroMQGuideExamples │ ├── Chapter1 │ ├── HelloWorldClient.ex5 │ ├── HelloWorldClient.mq5 │ ├── HelloWorldServer.mq4 │ ├── TaskEvent.mq4 │ ├── TaskSink.mq4 │ ├── TaskWorker.mq4 │ ├── VersionReporting.mq4 │ ├── WeatherUpdateClient.mq4 │ └── WeatherUpdateServer.mq4 │ ├── Chapter2 │ ├── MSPoller.mq4 │ ├── RRBroker.mq4 │ ├── RRClient.mq4 │ ├── RRWorker.mq4 │ └── WUProxy.mq4 │ └── Chapter3 │ ├── RTReqBroker.mq4 │ └── RTReqWorker.mq4 ├── Metatrader └── info_mt5 ├── README.md ├── assets ├── fonts.conf ├── openbox │ ├── mayday │ │ ├── mayday-arc-dark │ │ │ └── openbox-3 │ │ │ │ ├── bullet.xbm │ │ │ │ ├── close.xbm │ │ │ │ ├── desk.xbm │ │ │ │ ├── iconify.xbm │ │ │ │ ├── max.xbm │ │ │ │ ├── max_toggled.xbm │ │ │ │ ├── shade.xbm │ │ │ │ └── themerc │ │ ├── mayday-arc │ │ │ └── openbox-3 │ │ │ │ ├── bullet.xbm │ │ │ │ ├── close.xbm │ │ │ │ ├── desk.xbm │ │ │ │ ├── iconify.xbm │ │ │ │ ├── max.xbm │ │ │ │ ├── max_toggled.xbm │ │ │ │ ├── shade.xbm │ │ │ │ └── themerc │ │ ├── mayday-grey │ │ │ └── openbox-3 │ │ │ │ ├── bullet.xbm │ │ │ │ ├── close-backup.xbm │ │ │ │ ├── close.xbm │ │ │ │ ├── desk.xbm │ │ │ │ ├── iconify.xbm │ │ │ │ ├── max.xbm │ │ │ │ ├── max_toggled.xbm │ │ │ │ ├── shade.xbm │ │ │ │ └── themerc │ │ ├── mayday-plane │ │ │ └── openbox-3 │ │ │ │ ├── bullet.xbm │ │ │ │ ├── close.xbm │ │ │ │ ├── desk.xbm │ │ │ │ ├── iconify.xbm │ │ │ │ ├── max.xbm │ │ │ │ ├── max_toggled.xbm │ │ │ │ ├── shade.xbm │ │ │ │ └── themerc │ │ └── thesis │ │ │ └── openbox-3 │ │ │ ├── bullet.xbm │ │ │ ├── close.xbm │ │ │ ├── desk.xbm │ │ │ ├── iconify.xbm │ │ │ ├── max.xbm │ │ │ ├── shade.xbm │ │ │ └── themerc │ ├── menu.xml │ └── rc.xml ├── slim │ ├── alpinelinux │ │ ├── background.png │ │ ├── panel.png │ │ └── slim.theme │ └── slim.conf ├── start.sh ├── supervisord.conf ├── urxvt │ └── perl │ │ ├── keyboard-select │ │ └── resize-font ├── x11vnc-session.sh ├── xinit │ ├── Xresources │ └── xinitrc.d │ │ └── 00-terminal-prompt ├── xorg.conf └── xorg.conf.d │ └── 00-nopo ├── docker-compose.yml ├── docker_executable ├── images ├── attach.png ├── init.png ├── mt5.png ├── options.png └── vnc.png ├── pyzmq.tar └── st ├── FAQ ├── LEGACY ├── LICENSE ├── Makefile ├── README.md ├── TODO ├── arg.h ├── config.def.h ├── config.mk ├── patches ├── st-clipboard-20160727-308bfbf.diff ├── st-no_bold_colors-20160727-308bfbf.diff ├── st-scrollback-20170104-c63a87c.diff ├── st-scrollback-mouse-20161020-6e79e83.diff ├── st-solarized-both-20160727-308bfbf.diff ├── st-vertcenter-20160819-023225e.diff └── transparency.diff ├── st.1 ├── st.c └── st.info /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.15 AS st-builder 2 | 3 | RUN apk add --no-cache make gcc git freetype-dev \ 4 | fontconfig-dev musl-dev xproto libx11-dev \ 5 | libxft-dev libxext-dev 6 | COPY ./st /work 7 | WORKDIR /work 8 | RUN make 9 | 10 | FROM alpine:3.15 AS xdummy-builder 11 | 12 | RUN apk add --no-cache make gcc freetype-dev \ 13 | fontconfig-dev musl-dev xproto libx11-dev \ 14 | libxft-dev libxext-dev avahi-libs libcrypto3 libssl3 libvncserver libx11 libxdamage libxext libxfixes libxi libxinerama libxrandr libxtst musl 15 | RUN apk add --no-cache linux-headers 16 | RUN apk add x11vnc 17 | RUN Xdummy -install 18 | 19 | # ---------------------------------------------------------------------------- 20 | 21 | FROM pyzmq:dev 22 | 23 | USER root 24 | ENV WINEPREFIX=/root/.wine 25 | ENV WINEARCH=win64 26 | ENV DISPLAY :0 27 | ENV USER=root 28 | ENV PASSWORD=root 29 | 30 | 31 | # Basic init and admin tools 32 | RUN apk --no-cache add supervisor sudo wget \ 33 | && echo "$USER:$PASSWORD" | /usr/sbin/chpasswd \ 34 | && rm -rf /apk /tmp/* /var/cache/apk/* 35 | 36 | # Install X11 server and dummy device 37 | RUN apk add --no-cache xorg-server xf86-video-dummy \ 38 | && apk add libressl3.1-libcrypto --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/main/ \ 39 | && apk add libressl3.1-libssl --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/main/ \ 40 | && apk add x11vnc --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community/ \ 41 | && rm -rf /apk /tmp/* /var/cache/apk/* 42 | COPY --from=xdummy-builder /usr/bin/Xdummy.so /usr/bin/Xdummy.so 43 | COPY assets/xorg.conf /etc/X11/xorg.conf 44 | COPY assets/xorg.conf.d /etc/X11/xorg.conf.d 45 | 46 | # Configure init 47 | COPY assets/supervisord.conf /etc/supervisord.conf 48 | 49 | # Openbox window manager 50 | RUN apk --no-cache add openbox \ 51 | && rm -rf /apk /tmp/* /var/cache/apk/* 52 | COPY assets/openbox/mayday/mayday-arc /usr/share/themes/mayday-arc 53 | COPY assets/openbox/mayday/mayday-arc-dark /usr/share/themes/mayday-arc-dark 54 | COPY assets/openbox/mayday/mayday-grey /usr/share/themes/mayday-grey 55 | COPY assets/openbox/mayday/mayday-plane /usr/share/themes/mayday-plane 56 | COPY assets/openbox/mayday/thesis /usr/share/themes/thesis 57 | COPY assets/openbox/rc.xml /etc/xdg/openbox/rc.xml 58 | COPY assets/openbox/menu.xml /etc/xdg/openbox/menu.xml 59 | COPY Metatrader /root/Metatrader 60 | # Login Manager 61 | RUN apk --no-cache add slim consolekit \ 62 | && rm -rf /apk /tmp/* /var/cache/apk/* 63 | RUN /usr/bin/dbus-uuidgen --ensure=/etc/machine-id 64 | COPY assets/slim/slim.conf /etc/slim.conf 65 | COPY assets/slim/alpinelinux /usr/share/slim/themes/alpinelinux 66 | 67 | # A decent system font 68 | RUN apk add --no-cache font-noto \ 69 | && rm -rf /apk /tmp/* /var/cache/apk/* 70 | COPY assets/fonts.conf /etc/fonts/fonts.conf 71 | 72 | 73 | 74 | # st as terminal 75 | RUN apk add --no-cache freetype fontconfig xproto libx11 libxft libxext ncurses \ 76 | && rm -rf /apk /tmp/* /var/cache/apk/* 77 | COPY --from=st-builder /work/st /usr/bin/st 78 | COPY --from=st-builder /work/st.info /etc/st/st.info 79 | RUN tic -sx /etc/st/st.info 80 | 81 | # Some other resources 82 | RUN apk add --no-cache xset \ 83 | && rm -rf /apk /tmp/* /var/cache/apk/* 84 | COPY assets/xinit/Xresources /etc/X11/Xresources 85 | COPY assets/xinit/xinitrc.d /etc/X11/xinit/xinitrc.d 86 | 87 | COPY assets/x11vnc-session.sh /root/x11vnc-session.sh 88 | COPY assets/start.sh /root/start.sh 89 | 90 | 91 | RUN apk update && apk add samba-winbind wine && ln -s /usr/bin/wine64 /usr/bin/wine 92 | 93 | 94 | WORKDIR /$HOME/ 95 | EXPOSE 5900 15555 15556 15557 15558 96 | CMD ["/usr/bin/supervisord","-c","/etc/supervisord.conf"] 97 | 98 | 99 | -------------------------------------------------------------------------------- /MT5Resources/Experts/Advisors/ExpertMACD.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Advisors/ExpertMACD.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Advisors/ExpertMAMA.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Advisors/ExpertMAMA.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Advisors/ExpertMAPSAR.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Advisors/ExpertMAPSAR.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Advisors/ExpertMAPSARSizeOptimized.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Advisors/ExpertMAPSARSizeOptimized.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/ChartInChart/ChartInChart.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/ChartInChart/ChartInChart.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/ChartInChart/ChartInChart.mq5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/ChartInChart/ChartInChart.mq5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Controls/Controls.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Controls/Controls.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Controls/Controls.mq5: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| Controls.mq5 | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2000-2023, MetaQuotes Ltd." 7 | #property link "https://www.mql5.com" 8 | #property version "1.00" 9 | #include "ControlsDialog.mqh" 10 | //+------------------------------------------------------------------+ 11 | //| Global Variables | 12 | //+------------------------------------------------------------------+ 13 | CControlsDialog ExtDialog; 14 | //+------------------------------------------------------------------+ 15 | //| Expert initialization function | 16 | //+------------------------------------------------------------------+ 17 | int OnInit() 18 | { 19 | //--- create application dialog 20 | if(!ExtDialog.Create(0,"Controls",0,20,20,360,324)) 21 | return(INIT_FAILED); 22 | //--- run application 23 | ExtDialog.Run(); 24 | //--- succeed 25 | return(INIT_SUCCEEDED); 26 | } 27 | //+------------------------------------------------------------------+ 28 | //| Expert deinitialization function | 29 | //+------------------------------------------------------------------+ 30 | void OnDeinit(const int reason) 31 | { 32 | //--- destroy dialog 33 | ExtDialog.Destroy(reason); 34 | } 35 | //+------------------------------------------------------------------+ 36 | //| Expert chart event function | 37 | //+------------------------------------------------------------------+ 38 | void OnChartEvent(const int id, // event ID 39 | const long& lparam, // event parameter of the long type 40 | const double& dparam, // event parameter of the double type 41 | const string& sparam) // event parameter of the string type 42 | { 43 | ExtDialog.ChartEvent(id,lparam,dparam,sparam); 44 | } 45 | //+------------------------------------------------------------------+ 46 | -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Correlation Matrix 3D/Correlation Matrix 3D.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Correlation Matrix 3D/Correlation Matrix 3D.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Correlation Matrix 3D/Correlation Matrix 3D.mq5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Correlation Matrix 3D/Correlation Matrix 3D.mq5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Correlation Matrix 3D/Correlation Matrix 3D.mqproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Correlation Matrix 3D/Correlation Matrix 3D.mqproj -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/MACD/MACD Sample.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/MACD/MACD Sample.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D Morpher/Math 3D Morpher.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D Morpher/Math 3D Morpher.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D Morpher/Math 3D Morpher.mq5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D Morpher/Math 3D Morpher.mq5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D Morpher/Math 3D Morpher.mqproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D Morpher/Math 3D Morpher.mqproj -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D Morpher/Textures/checker.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D Morpher/Textures/checker.bmp -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Functions.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Functions.mqh -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Math 3D.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Math 3D.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Math 3D.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Math 3D.ico -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Math 3D.mq5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Math 3D.mq5 -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Math 3D.mqproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Math 3D.mqproj -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/Chomolungma.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/Chomolungma.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/ClimberDream.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/ClimberDream.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/DoubleScrew.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/DoubleScrew.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/Granite.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/Granite.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/Hedgehog.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/Hedgehog.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/Hill.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/Hill.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/Josephine.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/Josephine.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/MultyExtremalScrew.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/MultyExtremalScrew.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/Screw.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/Screw.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/Sink.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/Sink.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/Skin.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/Skin.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Math 3D/Sets/Trapfall.set: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Math 3D/Sets/Trapfall.set -------------------------------------------------------------------------------- /MT5Resources/Experts/Examples/Moving Average/Moving Average.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/Examples/Moving Average/Moving Average.ex5 -------------------------------------------------------------------------------- /MT5Resources/Experts/expert_zmq.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Experts/expert_zmq.ex5 -------------------------------------------------------------------------------- /MT5Resources/Include/Canvas/Canvas3D.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Canvas/Canvas3D.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Canvas/DX/DXBox.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| DXBox.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2000-2023, MetaQuotes Ltd." 7 | #property link "https://www.mql5.com" 8 | //--- 9 | #include "DXMesh.mqh" 10 | #include "DXMath.mqh" 11 | #include "DXUtils.mqh" 12 | //+------------------------------------------------------------------+ 13 | //| 3D Box object | 14 | //+------------------------------------------------------------------+ 15 | class CDXBox : public CDXMesh 16 | { 17 | public: 18 | CDXBox(); 19 | ~CDXBox(); 20 | //--- create bon in specified context 21 | bool Create(CDXDispatcher &dispatcher,CDXInput* buffer_scene,const DXVector3 &from,const DXVector3 &to); 22 | //--- update box 23 | bool Update(const DXVector3 &from,const DXVector3 &to); 24 | 25 | private: 26 | //--- 27 | void PrepareVertices(const DXVector3 &from,const DXVector3 &to); 28 | }; 29 | //+------------------------------------------------------------------+ 30 | //| Class constructor | 31 | //+------------------------------------------------------------------+ 32 | void CDXBox::CDXBox() : CDXMesh() 33 | { 34 | } 35 | //+------------------------------------------------------------------+ 36 | //| Destructor | 37 | //+------------------------------------------------------------------+ 38 | void CDXBox::~CDXBox(void) 39 | { 40 | } 41 | //+------------------------------------------------------------------+ 42 | //| Create box in specified context | 43 | //+------------------------------------------------------------------+ 44 | bool CDXBox::Create(CDXDispatcher &dispatcher,CDXInput* buffer_scene,const DXVector3 &from,const DXVector3 &to) 45 | { 46 | //--- release previous buffers 47 | Shutdown(); 48 | //--- 49 | DXVertex vertices[]; 50 | uint indices[]; 51 | //--- prepare box vertices and indices 52 | DXColor white=DXColor(1.0f,1.0f,1.0f,1.0f); 53 | if(!DXComputeBox(from,to,vertices,indices)) 54 | return(false); 55 | for(int i=0; i diffuse_tex : register(t0); 33 | //+------------------------------------------------------------------+ 34 | //| Texture sampler | 35 | //+------------------------------------------------------------------+ 36 | SamplerState diffuse_samp 37 | { 38 | Filter =MIN_MAG_MIP_LINEAR; 39 | AddressU=Wrap; 40 | AddressV=Wrap; 41 | }; 42 | //+------------------------------------------------------------------+ 43 | //| Pixel shader input type | 44 | //+------------------------------------------------------------------+ 45 | struct PSInput 46 | { 47 | float4 position : SV_POSITION; 48 | float4 camera : CAMERA; 49 | float4 normal : NORMAL; 50 | float2 tcoord : TEXCOORD; 51 | float4 color : COLOR; 52 | }; 53 | //+------------------------------------------------------------------+ 54 | //| Pixel shader entry point | 55 | //+------------------------------------------------------------------+ 56 | float4 PSMain(PSInput input) : SV_TARGET 57 | { 58 | float3 diffuse =saturate(-dot(light_direction.xyz,input.normal.xyz))*light_color.rgb*light_color.a; 59 | float3 ambient =ambient_color.rgb *ambient_color.a; 60 | float3 light =(diffuse+ambient)*diffuse_color.rgb*diffuse_color.a+emission_color.rgb*emission_color.a; 61 | float4 specular=float4(light_color.rgb*specular_color.rgb,pow(saturate(dot(reflect(normalize(light_direction.xyz),input.normal.xyz),normalize(input.camera.xyz))),specular_power)*light_color.a*specular_color.a); 62 | float4 clr=input.color; 63 | //--- use texture if it exist 64 | uint width,height; 65 | diffuse_tex.GetDimensions(width,height); 66 | if(width*height>0) 67 | clr*=diffuse_tex.Sample(diffuse_samp,frac(input.tcoord)); 68 | //--- combine light with colors 69 | return(lerp(float4(light*clr.rgb,clr.a),float4(specular.rgb,1.0),specular.a)); 70 | } 71 | //+------------------------------------------------------------------+ 72 | -------------------------------------------------------------------------------- /MT5Resources/Include/Canvas/DX/Shaders/DefaultShaderVertex.hlsl: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| Default Vertex Shader | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | 7 | //+------------------------------------------------------------------+ 8 | //| Inputs for whole scene | 9 | //+------------------------------------------------------------------+ 10 | cbuffer InputScene : register(b0) 11 | { 12 | matrix view; 13 | matrix projection; 14 | float4 light_direction; 15 | float4 light_color; 16 | float4 ambient_color; 17 | }; 18 | //+------------------------------------------------------------------+ 19 | //| Inputs for single object | 20 | //+------------------------------------------------------------------+ 21 | cbuffer InputObject : register(b1) 22 | { 23 | matrix transform; 24 | float4 diffuse_color; 25 | float4 emission_color; 26 | float4 specular_color; 27 | float specular_power; 28 | float dummy[3]; 29 | }; 30 | //+------------------------------------------------------------------+ 31 | //| Vertex shader input type | 32 | //+------------------------------------------------------------------+ 33 | struct VSInput 34 | { 35 | float4 position : POSITION; 36 | float4 normal : NORMAL; 37 | float2 tcoord : TEXCOORD; 38 | float4 color : COLOR; 39 | }; 40 | //+------------------------------------------------------------------+ 41 | //| Pixel shader input type | 42 | //+------------------------------------------------------------------+ 43 | struct PSInput 44 | { 45 | float4 position : SV_POSITION; 46 | float4 camera : CAMERA; 47 | float4 normal : NORMAL; 48 | float2 tcoord : TEXCOORD; 49 | float4 color : COLOR; 50 | }; 51 | //+------------------------------------------------------------------+ 52 | //| Vertex shader entry point | 53 | //+------------------------------------------------------------------+ 54 | PSInput VSMain(VSInput input) 55 | { 56 | PSInput output; 57 | //--- posiiton and camera direction 58 | output.position=mul(input .position,transform); 59 | output.position=mul(output.position,view); 60 | output.camera =-output.position; 61 | output.position=mul(output.position,projection); 62 | //--- transform normals 63 | output.normal = mul(input.normal, transform); 64 | output.normal = mul(output.normal, view); 65 | output.normal = normalize(output.normal); 66 | //--- color and texture coordinates 67 | output.tcoord =input.tcoord; 68 | output.color =input.color; 69 | //--- 70 | return(output); 71 | } 72 | //+------------------------------------------------------------------+ 73 | -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/BmpButton.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/BmpButton.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/Button.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/Button.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/Label.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| Label.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include "WndObj.mqh" 7 | #include 8 | //+------------------------------------------------------------------+ 9 | //| Class CLabel | 10 | //| Usage: control that is displayed by | 11 | //| the CChartObjectLabel object | 12 | //+------------------------------------------------------------------+ 13 | class CLabel : public CWndObj 14 | { 15 | private: 16 | CChartObjectLabel m_label; // chart object 17 | 18 | public: 19 | CLabel(void); 20 | ~CLabel(void); 21 | //--- create 22 | virtual bool Create(const long chart,const string name,const int subwin,const int x1,const int y1,const int x2,const int y2); 23 | 24 | protected: 25 | //--- handlers of object settings 26 | virtual bool OnSetText(void) { return(m_label.Description(m_text)); } 27 | virtual bool OnSetColor(void) { return(m_label.Color(m_color)); } 28 | virtual bool OnSetFont(void) { return(m_label.Font(m_font)); } 29 | virtual bool OnSetFontSize(void) { return(m_label.FontSize(m_font_size)); } 30 | //--- internal event handlers 31 | virtual bool OnCreate(void); 32 | virtual bool OnShow(void); 33 | virtual bool OnHide(void); 34 | virtual bool OnMove(void); 35 | }; 36 | //+------------------------------------------------------------------+ 37 | //| Constructor | 38 | //+------------------------------------------------------------------+ 39 | CLabel::CLabel(void) 40 | { 41 | m_color=CONTROLS_LABEL_COLOR; 42 | } 43 | //+------------------------------------------------------------------+ 44 | //| Destructor | 45 | //+------------------------------------------------------------------+ 46 | CLabel::~CLabel(void) 47 | { 48 | } 49 | //+------------------------------------------------------------------+ 50 | //| Create a control | 51 | //+------------------------------------------------------------------+ 52 | bool CLabel::Create(const long chart,const string name,const int subwin,const int x1,const int y1,const int x2,const int y2) 53 | { 54 | //--- call method of the parent class 55 | if(!CWndObj::Create(chart,name,subwin,x1,y1,x2,y2)) 56 | return(false); 57 | //--- create the chart object 58 | if(!m_label.Create(chart,name,subwin,x1,y1)) 59 | return(false); 60 | //--- call the settings handler 61 | return(OnChange()); 62 | } 63 | //+------------------------------------------------------------------+ 64 | //| Create object on chart | 65 | //+------------------------------------------------------------------+ 66 | bool CLabel::OnCreate(void) 67 | { 68 | //--- create the chart object by previously set parameters 69 | return(m_label.Create(m_chart_id,m_name,m_subwin,m_rect.left,m_rect.top)); 70 | } 71 | //+------------------------------------------------------------------+ 72 | //| Display object on chart | 73 | //+------------------------------------------------------------------+ 74 | bool CLabel::OnShow(void) 75 | { 76 | return(m_label.Timeframes(OBJ_ALL_PERIODS)); 77 | } 78 | //+------------------------------------------------------------------+ 79 | //| Hide object from chart | 80 | //+------------------------------------------------------------------+ 81 | bool CLabel::OnHide(void) 82 | { 83 | return(m_label.Timeframes(OBJ_NO_PERIODS)); 84 | } 85 | //+------------------------------------------------------------------+ 86 | //| Absolute movement of the chart object | 87 | //+------------------------------------------------------------------+ 88 | bool CLabel::OnMove(void) 89 | { 90 | //--- position the chart object 91 | return(m_label.X_Distance(m_rect.left) && m_label.Y_Distance(m_rect.top)); 92 | } 93 | //+------------------------------------------------------------------+ 94 | -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/ListView.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/ListView.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/RadioGroup.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/RadioGroup.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/Scrolls.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/Scrolls.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/CheckBoxOff.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/CheckBoxOff.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/CheckBoxOn.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/CheckBoxOn.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/Close.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/Close.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/DateDropOff.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/DateDropOff.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/DateDropOn.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/DateDropOn.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/Down.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/Down.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/DownTransp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/DownTransp.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/DropOff.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/DropOff.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/DropOn.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/DropOn.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/Left.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/Left.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/LeftTransp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/LeftTransp.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/RadioButtonOff.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/RadioButtonOff.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/RadioButtonOn.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/RadioButtonOn.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/Restore.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/Restore.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/Right.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/Right.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/RightTransp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/RightTransp.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/SpinDec.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/SpinDec.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/SpinInc.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/SpinInc.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/ThumbHor.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/ThumbHor.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/ThumbVert.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/ThumbVert.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/Turn.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/Turn.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/Up.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/Up.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Controls/res/UpTransp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Controls/res/UpTransp.bmp -------------------------------------------------------------------------------- /MT5Resources/Include/Expert/Expert.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Expert/Expert.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Expert/ExpertTrailing.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| ExpertTrailing.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include "ExpertBase.mqh" 7 | //+------------------------------------------------------------------+ 8 | //| Class CExpertTrailing. | 9 | //| Purpose: Base class traling stops. | 10 | //| Derives from class CExpertBase. | 11 | //+------------------------------------------------------------------+ 12 | class CExpertTrailing : public CExpertBase 13 | { 14 | public: 15 | CExpertTrailing(void); 16 | ~CExpertTrailing(void); 17 | //--- 18 | virtual bool CheckTrailingStopLong(CPositionInfo *position,double &sl,double &tp) { return(false); } 19 | virtual bool CheckTrailingStopShort(CPositionInfo *position,double &sl,double &tp) { return(false); } 20 | }; 21 | //+------------------------------------------------------------------+ 22 | //| Constructor | 23 | //+------------------------------------------------------------------+ 24 | CExpertTrailing::CExpertTrailing(void) 25 | { 26 | } 27 | //+------------------------------------------------------------------+ 28 | //| Destructor | 29 | //+------------------------------------------------------------------+ 30 | CExpertTrailing::~CExpertTrailing(void) 31 | { 32 | } 33 | //+------------------------------------------------------------------+ 34 | -------------------------------------------------------------------------------- /MT5Resources/Include/Expert/Money/MoneyFixedLot.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| MoneyFixedLot.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | // wizard description start 8 | //+------------------------------------------------------------------+ 9 | //| Description of the class | 10 | //| Title=Trading with fixed trade volume | 11 | //| Type=Money | 12 | //| Name=FixLot | 13 | //| Class=CMoneyFixedLot | 14 | //| Page= | 15 | //| Parameter=Percent,double,10.0,Percent | 16 | //| Parameter=Lots,double,0.1,Fixed volume | 17 | //+------------------------------------------------------------------+ 18 | // wizard description end 19 | //+------------------------------------------------------------------+ 20 | //| Class CMoneyFixedLot. | 21 | //| Purpose: Class of money management with fixed lot. | 22 | //| Derives from class CExpertMoney. | 23 | //+------------------------------------------------------------------+ 24 | class CMoneyFixedLot : public CExpertMoney 25 | { 26 | protected: 27 | //--- input parameters 28 | double m_lots; 29 | 30 | public: 31 | CMoneyFixedLot(void); 32 | ~CMoneyFixedLot(void); 33 | //--- 34 | void Lots(double lots) { m_lots=lots; } 35 | virtual bool ValidationSettings(void); 36 | //--- 37 | virtual double CheckOpenLong(double price,double sl) { return(m_lots); } 38 | virtual double CheckOpenShort(double price,double sl) { return(m_lots); } 39 | }; 40 | //+------------------------------------------------------------------+ 41 | //| Constructor | 42 | //+------------------------------------------------------------------+ 43 | void CMoneyFixedLot::CMoneyFixedLot(void) : m_lots(0.1) 44 | { 45 | } 46 | //+------------------------------------------------------------------+ 47 | //| Destructor | 48 | //+------------------------------------------------------------------+ 49 | void CMoneyFixedLot::~CMoneyFixedLot(void) 50 | { 51 | } 52 | //+------------------------------------------------------------------+ 53 | //| Validation settings protected data. | 54 | //+------------------------------------------------------------------+ 55 | bool CMoneyFixedLot::ValidationSettings(void) 56 | { 57 | if(!CExpertMoney::ValidationSettings()) 58 | return(false); 59 | //--- initial data checks 60 | if(m_lotsm_symbol.LotsMax()) 61 | { 62 | printf(__FUNCTION__+": lots amount must be in the range from %f to %f",m_symbol.LotsMin(),m_symbol.LotsMax()); 63 | return(false); 64 | } 65 | if(MathAbs(m_lots/m_symbol.LotsStep()-MathRound(m_lots/m_symbol.LotsStep()))>1.0E-10) 66 | { 67 | printf(__FUNCTION__+": lots amount is not corresponding with lot step %f",m_symbol.LotsStep()); 68 | return(false); 69 | } 70 | //--- ok 71 | return(true); 72 | } 73 | //+------------------------------------------------------------------+ 74 | -------------------------------------------------------------------------------- /MT5Resources/Include/Expert/Money/MoneyFixedMargin.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| MoneyFixedMargin.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | // wizard description start 8 | //+------------------------------------------------------------------+ 9 | //| Description of the class | 10 | //| Title=Trading with fixed margin | 11 | //| Type=Money | 12 | //| Name=FixMargin | 13 | //| Class=CMoneyFixedMargin | 14 | //| Page= | 15 | //| Parameter=Percent,double,10.0,Percentage of margin | 16 | //+------------------------------------------------------------------+ 17 | // wizard description end 18 | //+------------------------------------------------------------------+ 19 | //| Class CMoneyFixedMargin. | 20 | //| Purpose: Class of money management with fixed percent margin. | 21 | //| Derives from class CExpertMoney. | 22 | //+------------------------------------------------------------------+ 23 | class CMoneyFixedMargin : public CExpertMoney 24 | { 25 | public: 26 | CMoneyFixedMargin(void); 27 | ~CMoneyFixedMargin(void); 28 | //--- 29 | virtual double CheckOpenLong(double price,double sl); 30 | virtual double CheckOpenShort(double price,double sl); 31 | }; 32 | //+------------------------------------------------------------------+ 33 | //| Constructor | 34 | //+------------------------------------------------------------------+ 35 | void CMoneyFixedMargin::CMoneyFixedMargin(void) 36 | { 37 | } 38 | //+------------------------------------------------------------------+ 39 | //| Destructor | 40 | //+------------------------------------------------------------------+ 41 | void CMoneyFixedMargin::~CMoneyFixedMargin(void) 42 | { 43 | } 44 | //+------------------------------------------------------------------+ 45 | //| Getting lot size for open long position. | 46 | //+------------------------------------------------------------------+ 47 | double CMoneyFixedMargin::CheckOpenLong(double price,double sl) 48 | { 49 | if(m_symbol==NULL) 50 | return(0.0); 51 | //--- select lot size 52 | double lot; 53 | if(price==0.0) 54 | lot=m_account.MaxLotCheck(m_symbol.Name(),ORDER_TYPE_BUY,m_symbol.Ask(),m_percent); 55 | else 56 | lot=m_account.MaxLotCheck(m_symbol.Name(),ORDER_TYPE_BUY,price,m_percent); 57 | //--- return trading volume 58 | return(lot); 59 | } 60 | //+------------------------------------------------------------------+ 61 | //| Getting lot size for open short position. | 62 | //+------------------------------------------------------------------+ 63 | double CMoneyFixedMargin::CheckOpenShort(double price,double sl) 64 | { 65 | if(m_symbol==NULL) 66 | return(0.0); 67 | //--- select lot size 68 | double lot; 69 | if(price==0.0) 70 | lot=m_account.MaxLotCheck(m_symbol.Name(),ORDER_TYPE_SELL,m_symbol.Bid(),m_percent); 71 | else 72 | lot=m_account.MaxLotCheck(m_symbol.Name(),ORDER_TYPE_SELL,price,m_percent); 73 | //--- return trading volume 74 | return(lot); 75 | } 76 | //+------------------------------------------------------------------+ 77 | -------------------------------------------------------------------------------- /MT5Resources/Include/Expert/Money/MoneyNone.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| MoneyNone.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | // wizard description start 8 | //+------------------------------------------------------------------+ 9 | //| Description of the class | 10 | //| Title=Trading with minimal allowed trade volume | 11 | //| Type=Money | 12 | //| Name=MinLot | 13 | //| Class=CMoneyNone | 14 | //| Page= | 15 | //+------------------------------------------------------------------+ 16 | // wizard description end 17 | //+------------------------------------------------------------------+ 18 | //| Class CMoneyNone. | 19 | //| Appointment: Class no money managment. | 20 | //| Derives from class CExpertMoney. | 21 | //+------------------------------------------------------------------+ 22 | class CMoneyNone : public CExpertMoney 23 | { 24 | public: 25 | CMoneyNone(void); 26 | ~CMoneyNone(void); 27 | //--- 28 | virtual bool ValidationSettings(void); 29 | //--- 30 | virtual double CheckOpenLong(double price,double sl); 31 | virtual double CheckOpenShort(double price,double sl); 32 | }; 33 | //+------------------------------------------------------------------+ 34 | //| Constructor | 35 | //+------------------------------------------------------------------+ 36 | void CMoneyNone::CMoneyNone(void) 37 | { 38 | } 39 | //+------------------------------------------------------------------+ 40 | //| Destructor | 41 | //+------------------------------------------------------------------+ 42 | void CMoneyNone::~CMoneyNone(void) 43 | { 44 | } 45 | //+------------------------------------------------------------------+ 46 | //| Validation settings protected data. | 47 | //+------------------------------------------------------------------+ 48 | bool CMoneyNone::ValidationSettings(void) 49 | { 50 | Percent(100.0); 51 | //--- initial data checks 52 | if(!CExpertMoney::ValidationSettings()) 53 | return(false); 54 | //--- ok 55 | return(true); 56 | } 57 | //+------------------------------------------------------------------+ 58 | //| Getting lot size for open long position. | 59 | //+------------------------------------------------------------------+ 60 | double CMoneyNone::CheckOpenLong(double price,double sl) 61 | { 62 | return(m_symbol.LotsMin()); 63 | } 64 | //+------------------------------------------------------------------+ 65 | //| Getting lot size for open short position. | 66 | //+------------------------------------------------------------------+ 67 | double CMoneyNone::CheckOpenShort(double price,double sl) 68 | { 69 | return(m_symbol.LotsMin()); 70 | } 71 | //+------------------------------------------------------------------+ 72 | -------------------------------------------------------------------------------- /MT5Resources/Include/Expert/Trailing/TrailingNone.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| TrailingNone.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | // wizard description start 8 | //+------------------------------------------------------------------+ 9 | //| Description of the class | 10 | //| Title=Trailing Stop not used | 11 | //| Type=Trailing | 12 | //| Name=None | 13 | //| Class=CTrailingNone | 14 | //| Page= | 15 | //+------------------------------------------------------------------+ 16 | // wizard description end 17 | //+------------------------------------------------------------------+ 18 | //| Class CTrailingNone. | 19 | //| Appointment: Class no traling stops. | 20 | //| Derives from class CExpertTrailing. | 21 | //+------------------------------------------------------------------+ 22 | class CTrailingNone : public CExpertTrailing 23 | { 24 | public: 25 | CTrailingNone(void); 26 | ~CTrailingNone(void); 27 | }; 28 | //+------------------------------------------------------------------+ 29 | //| Constructor | 30 | //+------------------------------------------------------------------+ 31 | CTrailingNone::CTrailingNone(void) 32 | { 33 | } 34 | //+------------------------------------------------------------------+ 35 | //| Destructor | 36 | //+------------------------------------------------------------------+ 37 | CTrailingNone::~CTrailingNone(void) 38 | { 39 | } 40 | //+------------------------------------------------------------------+ 41 | -------------------------------------------------------------------------------- /MT5Resources/Include/Files/FileTxt.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| FileTxt.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include "File.mqh" 7 | //+------------------------------------------------------------------+ 8 | //| Class CFileTxt | 9 | //| Purpose: Class of operations with text files. | 10 | //| Derives from class CFile. | 11 | //+------------------------------------------------------------------+ 12 | class CFileTxt : public CFile 13 | { 14 | public: 15 | CFileTxt(void); 16 | ~CFileTxt(void); 17 | //--- methods for working with files 18 | int Open(const string file_name,const int open_flags); 19 | //--- methods to access data 20 | uint WriteString(const string value); 21 | string ReadString(void); 22 | }; 23 | //+------------------------------------------------------------------+ 24 | //| Constructor | 25 | //+------------------------------------------------------------------+ 26 | CFileTxt::CFileTxt(void) 27 | { 28 | } 29 | //+------------------------------------------------------------------+ 30 | //| Destructor | 31 | //+------------------------------------------------------------------+ 32 | CFileTxt::~CFileTxt(void) 33 | { 34 | } 35 | //+------------------------------------------------------------------+ 36 | //| Open the text file | 37 | //+------------------------------------------------------------------+ 38 | int CFileTxt::Open(const string file_name,const int open_flags) 39 | { 40 | return(CFile::Open(file_name,open_flags|FILE_TXT)); 41 | } 42 | //+------------------------------------------------------------------+ 43 | //| Writing string to file | 44 | //+------------------------------------------------------------------+ 45 | uint CFileTxt::WriteString(const string value) 46 | { 47 | //--- check handle 48 | if(m_handle!=INVALID_HANDLE) 49 | return(FileWriteString(m_handle,value)); 50 | //--- failure 51 | return(0); 52 | } 53 | //+------------------------------------------------------------------+ 54 | //| Reading string from file | 55 | //+------------------------------------------------------------------+ 56 | string CFileTxt::ReadString(void) 57 | { 58 | //--- check handle 59 | if(m_handle!=INVALID_HANDLE) 60 | return(FileReadString(m_handle)); 61 | //--- failure 62 | return(""); 63 | } 64 | //+------------------------------------------------------------------+ 65 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/ArrayList.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Generic/ArrayList.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Interfaces/ICollection.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| ICollection.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | //+------------------------------------------------------------------+ 7 | //| Interface ICollection. | 8 | //| Usage: Defines methods to manipulate generic collections. | 9 | //+------------------------------------------------------------------+ 10 | template 11 | interface ICollection 12 | { 13 | //--- methods of filling data 14 | bool Add(T value); 15 | //--- methods of access to protected data 16 | int Count(void); 17 | bool Contains(T item); 18 | //--- methods of copy data from collection 19 | int CopyTo(T &dst_array[],const int dst_start=0); 20 | //--- methods of cleaning and removing 21 | void Clear(void); 22 | bool Remove(T item); 23 | }; 24 | //+------------------------------------------------------------------+ 25 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Interfaces/IComparable.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| IComparable.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include "IEqualityComparable.mqh" 7 | //+------------------------------------------------------------------+ 8 | //| Interface IComparable. | 9 | //| Usage: Defines a generalized comparison method to create a | 10 | //| type-specific comparison method for ordering or sorting | 11 | //| instances. | 12 | //+------------------------------------------------------------------+ 13 | template 14 | interface IComparable: public IEqualityComparable 15 | { 16 | //--- method for determining compare 17 | int Compare(T value); 18 | }; 19 | //+------------------------------------------------------------------+ 20 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Interfaces/IComparer.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| IComparer.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | //+------------------------------------------------------------------+ 7 | //| Interface IComparer. | 8 | //| Usage: Defines a method that a type implements to compare two | 9 | //| values. | 10 | //+------------------------------------------------------------------+ 11 | template 12 | interface IComparer 13 | { 14 | //--- compares two values and returns a value indicating whether one is less than, equal to, or greater than the other 15 | int Compare(T x,T y); 16 | }; 17 | //+------------------------------------------------------------------+ 18 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Interfaces/IEqualityComparable.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| IEqualityComparable.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | //+------------------------------------------------------------------+ 7 | //| Interface IEqualityComparable. | 8 | //| Usage: Defines a generalized method to create a type-specific | 9 | //| method for determining equality of instances. | 10 | //+------------------------------------------------------------------+ 11 | template 12 | interface IEqualityComparable 13 | { 14 | //--- method for determining equality 15 | bool Equals(T value); 16 | //--- method to calculate hash code 17 | int HashCode(void); 18 | }; 19 | //+------------------------------------------------------------------+ 20 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Interfaces/IEqualityComparer.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| IEqualityComparer.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | //+------------------------------------------------------------------+ 7 | //| Interface IEqualityComparer. | 8 | //| Usage: Defines methods to support the comparison of values for | 9 | //| equality. | 10 | //+------------------------------------------------------------------+ 11 | template 12 | interface IEqualityComparer 13 | { 14 | //--- determines whether the specified values are equal 15 | bool Equals(T x,T y); 16 | //--- returns a hash code for the specified object 17 | int HashCode(T value); 18 | }; 19 | //+------------------------------------------------------------------+ 20 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Interfaces/IList.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| IList.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include "ICollection.mqh" 7 | //+------------------------------------------------------------------+ 8 | //| Interface IList. | 9 | //| Usage: Represents a collection of objects that can be | 10 | //| individually accessed by index. | 11 | //+------------------------------------------------------------------+ 12 | template 13 | interface IList: public ICollection 14 | { 15 | //--- method of access to the data 16 | bool TryGetValue(const int index,T &value); 17 | bool TrySetValue(const int index,T value); 18 | //--- methods of filling the array 19 | bool Insert(const int index,T item); 20 | //--- methods for searching index 21 | int IndexOf(T item); 22 | int LastIndexOf(T item); 23 | //--- methods of cleaning and deleting 24 | bool RemoveAt(const int index); 25 | }; 26 | //+------------------------------------------------------------------+ 27 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Interfaces/IMap.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| IMap.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include "ICollection.mqh" 7 | template 8 | class CKeyValuePair; 9 | //+------------------------------------------------------------------+ 10 | //| Interface IMap. | 11 | //| Usage: Represents a generic collection of key/value pairs. | 12 | //+------------------------------------------------------------------+ 13 | template 14 | interface IMap: public ICollection*> 15 | { 16 | //--- methods of filling data 17 | bool Add(TKey key,TValue value); 18 | //--- methods of access to protected data 19 | bool Contains(TKey key,TValue value); 20 | bool Remove(TKey key); 21 | //--- method of access to the data 22 | bool TryGetValue(TKey key,TValue &value); 23 | bool TrySetValue(TKey key,TValue value); 24 | //--- methods of copy data from collection 25 | int CopyTo(TKey &dst_keys[],TValue &dst_values[],const int dst_start=0); 26 | }; 27 | //+------------------------------------------------------------------+ 28 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Interfaces/ISet.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| ISet.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include "ICollection.mqh" 7 | //+------------------------------------------------------------------+ 8 | //| Interface ISet. | 9 | //| Usage: Provides the base interface for the abstraction of sets. | 10 | //+------------------------------------------------------------------+ 11 | template 12 | interface ISet: public ICollection 13 | { 14 | //--- methods of changing sets 15 | void ExceptWith(ICollection*collection); 16 | void ExceptWith(T &array[]); 17 | void IntersectWith(ICollection*collection); 18 | void IntersectWith(T &array[]); 19 | void SymmetricExceptWith(ICollection*collection); 20 | void SymmetricExceptWith(T &array[]); 21 | void UnionWith(ICollection*collection); 22 | void UnionWith(T &array[]); 23 | //--- methods for determining the relationship between sets 24 | bool IsProperSubsetOf(ICollection*collection); 25 | bool IsProperSubsetOf(T &array[]); 26 | bool IsProperSupersetOf(ICollection*collection); 27 | bool IsProperSupersetOf(T &array[]); 28 | bool IsSubsetOf(ICollection*collection); 29 | bool IsSubsetOf(T &array[]); 30 | bool IsSupersetOf(ICollection*collection); 31 | bool IsSupersetOf(T &array[]); 32 | bool Overlaps(ICollection*collection); 33 | bool Overlaps(T &array[]); 34 | bool SetEquals(ICollection*collection); 35 | bool SetEquals(T &array[]); 36 | }; 37 | //+------------------------------------------------------------------+ 38 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Internal/DefaultComparer.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| DefaultComparer.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | #include "CompareFunction.mqh" 8 | //+------------------------------------------------------------------+ 9 | //| Class CDefaultComparer. | 10 | //| Usage: Provides a default class for implementations of the | 11 | //| IComparer generic interface. | 12 | //+------------------------------------------------------------------+ 13 | template 14 | class CDefaultComparer: public IComparer 15 | { 16 | public: 17 | CDefaultComparer(void) { } 18 | ~CDefaultComparer(void) { } 19 | //--- compares two values and returns a value describing relationship between them 20 | int Compare(T x,T y) { return ::Compare(x,y); } 21 | }; 22 | //+------------------------------------------------------------------+ 23 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Internal/DefaultEqualityComparer.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| DefaultEqualityComparer.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | #include "EqualFunction.mqh" 8 | #include "HashFunction.mqh" 9 | //+------------------------------------------------------------------+ 10 | //| Class CDefaultEqualityComparer. | 11 | //| Usage: Provides a default class for implementations of the | 12 | //| IEqualityComparer generic interface. | 13 | //+------------------------------------------------------------------+ 14 | template 15 | class CDefaultEqualityComparer: public IEqualityComparer 16 | { 17 | public: 18 | CDefaultEqualityComparer(void) { } 19 | ~CDefaultEqualityComparer(void) { } 20 | //--- determines whether the specified values are equal 21 | bool Equals(T x,T y) { return ::Equals(x,y); } 22 | //--- returns a hash code for the specified object 23 | int HashCode(T value) { return ::GetHashCode(value); } 24 | }; 25 | //+------------------------------------------------------------------+ 26 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Internal/EqualFunction.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| EqualFunction.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | //+------------------------------------------------------------------+ 8 | //| Indicates whether x object is equal y object of the same type. | 9 | //+------------------------------------------------------------------+ 10 | template 11 | bool Equals(T x,T y) 12 | { 13 | //--- try to convert to equality comparable object 14 | IEqualityComparable*equtable=dynamic_cast*>(x); 15 | if(equtable) 16 | { 17 | //--- use specied equality compare method 18 | return equtable.Equals(y); 19 | } 20 | else 21 | { 22 | //--- use default equality comparer operator 23 | return(x==y); 24 | } 25 | } 26 | //+------------------------------------------------------------------+ 27 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Internal/PrimeGenerator.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| PrimeGenerator.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | //+------------------------------------------------------------------+ 7 | //| Class CPrimeGenrator. | 8 | //| Usage: Used to generate prime numbers. | 9 | //+------------------------------------------------------------------+ 10 | class CPrimeGenerator 11 | { 12 | private: 13 | const static int s_primes[]; // table of prime numbers 14 | const static int s_hash_prime; 15 | 16 | public: 17 | static bool IsPrime(const int candidate); 18 | static int GetPrime(const int min); 19 | static int ExpandPrime(const int old_size); 20 | }; 21 | const static int CPrimeGenerator::s_primes[]= 22 | { 23 | 3,7,11,17,23,29,37,47,59,71,89,107,131,163,197,239,293,353,431,521,631,761,919, 24 | 1103,1327,1597,1931,2333,2801,3371,4049,4861,5839,7013,8419,10103,12143,14591, 25 | 17519,21023,25229,30293,36353,43627,52361,62851,75431,90523,108631,130363,156437, 26 | 187751,225307,270371,324449,389357,467237,560689,672827,807403,968897,1162687,1395263, 27 | 1674319,2009191,2411033,2893249,3471899,4166287,4999559,5999471,7199369,8332579, 28 | 9999161,11998949,14398753,16665163,19998337,23997907,28797523,33330329,39996683, 29 | 47995853,57595063,66660701,79993367,95991737,115190149,133321403,159986773,191983481, 30 | 230380307,266642809,319973567,383966977,460760623,533285671,639947149,767933981, 31 | 921521257,1066571383,1279894313,1535867969,1843042529,2133142771 32 | }; 33 | const static int CPrimeGenerator::s_hash_prime=101; 34 | //+------------------------------------------------------------------+ 35 | //| Determines whether a value is prime. | 36 | //+------------------------------------------------------------------+ 37 | bool CPrimeGenerator::IsPrime(const int candidate) 38 | { 39 | if((candidate&1)!=0) 40 | { 41 | int limit=(int)MathSqrt(candidate); 42 | //--- check value is prime 43 | for(int divisor=3; divisor<=limit; divisor+=2) 44 | if((candidate%divisor)==0) 45 | return(false); 46 | return(true); 47 | } 48 | return(candidate==2); 49 | } 50 | //+------------------------------------------------------------------+ 51 | //| Fast generator of prime value. | 52 | //+------------------------------------------------------------------+ 53 | int CPrimeGenerator::GetPrime(const int min) 54 | { 55 | //--- a typical resize algorithm would pick the smallest prime number in this array 56 | //--- that is larger than twice the previous capacity. 57 | //--- get next prime value from table 58 | for(int i=0; i=min) 62 | return(prime); 63 | } 64 | //--- outside of our predefined table 65 | for(int i=(min|1); i<=INT_MAX;i+=2) 66 | { 67 | if(IsPrime(i) && ((i-1)%s_hash_prime!=0)) 68 | return(i); 69 | } 70 | return(min); 71 | } 72 | //+------------------------------------------------------------------+ 73 | //| Generate a new prime value greater than old_size. | 74 | //+------------------------------------------------------------------+ 75 | int CPrimeGenerator::ExpandPrime(const int old_size) 76 | { 77 | if(old_size>=INT_MAX/2) 78 | return(INT_MAX); 79 | return(GetPrime(old_size*2)); 80 | } 81 | //+------------------------------------------------------------------+ 82 | -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/Queue.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Generic/Queue.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Generic/RedBlackTree.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Generic/RedBlackTree.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Graphics/ColorGenerator.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| ColorGenerator.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | //+------------------------------------------------------------------+ 7 | //| Class CColorGenerator | 8 | //| Usage: class to generate the default colors | 9 | //+------------------------------------------------------------------+ 10 | class CColorGenerator 11 | { 12 | private: 13 | int m_index; 14 | bool m_generate; 15 | uint m_current_palette[20]; 16 | const static uint s_default_palette[20]; 17 | 18 | public: 19 | CColorGenerator(void); 20 | ~CColorGenerator(void); 21 | //--- gets the next color 22 | uint Next(void); 23 | //--- reset generator 24 | void Reset(void); 25 | }; 26 | const uint CColorGenerator::s_default_palette[20]= 27 | { 28 | 0x3366CC,0xDC3912,0xFF9900,0x109618,0x990099, 29 | 0x3B3EAC,0x0099C6,0xDD4477,0x66AA00,0xB82E2E, 30 | 0x316395,0x994499,0x22AA99,0xAAAA11,0x6633CC, 31 | 0xE67300,0x8B0707,0x329262,0x5574A6,0x3B3EAC 32 | }; 33 | //+------------------------------------------------------------------+ 34 | //| Constructor | 35 | //+------------------------------------------------------------------+ 36 | CColorGenerator::CColorGenerator(void): m_index(0), 37 | m_generate(false) 38 | { 39 | ArrayCopy(m_current_palette,s_default_palette); 40 | } 41 | //+------------------------------------------------------------------+ 42 | //| Destructor | 43 | //+------------------------------------------------------------------+ 44 | CColorGenerator::~CColorGenerator(void) 45 | { 46 | } 47 | //+------------------------------------------------------------------+ 48 | //| Gets or generates the following color from the palette | 49 | //+------------------------------------------------------------------+ 50 | uint CColorGenerator::Next(void) 51 | { 52 | //--- check the array out of range 53 | if(m_index==20) 54 | { 55 | m_index=0; 56 | if(!m_generate) 57 | m_generate=true; 58 | } 59 | //--- check the default palette is over 60 | if(m_generate) 61 | m_current_palette[m_index]=(m_index==19 ? (m_current_palette[m_index]^m_current_palette[0]):(m_current_palette[m_index]^m_current_palette[m_index+1])); 62 | //--- return next color 63 | return(m_current_palette[m_index++]); 64 | } 65 | //+------------------------------------------------------------------+ 66 | //| Resets all the new colors, set the index to 0 | 67 | //+------------------------------------------------------------------+ 68 | void CColorGenerator::Reset(void) 69 | { 70 | m_index=0; 71 | m_generate=false; 72 | ArrayCopy(m_current_palette,s_default_palette); 73 | } 74 | //+------------------------------------------------------------------+ 75 | -------------------------------------------------------------------------------- /MT5Resources/Include/Graphics/Graphic.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Graphics/Graphic.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Math/Alglib/integration.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Math/Alglib/integration.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Math/Fuzzy/fuzzyterm.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| fuzzyterm.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | //| Implementation of Fuzzy library in MetaQuotes Language 5 | 7 | //| | 8 | //| The features of the library include: | 9 | //| - Create Mamdani fuzzy model | 10 | //| - Create Sugeno fuzzy model | 11 | //| - Normal membership function | 12 | //| - Triangular membership function | 13 | //| - Trapezoidal membership function | 14 | //| - Constant membership function | 15 | //| - Defuzzification method of center of gravity (COG) | 16 | //| - Defuzzification method of bisector of area (BOA) | 17 | //| - Defuzzification method of mean of maxima (MeOM) | 18 | //| | 19 | //| This file is free software; you can redistribute it and/or | 20 | //| modify it under the terms of the GNU General Public License as | 21 | //| published by the Free Software Foundation (www.fsf.org); either | 22 | //| version 2 of the License, or (at your option) any later version. | 23 | //| | 24 | //| This program is distributed in the hope that it will be useful, | 25 | //| but WITHOUT ANY WARRANTY; without even the implied warranty of | 26 | //| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 27 | //| GNU General Public License for more details. | 28 | //+------------------------------------------------------------------+ 29 | #include 30 | #include "MembershipFunction.mqh" 31 | #include "Helper.mqh" 32 | //+------------------------------------------------------------------+ 33 | //| Purpose: creating fuzzy term. | 34 | //+------------------------------------------------------------------+ 35 | //+------------------------------------------------------------------+ 36 | //| Fuzzy or linguistic term. | 37 | //+------------------------------------------------------------------+ 38 | class CFuzzyTerm : public CNamedValueImpl 39 | { 40 | private: 41 | IMembershipFunction *m_mf; // The membership function of the term 42 | 43 | public: 44 | CFuzzyTerm(const string name,IMembershipFunction *mf); 45 | ~CFuzzyTerm(void); 46 | //--- method to check type 47 | virtual bool IsTypeOf(EnType type) { return(type==TYPE_CLASS_FuzzyTerm); } 48 | //--- method gets the membership function initially associated with the term 49 | IMembershipFunction *MembershipFunction() { return(m_mf); } 50 | }; 51 | //+------------------------------------------------------------------+ 52 | //| Constructor with parameters | 53 | //+------------------------------------------------------------------+ 54 | CFuzzyTerm::CFuzzyTerm(const string name,IMembershipFunction *mf) 55 | { 56 | CNamedValueImpl::Name(name); 57 | m_mf=mf; 58 | } 59 | //+------------------------------------------------------------------+ 60 | //| Destructor | 61 | //+------------------------------------------------------------------+ 62 | CFuzzyTerm::~CFuzzyTerm(void) 63 | { 64 | if(CheckPointer(m_mf)==POINTER_DYNAMIC) 65 | { 66 | delete m_mf; 67 | } 68 | } 69 | //+------------------------------------------------------------------+ 70 | -------------------------------------------------------------------------------- /MT5Resources/Include/Math/Stat/Math.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Math/Stat/Math.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Math/Stat/Stat.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| Stat.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include -------------------------------------------------------------------------------- /MT5Resources/Include/Mql/Lang/Error.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Mql/Lang/Error.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/Object.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| Object.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include "StdLibErr.mqh" 7 | //+------------------------------------------------------------------+ 8 | //| Class CObject. | 9 | //| Purpose: Base class for storing elements. | 10 | //+------------------------------------------------------------------+ 11 | class CObject 12 | { 13 | private: 14 | CObject *m_prev; // previous item of list 15 | CObject *m_next; // next item of list 16 | 17 | public: 18 | CObject(void): m_prev(NULL),m_next(NULL) { } 19 | ~CObject(void) { } 20 | //--- methods to access protected data 21 | CObject *Prev(void) const { return(m_prev); } 22 | void Prev(CObject *node) { m_prev=node; } 23 | CObject *Next(void) const { return(m_next); } 24 | void Next(CObject *node) { m_next=node; } 25 | //--- methods for working with files 26 | virtual bool Save(const int file_handle) { return(true); } 27 | virtual bool Load(const int file_handle) { return(true); } 28 | //--- method of identifying the object 29 | virtual int Type(void) const { return(0); } 30 | //--- method of comparing the objects 31 | virtual int Compare(const CObject *node,const int mode=0) const { return(0); } 32 | }; 33 | //+------------------------------------------------------------------+ 34 | -------------------------------------------------------------------------------- /MT5Resources/Include/StdLibErr.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| StdLibErr.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #define ERR_USER_INVALID_HANDLE 1 7 | #define ERR_USER_INVALID_BUFF_NUM 2 8 | #define ERR_USER_ITEM_NOT_FOUND 3 9 | #define ERR_USER_ARRAY_IS_EMPTY 1000 10 | //+------------------------------------------------------------------+ 11 | -------------------------------------------------------------------------------- /MT5Resources/Include/WinAPI/errhandlingapi.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| errhandlingapi.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | #include 8 | //+------------------------------------------------------------------+ 9 | //| | 10 | //+------------------------------------------------------------------+ 11 | #import "kernel32.dll" 12 | void RaiseException(uint exception_code,uint exception_flags,uint number_of_arguments,const ulong &arguments[]); 13 | int UnhandledExceptionFilter(EXCEPTION_POINTERS &exception_info); 14 | PVOID SetUnhandledExceptionFilter(PVOID top_level_exception_filter); 15 | uint GetLastError(void); 16 | void SetLastError(uint err_code); 17 | uint GetErrorMode(void); 18 | uint SetErrorMode(uint mode); 19 | PVOID AddVectoredExceptionHandler(uint first,PVOID handler); 20 | uint RemoveVectoredExceptionHandler(PVOID handle); 21 | PVOID AddVectoredContinueHandler(uint first,PVOID handler); 22 | uint RemoveVectoredContinueHandler(PVOID handle); 23 | void RestoreLastError(uint err_code); 24 | void RaiseFailFastException(EXCEPTION_RECORD &exception_record,CONTEXT &context_record,uint flags); 25 | void FatalAppExitW(uint action,const string message_text); 26 | uint GetThreadErrorMode(void); 27 | int SetThreadErrorMode(uint new_mode,uint& old_mode); 28 | #import 29 | -------------------------------------------------------------------------------- /MT5Resources/Include/WinAPI/handleapi.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| handleapi.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | 8 | //+------------------------------------------------------------------+ 9 | //| | 10 | //+------------------------------------------------------------------+ 11 | #import "kernel32.dll" 12 | int CloseHandle(HANDLE object); 13 | int DuplicateHandle(HANDLE source_process_handle,HANDLE source_handle,HANDLE target_process_handle,HANDLE &target_handle,uint desired_access,int inherit_handle,uint options); 14 | int GetHandleInformation(HANDLE object,uint& flags); 15 | int SetHandleInformation(HANDLE object,uint mask,uint flags); 16 | #import 17 | 18 | #import "kernelbase.dll" 19 | int CompareObjectHandles(HANDLE first_object_handle, HANDLE second_object_handle); 20 | #import 21 | //+------------------------------------------------------------------+ -------------------------------------------------------------------------------- /MT5Resources/Include/WinAPI/libloaderapi.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| libloaderapi.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | 8 | //--- 9 | struct ENUMUILANG 10 | { 11 | uint NumOfEnumUILang; 12 | uint SizeOfEnumUIBuffer; 13 | PVOID EnumUIBuffer; 14 | }; 15 | //+------------------------------------------------------------------+ 16 | //| | 17 | //+------------------------------------------------------------------+ 18 | #import "kernel32.dll" 19 | int DisableThreadLibraryCalls(HANDLE lib_module); 20 | HANDLE FindResourceExW(HANDLE module,const string type,const string name,ushort language); 21 | int FindStringOrdinal(uint find_string_ordinal_flags,const string string_source,int source,const string string_value,int value,int ignore_case); 22 | int FreeLibrary(HANDLE lib_module); 23 | void FreeLibraryAndExitThread(HANDLE lib_module,uint exit_code); 24 | int FreeResource(HANDLE res_data); 25 | uint GetModuleFileNameW(HANDLE module,ushort &filename[],uint size); 26 | HANDLE GetModuleHandleW(const string module_name); 27 | int GetModuleHandleExW(uint flags,const string module_name,HANDLE &module); 28 | PVOID GetProcAddress(HANDLE module,uchar &proc_name[]); 29 | HANDLE LoadLibraryExW(const string lib_file_name,HANDLE file,uint flags); 30 | HANDLE LoadResource(HANDLE module,HANDLE res_info); 31 | PVOID LockResource(HANDLE res_data); 32 | uint SizeofResource(HANDLE module,HANDLE res_info); 33 | PVOID AddDllDirectory(const string new_directory); 34 | int RemoveDllDirectory(PVOID cookie); 35 | int SetDefaultDllDirectories(uint directory_flags); 36 | int EnumResourceLanguagesExW(HANDLE module,const string type,const string name,PVOID enum_func,long param,uint flags,ushort lang_id); 37 | int EnumResourceNamesExW(HANDLE module,const string type,PVOID enum_func,long param,uint flags,ushort lang_id); 38 | int EnumResourceTypesExW(HANDLE module,PVOID enum_func,long param,uint flags,ushort lang_id); 39 | HANDLE FindResourceW(HANDLE module,const string name,const string type); 40 | HANDLE LoadLibraryW(const string lib_file_name); 41 | int EnumResourceNamesW(HANDLE module,const string type,PVOID enum_func,long param); 42 | #import 43 | 44 | #import "user32.dll" 45 | int LoadStringW(HANDLE instance,uint id,string buffer,int buffer_max); 46 | #import 47 | //+------------------------------------------------------------------+ 48 | -------------------------------------------------------------------------------- /MT5Resources/Include/WinAPI/processenv.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| processenv.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include 7 | 8 | //+------------------------------------------------------------------+ 9 | //| | 10 | //+------------------------------------------------------------------+ 11 | #import "kernel32.dll" 12 | int SetEnvironmentStringsW(string new_environment); 13 | HANDLE GetStdHandle(uint std_handle); 14 | int SetStdHandle(uint std_handle,HANDLE handle); 15 | int SetStdHandleEx(uint std_handle,HANDLE handle,HANDLE &prev_value); 16 | string GetCommandLineW(void); 17 | string GetEnvironmentStringsW(void); 18 | int FreeEnvironmentStringsW(string v); 19 | uint GetEnvironmentVariableW(const string name,ushort &buffer[],uint size); 20 | int SetEnvironmentVariableW(const string name,const string value); 21 | uint ExpandEnvironmentStringsW(const string src,string dst,uint size); 22 | int SetCurrentDirectoryW(const string path_name); 23 | uint GetCurrentDirectoryW(uint buffer_length,ushort &buffer[]); 24 | uint GetCurrentDirectoryW(uint buffer_length,string &buffer); 25 | uint SearchPathW(const string path,const string file_name,const string extension,uint buffer_length,ushort &buffer[],string &file_part); 26 | int NeedCurrentDirectoryForExePathW(const string exe_name); 27 | #import 28 | -------------------------------------------------------------------------------- /MT5Resources/Include/WinAPI/winapi.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| winapi.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #include "windef.mqh" 7 | #include "winnt.mqh" 8 | #include "fileapi.mqh" 9 | #include "winbase.mqh" 10 | #include "winuser.mqh" 11 | #include "wingdi.mqh" 12 | #include "winreg.mqh" 13 | #include "handleapi.mqh" 14 | #include "processthreadsapi.mqh" 15 | #include "securitybaseapi.mqh" 16 | #include "errhandlingapi.mqh" 17 | #include "sysinfoapi.mqh" 18 | #include "processenv.mqh" 19 | #include "libloaderapi.mqh" 20 | #include "memoryapi.mqh" 21 | //+------------------------------------------------------------------+ 22 | -------------------------------------------------------------------------------- /MT5Resources/Include/Zmq/AtomicCounter.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| Module: AtomicCounter.mqh | 3 | //| This file is part of the mql-zmq project: | 4 | //| https://github.com/dingmaotu/mql-zmq | 5 | //| | 6 | //| Copyright 2016-2017 Li Ding | 7 | //| | 8 | //| Licensed under the Apache License, Version 2.0 (the "License"); | 9 | //| you may not use this file except in compliance with the License. | 10 | //| You may obtain a copy of the License at | 11 | //| | 12 | //| http://www.apache.org/licenses/LICENSE-2.0 | 13 | //| | 14 | //| Unless required by applicable law or agreed to in writing, | 15 | //| software distributed under the License is distributed on an | 16 | //| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | 17 | //| either express or implied. | 18 | //| See the License for the specific language governing permissions | 19 | //| and limitations under the License. | 20 | //+------------------------------------------------------------------+ 21 | #property strict 22 | 23 | #include 24 | 25 | #import "libzmq.dll" 26 | intptr_t zmq_atomic_counter_new(void); 27 | void zmq_atomic_counter_set(intptr_t counter,int value); 28 | int zmq_atomic_counter_inc(intptr_t counter); 29 | int zmq_atomic_counter_dec(intptr_t counter); 30 | int zmq_atomic_counter_value(intptr_t counter); 31 | void zmq_atomic_counter_destroy(intptr_t &counter_p); 32 | #import 33 | //+------------------------------------------------------------------+ 34 | //| Atomic counter utility | 35 | //+------------------------------------------------------------------+ 36 | class AtomicCounter 37 | { 38 | private: 39 | intptr_t m_ref; 40 | 41 | public: 42 | AtomicCounter() {m_ref=zmq_atomic_counter_new();} 43 | ~AtomicCounter() {zmq_atomic_counter_destroy(m_ref);} 44 | 45 | int increase() {return zmq_atomic_counter_inc(m_ref);} 46 | int decrease() {return zmq_atomic_counter_dec(m_ref);} 47 | int get() {return zmq_atomic_counter_value(m_ref);} 48 | void set(int value) {zmq_atomic_counter_set(m_ref,value);} 49 | }; 50 | //+------------------------------------------------------------------+ 51 | -------------------------------------------------------------------------------- /MT5Resources/Include/Zmq/Zmq.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/Zmq/Zmq.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/ejtraderMT/Calendar.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/ejtraderMT/Calendar.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/ejtraderMT/Event.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/ejtraderMT/Event.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/ejtraderMT/HistoryInfo.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/ejtraderMT/HistoryInfo.mqh -------------------------------------------------------------------------------- /MT5Resources/Include/ejtraderMT/Search.code-search: -------------------------------------------------------------------------------- 1 | # Query: ejtraderLAbs 2 | # ContextLines: 1 3 | 4 | 7 results - 6 files 5 | 6 | Experts/ejtraderMT.mq5: 7 | 3 #property copyright "Copyright 2021, ejtrader." 8 | 4: #property link "https://github.com/ejtraderLabs" 9 | 5 #property version "3.03" 10 | 11 | Include/ejtraderMT/Broker.mqh: 12 | 1 #property copyright "ejtrader" 13 | 2: #property link "https://github.com/ejtraderLAbs/MQL5-ejtraderMT" 14 | 3 15 | 16 | Include/ejtraderMT/ChartControl.mqh: 17 | 3 #property copyright "ejtrader" 18 | 4: #property link "https://github.com/ejtraderLAbs/MQL5-ejtraderMT" 19 | 5 20 | 21 | Include/ejtraderMT/HistoryInfo.mqh: 22 | 3 #property copyright "ejtrader" 23 | 4: #property link "https://github.com/ejtraderLAbs/MQL5-ejtraderMT" 24 | 5 //+------------------------------------------------------------------+ 25 | 26 | Include/ejtraderMT/StartIndicator.mqh: 27 | 3 //| Gunther Schulz | 28 | 4: //| https://github.com/ejtraderLabs/MQL5-ejtraderMT 29 | 5 //+------------------------------------------------------------------+ 30 | 6 #property copyright "Gunther Schulz" 31 | 7: #property link "https://github.com/ejtraderLAbs/MQL5-ejtraderMT" 32 | 8 33 | 34 | Indicators/ejtraderMTIndicator.mq5: 35 | 7 #property copyright "2021 ejtrader" 36 | 8: #property link "https://github.com/ejtraderLabs" 37 | 9 #property version "1.00" 38 | -------------------------------------------------------------------------------- /MT5Resources/Include/ejtraderMT/String.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Include/ejtraderMT/String.mqh -------------------------------------------------------------------------------- /MT5Resources/Scripts/Examples/AccountInfo/AccountInfoSample.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/Examples/AccountInfo/AccountInfoSample.ex5 -------------------------------------------------------------------------------- /MT5Resources/Scripts/Examples/AccountInfo/AccountInfoSampleInit.mqh: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| AccountInfoInitSample.mqh | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | //--- 7 | //+------------------------------------------------------------------+ 8 | //| Arrays to initialize graphics objects AccountInfoSample. | 9 | //+------------------------------------------------------------------+ 10 | string init_str[]= 11 | { 12 | "Login","TradeMode","Leverage","MarginMode","TradeAllowed", 13 | "TradeExpert","Balance","Credit","Profit","Equity", 14 | "Margin","FreeMargin","MarginLevel","MarginCall","MarginStopOut", 15 | "Name","Server","Currency","Company" 16 | }; 17 | //+------------------------------------------------------------------+ 18 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/Examples/ArrayDouble/ArrayDoubleSample.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/Examples/ArrayDouble/ArrayDoubleSample.ex5 -------------------------------------------------------------------------------- /MT5Resources/Scripts/Examples/Canvas/CanvasSample.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/Examples/Canvas/CanvasSample.ex5 -------------------------------------------------------------------------------- /MT5Resources/Scripts/Examples/Canvas/Charts/HistogramChartSample.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/Examples/Canvas/Charts/HistogramChartSample.ex5 -------------------------------------------------------------------------------- /MT5Resources/Scripts/Examples/Canvas/Charts/HistogramChartSample.mq5: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| HistogramChartSample.mq5 | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2000-2023, MetaQuotes Ltd." 7 | #property link "https://www.mql5.com" 8 | #property description "Example of using histogram" 9 | //--- 10 | #include 11 | //+------------------------------------------------------------------+ 12 | //| inputs | 13 | //+------------------------------------------------------------------+ 14 | input bool Accumulative=true; 15 | //+------------------------------------------------------------------+ 16 | //| Script program start function | 17 | //+------------------------------------------------------------------+ 18 | int OnStart(void) 19 | { 20 | int k=100; 21 | double arr[10]; 22 | //--- create chart 23 | CHistogramChart chart; 24 | if(!chart.CreateBitmapLabel("SampleHistogramChart",10,10,600,450)) 25 | { 26 | Print("Error creating histogram chart: ",GetLastError()); 27 | return(-1); 28 | } 29 | if(Accumulative) 30 | { 31 | chart.Accumulative(); 32 | chart.VScaleParams(20*k*10,-10*k*10,20); 33 | } 34 | else 35 | chart.VScaleParams(20*k,-10*k,20); 36 | chart.ShowValue(true); 37 | chart.ShowScaleTop(false); 38 | chart.ShowScaleBottom(false); 39 | chart.ShowScaleRight(false); 40 | chart.ShowLegend(); 41 | for(int j=0;j<5;j++) 42 | { 43 | for(int i=0;i<10;i++) 44 | { 45 | k=-k; 46 | if(k>0) 47 | arr[i]=k*(i+10-j); 48 | else 49 | arr[i]=k*(i+10-j)/2; 50 | } 51 | chart.SeriesAdd(arr,"Item"+IntegerToString(j)); 52 | } 53 | //--- play with values 54 | while(!IsStopped()) 55 | { 56 | int i=rand()%5; 57 | int j=rand()%10; 58 | k=rand()%3000-1000; 59 | chart.ValueUpdate(i,j,k); 60 | Sleep(200); 61 | } 62 | //--- finish 63 | chart.Destroy(); 64 | return(0); 65 | } 66 | //+------------------------------------------------------------------+ 67 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/Examples/Canvas/Charts/LineChartSample.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/Examples/Canvas/Charts/LineChartSample.ex5 -------------------------------------------------------------------------------- /MT5Resources/Scripts/Examples/Canvas/Charts/LineChartSample.mq5: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| LineChartSample.mq5 | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2000-2023, MetaQuotes Ltd." 7 | #property link "https://www.mql5.com" 8 | #property description "Example of using line chart" 9 | //--- 10 | #include 11 | //+------------------------------------------------------------------+ 12 | //| inputs | 13 | //+------------------------------------------------------------------+ 14 | input bool Accumulative=false; 15 | //+------------------------------------------------------------------+ 16 | //| Script program start function | 17 | //+------------------------------------------------------------------+ 18 | int OnStart(void) 19 | { 20 | int k=100; 21 | double arr[10]; 22 | //--- create chart 23 | CLineChart chart; 24 | //--- create chart 25 | if(!chart.CreateBitmapLabel("SampleHistogrammChart",10,10,600,450)) 26 | { 27 | Print("Error creating line chart: ",GetLastError()); 28 | return(-1); 29 | } 30 | if(Accumulative) 31 | { 32 | chart.Accumulative(); 33 | chart.VScaleParams(20*k*10,-10*k*10,20); 34 | } 35 | else 36 | chart.VScaleParams(20*k,-10*k,15); 37 | chart.ShowScaleTop(false); 38 | chart.ShowScaleRight(false); 39 | chart.ShowLegend(); 40 | chart.Filled(); 41 | for(int j=0;j<5;j++) 42 | { 43 | for(int i=0;i<10;i++) 44 | { 45 | k=-k; 46 | if(k>0) 47 | arr[i]=k*(i+10-j); 48 | else 49 | arr[i]=k*(i+10-j)/2; 50 | } 51 | chart.SeriesAdd(arr,"Item"+IntegerToString(j)); 52 | } 53 | //--- play with values 54 | while(!IsStopped()) 55 | { 56 | int i=rand()%5; 57 | int j=rand()%10; 58 | k=rand()%3000-1000; 59 | chart.ValueUpdate(i,j,k); 60 | Sleep(200); 61 | } 62 | //--- finish 63 | chart.Destroy(); 64 | return(0); 65 | } 66 | //+------------------------------------------------------------------+ 67 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/Examples/Canvas/Charts/PieChartSample.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/Examples/Canvas/Charts/PieChartSample.ex5 -------------------------------------------------------------------------------- /MT5Resources/Scripts/Examples/Canvas/Charts/PieChartSample.mq5: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| PieChartSample.mq5 | 3 | //| Copyright 2000-2023, MetaQuotes Ltd. | 4 | //| https://www.mql5.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2000-2023, MetaQuotes Ltd." 7 | #property link "https://www.mql5.com" 8 | #property description "Example of using pie chart" 9 | //--- 10 | #include 11 | //+------------------------------------------------------------------+ 12 | //| inputs | 13 | //+------------------------------------------------------------------+ 14 | input int Width=600; 15 | input int Height=450; 16 | //+------------------------------------------------------------------+ 17 | //| Script program start function | 18 | //+------------------------------------------------------------------+ 19 | int OnStart(void) 20 | { 21 | //--- check 22 | if(Width<=0 || Height<=0) 23 | { 24 | Print("Too simple."); 25 | return(-1); 26 | } 27 | //--- create chart 28 | CPieChart pie_chart; 29 | if(!pie_chart.CreateBitmapLabel("PieChart",10,10,Width,Height)) 30 | { 31 | Print("Error creating pie chart: ",GetLastError()); 32 | return(-1); 33 | } 34 | pie_chart.ShowPercent(); 35 | //--- draw 36 | for(uint i=0;i<30;i++) 37 | { 38 | pie_chart.ValueAdd(100*(i+1),"Item "+IntegerToString(i)); 39 | Sleep(10); 40 | } 41 | Sleep(2000); 42 | //--- disable legend 43 | pie_chart.LegendAlignment(ALIGNMENT_LEFT); 44 | Sleep(2000); 45 | //--- disable legend 46 | pie_chart.LegendAlignment(ALIGNMENT_RIGHT); 47 | Sleep(2000); 48 | //--- disable legend 49 | pie_chart.LegendAlignment(ALIGNMENT_TOP); 50 | Sleep(2000); 51 | //--- disable legend 52 | pie_chart.ShowLegend(false); 53 | Sleep(2000); 54 | //--- disable percentage 55 | pie_chart.ShowPercent(false); 56 | Sleep(2000); 57 | //--- disable descriptors 58 | pie_chart.ShowDescriptors(false); 59 | Sleep(2000); 60 | //--- enable all 61 | pie_chart.ShowLegend(); 62 | pie_chart.ShowValue(); 63 | pie_chart.ShowDescriptors(); 64 | Sleep(2000); 65 | //--- or like this 66 | pie_chart.ShowFlags(FLAG_SHOW_LEGEND|FLAG_SHOW_DESCRIPTORS|FLAG_SHOW_PERCENT); 67 | uint total=pie_chart.DataTotal(); 68 | //--- play with values 69 | for(uint i=0;i>(stage-pass))*(distance<<1); 18 | uint right_id=left_id+distance; 19 | double left_value=data[left_id]; 20 | double right_value=data[right_id]; 21 | uint same_direction=(id>>stage)&0x1; 22 | uint temp = same_direction?right_id:temp; 23 | right_id = same_direction?left_id:right_id; 24 | left_id = same_direction?temp:left_id; 25 | int compare_res=(left_value>(stage-pass))*(distance<<1); 15 | uint right_id=left_id+distance; 16 | float left_value=data[left_id]; 17 | float right_value=data[right_id]; 18 | uint same_direction=(id>>stage)&0x1; 19 | uint temp = same_direction?right_id:temp; 20 | right_id = same_direction?left_id:right_id; 21 | left_id = same_direction?temp:left_id; 22 | int compare_res=(left_value 12 | //+------------------------------------------------------------------+ 13 | //| Script program start function | 14 | //+------------------------------------------------------------------+ 15 | void OnStart() 16 | { 17 | //--- Test capabilities 18 | Print(">>> Testing capabilities"); 19 | Print("0) Zmq version is [",Zmq::getVersion(),"]"); 20 | Print("1) Supports ipc:// protocol: [",Zmq::hasIpc(),"]"); 21 | Print("2) Supports pgm:// protocol: [",Zmq::hasPgm(),"]"); 22 | Print("3) Supports norm:// protocol: [",Zmq::hasNorm(),"]"); 23 | Print("4) Supports tipc:// protocol: [",Zmq::hasTipc(),"]"); 24 | Print("5) Supports curve security: [",Zmq::hasCurve(),"]"); 25 | Print("6) Supports gssapi security: [",Zmq::hasGssApi(),"]"); 26 | Print(">>> End testing capabilities"); 27 | 28 | //--- Test Z85 encoding/decoding 29 | Print(">>> Testing Z85 encoding/decoding"); 30 | 31 | string data="12345678"; 32 | Print("1) Original data is: ",data); 33 | 34 | string secret=Z85::encode(data); 35 | Print("2) Encrypted value is: ",secret); 36 | 37 | string decoded=Z85::decode(secret); 38 | Print("3) Decoded: ",decoded); 39 | Print("4) Decoded value is equal to original: [",decoded==data,"]"); 40 | Print(">>> End testing Z85 encoding/decoding"); 41 | 42 | //--- Test atomic counters 43 | Print(">>> Testing atomic counters"); 44 | AtomicCounter counter; 45 | Print("1) Initial value should be 0: [",counter.get()==0,"]"); 46 | counter.set(5); 47 | Print("2) Counter set to 5: [",counter.get()==5,"]"); 48 | counter.increase(); 49 | Print("3) Increased value should be 6: [",counter.get()==6,"]"); 50 | counter.decrease(); 51 | Print("4) Decreased value should be 5: [",counter.get()==5,"]"); 52 | Print(">>> End testing atomic counters"); 53 | 54 | //--- Test context 55 | Print(">>> Testing context"); 56 | Context context; 57 | Print("1) Default IO threads should be ZMQ_IO_THREADS_DFLT: [",context.getIoThreads()==ZMQ_IO_THREADS_DFLT,"]"); 58 | Print(">>> trying to set io threads to 2"); 59 | context.setIoThreads(2); 60 | Print("2) Now IO threads should be 2: [",context.getIoThreads()==2,"]"); 61 | Print("3) Socket limit: [",context.getSocketLimit(),"]"); 62 | Print("4) Max sockets: [",context.getMaxSockets(),"]"); 63 | Print("5) Max message size: [",context.getMaxMessageSize(),"]"); 64 | Print(">>> End testing context"); 65 | 66 | Socket s(context,ZMQ_REP); 67 | string addr="inproc://abc"; 68 | if(!s.bind(addr)) 69 | { 70 | Debug(StringFormat("Error binding %s: %s",addr,Zmq::errorMessage())); 71 | } 72 | else 73 | { 74 | Debug(StringFormat("Success binded %s",addr)); 75 | } 76 | string endpoint; 77 | s.getLastEndpoint(endpoint); 78 | Print("Last endpoint is: [",endpoint,"]"); 79 | 80 | string principal; 81 | s.getGssApiPrincipal(principal); 82 | Print("Principal is [",principal,"]"); 83 | 84 | //--- Test curve 85 | Print(">>> Testing curve"); 86 | string genpub,gensec; 87 | Z85::generateKeyPair(genpub,gensec); 88 | Print("1) Generated public key: [",genpub,"]"); 89 | Print("1) Generated private key: [",gensec,"]"); 90 | Print("2) Derive public key from secret key: [",Z85::derivePublic(gensec)==genpub,"]"); 91 | Print(">>> End testing curve"); 92 | } 93 | //+------------------------------------------------------------------+ 94 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/UnitTests/Alglib/TestClasses.mqh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/UnitTests/Alglib/TestClasses.mqh -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/HelloWorldClient.ex5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/HelloWorldClient.ex5 -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/HelloWorldClient.mq5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/HelloWorldClient.mq5 -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/HelloWorldServer.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| HelloWorldServer.mq5 | 3 | //| Copyright 2016, Li Ding | 4 | //| dingmaotu@hotmail.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2016, Li Ding" 7 | #property link "dingmaotu@hotmail.com" 8 | #property version "1.00" 9 | 10 | #include 11 | //+------------------------------------------------------------------+ 12 | //| Hello World server in MQL | 13 | //| Binds REP socket to tcp://*:5555 | 14 | //| Expects "Hello" from client, replies with "World" | 15 | //+------------------------------------------------------------------+ 16 | void OnStart() 17 | { 18 | Context context("helloworld"); 19 | Socket socket(context,ZMQ_REP); 20 | 21 | socket.bind("tcp://*:5555"); 22 | 23 | while(!IsStopped()) 24 | { 25 | ZmqMsg request; 26 | 27 | // Wait for next request from client 28 | 29 | // MetaTrader note: this will block the script thread 30 | // and if you try to terminate this script, MetaTrader 31 | // will hang (and crash if you force closing it) 32 | socket.recv(request); 33 | Print("Receive Hello"); 34 | 35 | Sleep(1000); 36 | 37 | ZmqMsg reply("World"); 38 | // Send reply back to client 39 | socket.send(reply); 40 | } 41 | } 42 | //+------------------------------------------------------------------+ 43 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/TaskEvent.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/TaskEvent.mq4 -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/TaskSink.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| TaskSink.mq4 | 3 | //| Copyright 2017, Bear Two Technologies Co., Ltd. | 4 | //| dingmaotu@126.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2017, Bear Two Technologies Co., Ltd." 7 | #property link "dingmaotu@126.com" 8 | #property version "1.00" 9 | #property strict 10 | 11 | #include 12 | //+------------------------------------------------------------------+ 13 | //| Task sink in MQL (adapted from C++ version) | 14 | //| Binds PULL socket to tcp://localhost:5558 | 15 | //| Collects results from workers via that socket | 16 | //| | 17 | //| Olivier Chamoux | 18 | //+------------------------------------------------------------------+ 19 | void OnStart() 20 | { 21 | //--- 22 | // Prepare our context and socket 23 | Context context; 24 | Socket receiver(context,ZMQ_PULL); 25 | receiver.bind("tcp://*:5558"); 26 | 27 | // Wait for start of batch 28 | ZmqMsg message; 29 | receiver.recv(message); 30 | 31 | // Start our clock now 32 | uint tstart=GetTickCount(); 33 | // Process 100 confirmations 34 | string progress=""; 35 | for(int i=0; i<100; i++) 36 | { 37 | receiver.recv(message); 38 | if((i/10)*10==i) 39 | progress+=":"; 40 | else 41 | progress+="."; 42 | Comment(progress); 43 | } 44 | // Calculate and report duration of batch 45 | uint tend=GetTickCount(); 46 | Print(">>> Total elapsed time: ",tend-tstart," msec"); 47 | } 48 | //+------------------------------------------------------------------+ 49 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/TaskWorker.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| TaskWorker.mq4 | 3 | //| Copyright 2017, Bear Two Technologies Co., Ltd. | 4 | //| dingmaotu@126.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2017, Bear Two Technologies Co., Ltd." 7 | #property link "dingmaotu@126.com" 8 | #property version "1.00" 9 | #property strict 10 | #include 11 | //+------------------------------------------------------------------+ 12 | //| Task worker in MQL (adapted from C++ version) | 13 | //| Connects PULL socket to tcp://localhost:5557 | 14 | //| Collects workloads from ventilator via that socket | 15 | //| Connects PUSH socket to tcp://localhost:5558 | 16 | //| Sends results to sink via that socket | 17 | //| | 18 | //| Olivier Chamoux | 19 | //+------------------------------------------------------------------+ 20 | void OnStart() 21 | { 22 | //--- Share a single context in the terminal by the key "work" 23 | Context context("work"); 24 | 25 | //--- Socket to receive messages on 26 | Socket receiver(context,ZMQ_PULL); 27 | receiver.connect("tcp://localhost:5557"); 28 | 29 | //--- Socket to send messages to 30 | Socket sender(context,ZMQ_PUSH); 31 | sender.connect("tcp://localhost:5558"); 32 | 33 | //--- Process tasks forever 34 | string progress=""; 35 | while(!IsStopped()) 36 | { 37 | ZmqMsg message; 38 | receiver.recv(message); 39 | //--- Workload in msecs 40 | int workload=(int)StringToInteger(message.getData()); 41 | //--- Do the work 42 | Sleep(workload); 43 | //--- Send results to sink 44 | message.rebuild(); 45 | sender.send(message); 46 | 47 | // Simple progress indicator for the viewer 48 | progress+="."; 49 | Comment(progress); 50 | } 51 | } 52 | //+------------------------------------------------------------------+ 53 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/VersionReporting.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| VersionReporting.mq4.mq4 | 3 | //| Copyright 2016, Li Ding | 4 | //| dingmaotu@hotmail.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2016, Li Ding" 7 | #property link "dingmaotu@hotmail.com" 8 | #property version "1.00" 9 | #property strict 10 | 11 | #include 12 | //+------------------------------------------------------------------+ 13 | //| Report 0MQ version | 14 | //+------------------------------------------------------------------+ 15 | void OnStart() 16 | { 17 | Print(Zmq::getVersion()); 18 | } 19 | //+------------------------------------------------------------------+ 20 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/WeatherUpdateClient.mq4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/WeatherUpdateClient.mq4 -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter1/WeatherUpdateServer.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| WeatherUpdateServer.mq4.mq4 | 3 | //| Copyright 2016, Li Ding | 4 | //| dingmaotu@hotmail.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2016, Li Ding" 7 | #property link "dingmaotu@hotmail.com" 8 | #property version "1.00" 9 | #property strict 10 | 11 | #include 12 | 13 | #define within(num) (int) ((float) num * MathRand() / (32767 + 1.0)) 14 | //+------------------------------------------------------------------+ 15 | //| Weather update server in MQL | 16 | //| Binds PUB socket to tcp://*:5556 | 17 | //| Publishes random weather updates | 18 | //+------------------------------------------------------------------+ 19 | void OnStart() 20 | { 21 | //--- Prepare our context and publisher 22 | Context context; 23 | Socket publisher(context,ZMQ_PUB); 24 | publisher.bind("tcp://*:5556"); 25 | 26 | long messages_sent=0; 27 | //--- Initialize random number generator 28 | MathSrand(GetTickCount()); 29 | while(!IsStopped()) 30 | { 31 | int zipcode,temperature,relhumidity; 32 | 33 | // Get values that will fool the boss 34 | 35 | // MetaTrader Note: 36 | // if RAND_MAX < 100000, which is the case for MetaTrader, 37 | // you may never get the required value 38 | // So 30000 might be a good alternative 39 | zipcode=within(30000); 40 | temperature=within(215) - 80; 41 | relhumidity=within(50) + 10; 42 | 43 | // Send message to all subscribers 44 | ZmqMsg message(StringFormat("%05d %d %d",zipcode,temperature,relhumidity)); 45 | publisher.send(message); 46 | messages_sent++; 47 | 48 | if(messages_sent%1000000==0) 49 | { 50 | PrintFormat("Sent %dM messages now.",messages_sent/1000000); 51 | } 52 | } 53 | } 54 | //+------------------------------------------------------------------+ 55 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter2/MSPoller.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| MSPoller.mq4 | 3 | //| Copyright 2017, Li Ding | 4 | //| dingmaotu@126.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2017, Li Ding" 7 | #property link "dingmaotu@126.com" 8 | #property version "1.00" 9 | #property strict 10 | #include 11 | //+------------------------------------------------------------------+ 12 | //| Reading from multiple sockets in MQL (adapted from C++ version) | 13 | //| This version uses zmq_poll() | 14 | //| | 15 | //| Olivier Chamoux | 16 | //+------------------------------------------------------------------+ 17 | void OnStart() 18 | { 19 | //--- 20 | Context context; 21 | 22 | // Connect to task ventilator 23 | Socket receiver(context,ZMQ_PULL); 24 | receiver.connect("tcp://localhost:5557"); 25 | 26 | // Connect to weather server 27 | Socket subscriber(context,ZMQ_SUB); 28 | subscriber.connect("tcp://localhost:5556"); 29 | subscriber.subscribe("10001 "); 30 | 31 | // Initialize poll set 32 | PollItem items[2]; 33 | receiver.fillPollItem(items[0],ZMQ_POLLIN); 34 | subscriber.fillPollItem(items[1],ZMQ_POLLIN); 35 | // Process messages from both sockets 36 | while(!IsStopped()) 37 | { 38 | ZmqMsg message; 39 | //--- MQL Note: To handle Script exit properly, we set a timeout of 500 ms instead of infinite wait 40 | Socket::poll(items,500); 41 | 42 | if(items[0].hasInput()) 43 | { 44 | receiver.recv(message); 45 | // Process task 46 | } 47 | if(items[1].hasInput()) 48 | { 49 | subscriber.recv(message); 50 | // Process weather update 51 | } 52 | } 53 | } 54 | //+------------------------------------------------------------------+ 55 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter2/RRBroker.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| RRBroker.mq4 | 3 | //| Copyright 2017, Li Ding | 4 | //| dingmaotu@126.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2017, Li Ding" 7 | #property link "dingmaotu@126.com" 8 | #property version "1.00" 9 | #property strict 10 | #include 11 | //+------------------------------------------------------------------+ 12 | //| Simple request-reply broker in MQL (adapted from C++ version) | 13 | //| | 14 | //| Olivier Chamoux | 15 | //+------------------------------------------------------------------+ 16 | void OnStart() 17 | { 18 | // Prepare our context and sockets 19 | Context context; 20 | Socket frontend(context,ZMQ_ROUTER); 21 | Socket backend(context,ZMQ_DEALER); 22 | 23 | frontend.bind("tcp://*:5559"); 24 | backend.bind("tcp://*:5560"); 25 | 26 | // Initialize poll set 27 | PollItem items[2]; 28 | frontend.fillPollItem(items[0],ZMQ_POLLIN); 29 | backend.fillPollItem(items[1],ZMQ_POLLIN); 30 | 31 | // Switch messages between sockets 32 | while(!IsStopped()) 33 | { 34 | ZmqMsg message; 35 | bool more=false; // Multipart detection 36 | 37 | Socket::poll(items,500); 38 | 39 | if(items[0].hasInput()) 40 | { 41 | // Process all parts of the message 42 | do 43 | { 44 | frontend.recv(message); 45 | if(message.more()) backend.sendMore(message); 46 | else backend.send(message); 47 | } 48 | while(more); 49 | } 50 | if(items[1].hasInput()) 51 | { 52 | // Process all parts of the message 53 | do 54 | { 55 | backend.recv(message); 56 | if(message.more()) frontend.sendMore(message); 57 | else frontend.send(message); 58 | } 59 | while(more); 60 | } 61 | } 62 | } 63 | //+------------------------------------------------------------------+ 64 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter2/RRClient.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| RRClient.mq4 | 3 | //| Copyright 2017, Li Ding | 4 | //| dingmaotu@126.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2017, Li Ding" 7 | #property link "dingmaotu@126.com" 8 | #property version "1.00" 9 | #property strict 10 | #include 11 | //+------------------------------------------------------------------+ 12 | //| Request-reply client in MQL (adapted from C++ version) | 13 | //| Connects REQ socket to tcp://localhost:5559 | 14 | //| Sends "Hello" to server, expects "World" back | 15 | //| | 16 | //| Olivier Chamoux | 17 | //+------------------------------------------------------------------+ 18 | void OnStart() 19 | { 20 | Context context; 21 | 22 | Socket requester(context,ZMQ_REQ); 23 | requester.connect("tcp://localhost:5559"); 24 | 25 | for(int request=0; request<10; request++) 26 | { 27 | ZmqMsg message("Hello"); 28 | requester.send(message); 29 | 30 | ZmqMsg reply; 31 | requester.recv(reply,true); 32 | 33 | Print("Received reply ",reply.getData()); 34 | } 35 | } 36 | //+------------------------------------------------------------------+ 37 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter2/RRWorker.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| RRWorker.mq4 | 3 | //| Copyright 2017, Li Ding | 4 | //| dingmaotu@126.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2017, Li Ding" 7 | #property link "dingmaotu@126.com" 8 | #property version "1.00" 9 | #property strict 10 | #include 11 | //+------------------------------------------------------------------+ 12 | //| Request-reply service in MQL (adapted from C++ version) | 13 | //| Connects REP socket to tcp://localhost:5560 | 14 | //| Expects "Hello" from client, replies with "World" | 15 | //| | 16 | //| Olivier Chamoux | 17 | //+------------------------------------------------------------------+ 18 | void OnStart() 19 | { 20 | Context context; 21 | 22 | Socket responder(context,ZMQ_REP); 23 | responder.connect("tcp://localhost:5560"); 24 | 25 | while(!IsStopped()) 26 | { 27 | // Wait for next request from client 28 | ZmqMsg req; 29 | responder.recv(req); 30 | Print("Received request: ",req.getData()); 31 | 32 | // Do some 'work' 33 | Sleep(1000); 34 | 35 | ZmqMsg reply("World"); 36 | 37 | // Send reply back to client 38 | responder.send(reply); 39 | } 40 | } 41 | //+------------------------------------------------------------------+ 42 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter2/WUProxy.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| WUProxy.mq4 | 3 | //| Copyright 2017, Li Ding | 4 | //| dingmaotu@126.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2017, Li Ding" 7 | #property link "dingmaotu@126.com" 8 | #property version "1.00" 9 | #property strict 10 | #include 11 | //+------------------------------------------------------------------+ 12 | //| Weather proxy device MQL (adapted from C++) | 13 | //| | 14 | //| Olivier Chamoux | 15 | //+------------------------------------------------------------------+ 16 | void OnStart() 17 | { 18 | //--- 19 | Context context; 20 | 21 | // This is where the weather server sits 22 | Socket frontend(context,ZMQ_XSUB); 23 | frontend.connect("tcp://192.168.55.210:5556"); 24 | 25 | // This is our public endpoint for subscribers 26 | Socket backend(context,ZMQ_XPUB); 27 | backend.bind("tcp://10.1.1.0:8100"); 28 | 29 | // Subscribe on everything 30 | frontend.subscribe(""); 31 | 32 | // Shunt messages out to our own subscribers 33 | while(!IsStopped()) 34 | { 35 | // Process all parts of the message 36 | ZmqMsg message; 37 | bool more; 38 | do 39 | { 40 | frontend.recv(message); 41 | if(message.more()) backend.sendMore(message); 42 | else backend.send(message); 43 | } 44 | while(more); 45 | } 46 | } 47 | //+------------------------------------------------------------------+ 48 | -------------------------------------------------------------------------------- /MT5Resources/Scripts/ZeroMQGuideExamples/Chapter3/RTReqBroker.mq4: -------------------------------------------------------------------------------- 1 | //+------------------------------------------------------------------+ 2 | //| RTReqBroker.mq4 | 3 | //| Copyright 2017, Li Ding | 4 | //| dingmaotu@126.com | 5 | //+------------------------------------------------------------------+ 6 | #property copyright "Copyright 2017, Li Ding" 7 | #property link "dingmaotu@126.com" 8 | #property version "1.00" 9 | #property strict 10 | #property show_inputs 11 | //+------------------------------------------------------------------+ 12 | //| This example comes from the "Load Balancing Pattern" | 13 | //| The original example creates threads for workers and spawn them | 14 | //| in the broker main thread. MetaTrader Terminal does not support | 15 | //| thread creation. So we split the broker and worker code to two | 16 | //| scripts. Since we splitted the code, we need to wait all workers | 17 | //| connect. | 18 | //| This is the broker part. | 19 | //+------------------------------------------------------------------+ 20 | #include 21 | input int InpNumberWorkers=5; 22 | //+------------------------------------------------------------------+ 23 | //| Custom routing Router to Mama (ROUTER to REQ) (adapted from C++) | 24 | //| Olivier Chamoux | 25 | //+------------------------------------------------------------------+ 26 | void OnStart() 27 | { 28 | Context context("rtreq"); 29 | Socket broker(context,ZMQ_ROUTER); 30 | broker.bind("inproc://rtreq"); 31 | 32 | string identities[]; 33 | ArrayResize(identities,InpNumberWorkers); 34 | // Wait until InpNumberWorkers workers connected 35 | for(int i=0; i 11 | #property show_inputs 12 | //+------------------------------------------------------------------+ 13 | //| This example comes from the "Load Balancing Pattern" | 14 | //| The original example creates threads for workers and spawn them | 15 | //| in the broker main thread. MetaTrader Terminal does not support | 16 | //| thread creation. So we split the broker and worker code to two | 17 | //| scripts. Since we splitted the code, we need to wait all workers | 18 | //| connect. | 19 | //| This is the worker part. | 20 | //| For the worker, we can use either ZMQ_REQ or ZMQ_DEALER, the | 21 | //| difference is minimal. When using a dealer socket, remember to | 22 | //| send an empty frame to emulate the REQ behavior. | 23 | //+------------------------------------------------------------------+ 24 | 25 | #define within(num) (int) ((float) num * MathRand() / (32767 + 1.0)) 26 | 27 | input string InpWorkerIdentity="worker1"; 28 | //+------------------------------------------------------------------+ 29 | //| Custom routing Router to Mama (ROUTER to REQ) (adapted from C++) | 30 | //| The worker | 31 | //| Olivier Chamoux | 32 | //+------------------------------------------------------------------+ 33 | void OnStart() 34 | { 35 | //--- use inproc 36 | Context context("rtreq"); 37 | Socket worker(context,ZMQ_REQ); 38 | //--- We use a string identity for ease here 39 | worker.setIdentity(InpWorkerIdentity); 40 | worker.connect("inproc://rtreq"); 41 | 42 | ZmqMsg msg("Connect!"); 43 | worker.send(msg); 44 | worker.recv(msg); 45 | Print(InpWorkerIdentity," connect: ",msg.getData()); 46 | 47 | int total=0; 48 | while(!IsStopped()) 49 | { 50 | // Tell the broker we're ready for work 51 | worker.send("Hi Boss"); 52 | 53 | // Get workload from broker, until finished 54 | worker.recv(msg); 55 | string workload=msg.getData(); 56 | if("Fired!"==workload) 57 | { 58 | Print(InpWorkerIdentity," is fired!"); 59 | Print(InpWorkerIdentity," processed: ",total," tasks"); 60 | break; 61 | } 62 | else 63 | { 64 | Print(InpWorkerIdentity," received work!"); 65 | } 66 | total++; 67 | 68 | // Do some random work 69 | Sleep(within(500)+1); 70 | } 71 | } 72 | //+------------------------------------------------------------------+ 73 | -------------------------------------------------------------------------------- /Metatrader/info_mt5: -------------------------------------------------------------------------------- 1 | info mt5 2 | 3 | -------------------------------------------------------------------------------- /assets/fonts.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | /usr/share/fonts 12 | 13 | fonts 14 | 15 | ~/.fonts 16 | 17 | 18 | 19 | 20 | mono 21 | 22 | 23 | monospace 24 | 25 | 26 | 27 | 28 | 29 | 30 | sans serif 31 | 32 | 33 | sans-serif 34 | 35 | 36 | 37 | 38 | 39 | 40 | sans 41 | 42 | 43 | sans-serif 44 | 45 | 46 | 47 | 48 | 49 | true 50 | 51 | 52 | 53 | 54 | conf.d 55 | 56 | 57 | 58 | /var/cache/fontconfig 59 | fontconfig 60 | 61 | ~/.fontconfig 62 | 63 | 64 | 65 | 66 | 30 67 | 68 | 69 | 70 | 71 | sans 72 | Noto Sans 73 | 74 | 75 | monospace 76 | Noto Mono 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc-dark/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 7 2 | #define bullet_height 7 3 | static unsigned char bullet_bits[] = { 4 | 0x00, 0x00, 0x1c, 0x3e, 0x1c, 0x00, 0x00 }; 5 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc-dark/openbox-3/close.xbm: -------------------------------------------------------------------------------- 1 | #define close_width 12 2 | #define close_height 12 3 | static unsigned char close_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0xff, 0x07, 5 | 0xff, 0x07, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc-dark/openbox-3/desk.xbm: -------------------------------------------------------------------------------- 1 | #define desk_width 10 2 | #define desk_height 10 3 | static unsigned char desk_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xff, 0x03, 0xff, 0x03, 5 | 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc-dark/openbox-3/iconify.xbm: -------------------------------------------------------------------------------- 1 | #define iconify_width 10 2 | #define iconify_height 10 3 | static unsigned char iconify_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc-dark/openbox-3/max.xbm: -------------------------------------------------------------------------------- 1 | #define max_width 12 2 | #define max_height 12 3 | static unsigned char max_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x0f, 5 | 0x80, 0x0f, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc-dark/openbox-3/max_toggled.xbm: -------------------------------------------------------------------------------- 1 | #define max_toggled_width 10 2 | #define max_toggled_height 10 3 | static unsigned char max_toggled_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0xe0, 0x03, 5 | 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc-dark/openbox-3/shade.xbm: -------------------------------------------------------------------------------- 1 | #define shade_width 10 2 | #define shade_height 10 3 | static unsigned char shade_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xff, 0x03, 0xff, 0x03, 5 | 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 7 2 | #define bullet_height 7 3 | static unsigned char bullet_bits[] = { 4 | 0x00, 0x00, 0x1c, 0x3e, 0x1c, 0x00, 0x00 }; 5 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc/openbox-3/close.xbm: -------------------------------------------------------------------------------- 1 | #define close_width 12 2 | #define close_height 12 3 | static unsigned char close_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0xff, 0x07, 5 | 0xff, 0x07, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc/openbox-3/desk.xbm: -------------------------------------------------------------------------------- 1 | #define desk_width 10 2 | #define desk_height 10 3 | static unsigned char desk_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xff, 0x03, 0xff, 0x03, 5 | 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc/openbox-3/iconify.xbm: -------------------------------------------------------------------------------- 1 | #define iconify_width 10 2 | #define iconify_height 10 3 | static unsigned char iconify_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc/openbox-3/max.xbm: -------------------------------------------------------------------------------- 1 | #define max_width 12 2 | #define max_height 12 3 | static unsigned char max_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x0f, 5 | 0x80, 0x0f, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc/openbox-3/max_toggled.xbm: -------------------------------------------------------------------------------- 1 | #define max_toggled_width 10 2 | #define max_toggled_height 10 3 | static unsigned char max_toggled_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0xe0, 0x03, 5 | 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-arc/openbox-3/shade.xbm: -------------------------------------------------------------------------------- 1 | #define shade_width 10 2 | #define shade_height 10 3 | static unsigned char shade_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xff, 0x03, 0xff, 0x03, 5 | 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-grey/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 7 2 | #define bullet_height 7 3 | static unsigned char bullet_bits[] = { 4 | 0x00, 0x00, 0x1c, 0x3e, 0x1c, 0x00, 0x00 }; 5 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-grey/openbox-3/close-backup.xbm: -------------------------------------------------------------------------------- 1 | #define close_width 10 2 | #define close_height 10 3 | static unsigned char close_bits[] = { 4 | 0x00, 0x00, 0x78, 0x00, 0xfc, 0x00, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 5 | 0xfe, 0x01, 0xfc, 0x00, 0x78, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-grey/openbox-3/close.xbm: -------------------------------------------------------------------------------- 1 | #define close_width 12 2 | #define close_height 12 3 | static unsigned char close_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0xff, 0x07, 5 | 0xff, 0x07, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-grey/openbox-3/desk.xbm: -------------------------------------------------------------------------------- 1 | #define desk_width 10 2 | #define desk_height 10 3 | static unsigned char desk_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xff, 0x03, 0xff, 0x03, 5 | 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-grey/openbox-3/iconify.xbm: -------------------------------------------------------------------------------- 1 | #define iconify_width 10 2 | #define iconify_height 10 3 | static unsigned char iconify_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-grey/openbox-3/max.xbm: -------------------------------------------------------------------------------- 1 | #define max_width 12 2 | #define max_height 12 3 | static unsigned char max_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x0f, 5 | 0x80, 0x0f, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-grey/openbox-3/max_toggled.xbm: -------------------------------------------------------------------------------- 1 | #define max_toggled_width 10 2 | #define max_toggled_height 10 3 | static unsigned char max_toggled_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0xe0, 0x03, 5 | 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-grey/openbox-3/shade.xbm: -------------------------------------------------------------------------------- 1 | #define shade_width 10 2 | #define shade_height 10 3 | static unsigned char shade_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xff, 0x03, 0xff, 0x03, 5 | 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-plane/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 7 2 | #define bullet_height 7 3 | static unsigned char bullet_bits[] = { 4 | 0x00, 0x00, 0x1c, 0x3e, 0x1c, 0x00, 0x00 }; 5 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-plane/openbox-3/close.xbm: -------------------------------------------------------------------------------- 1 | #define close_width 12 2 | #define close_height 12 3 | static unsigned char close_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0xff, 0x07, 5 | 0xff, 0x07, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-plane/openbox-3/desk.xbm: -------------------------------------------------------------------------------- 1 | #define desk_width 10 2 | #define desk_height 10 3 | static unsigned char desk_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xff, 0x03, 0xff, 0x03, 5 | 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-plane/openbox-3/iconify.xbm: -------------------------------------------------------------------------------- 1 | #define iconify_width 10 2 | #define iconify_height 10 3 | static unsigned char iconify_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-plane/openbox-3/max.xbm: -------------------------------------------------------------------------------- 1 | #define max_width 12 2 | #define max_height 12 3 | static unsigned char max_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x0f, 5 | 0x80, 0x0f, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-plane/openbox-3/max_toggled.xbm: -------------------------------------------------------------------------------- 1 | #define max_toggled_width 10 2 | #define max_toggled_height 10 3 | static unsigned char max_toggled_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0xe0, 0x03, 5 | 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/mayday-plane/openbox-3/shade.xbm: -------------------------------------------------------------------------------- 1 | #define shade_width 10 2 | #define shade_height 10 3 | static unsigned char shade_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xff, 0x03, 0xff, 0x03, 5 | 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/thesis/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 10 2 | #define bullet_height 10 3 | static unsigned char bullet_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 6 | -------------------------------------------------------------------------------- /assets/openbox/mayday/thesis/openbox-3/close.xbm: -------------------------------------------------------------------------------- 1 | #define close_width 14 2 | #define close_height 14 3 | static unsigned char close_bits[] = { 4 | 0xe0, 0x01, 0xf8, 0x07, 0xfc, 0x0f, 0xfe, 0x1f, 0xce, 0x1c, 0x0f, 0x3c, 5 | 0x1f, 0x3e, 0x1f, 0x3e, 0x0f, 0x3c, 0xce, 0x1c, 0xfe, 0x1f, 0xfc, 0x0f, 6 | 0xf8, 0x07, 0xe0, 0x01 }; 7 | -------------------------------------------------------------------------------- /assets/openbox/mayday/thesis/openbox-3/desk.xbm: -------------------------------------------------------------------------------- 1 | #define desk_width 14 2 | #define desk_height 14 3 | static unsigned char desk_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 5 | 0xf8, 0x07, 0xf8, 0x07, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00 }; 7 | -------------------------------------------------------------------------------- /assets/openbox/mayday/thesis/openbox-3/iconify.xbm: -------------------------------------------------------------------------------- 1 | #define iconify_width 14 2 | #define iconify_height 14 3 | static unsigned char iconify_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0xf0, 0x03, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00 }; 7 | -------------------------------------------------------------------------------- /assets/openbox/mayday/thesis/openbox-3/max.xbm: -------------------------------------------------------------------------------- 1 | #define max_width 14 2 | #define max_height 14 3 | static unsigned char max_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x80, 0x03, 5 | 0x10, 0x03, 0x30, 0x02, 0x70, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00 }; 7 | -------------------------------------------------------------------------------- /assets/openbox/mayday/thesis/openbox-3/shade.xbm: -------------------------------------------------------------------------------- 1 | #define shade_width 14 2 | #define shade_height 14 3 | static unsigned char shade_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xe0, 0x01, 5 | 0xf0, 0x03, 0xf8, 0x07, 0x00, 0x00, 0xf8, 0x07, 0xf8, 0x07, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00 }; 7 | -------------------------------------------------------------------------------- /assets/openbox/mayday/thesis/openbox-3/themerc: -------------------------------------------------------------------------------- 1 | # Decorator 2 | window.active.title.bg.color: #2f343f 3 | window.inactive.title.bg.color: #2f343f 4 | window.*.label.text.color: #d8dee8 5 | window.*.button.*.image.color: #d8dee8 6 | 7 | # Borders 8 | window.handle.width: 0 9 | window.client.padding.width: 0 10 | border.width: 0 11 | 12 | # Title 13 | padding.width: 10 14 | padding.height: 8 15 | window.*.title.bg: Solid Flat 16 | window.*.*.bg: Parentrelative 17 | window.label.text.justify: center 18 | 19 | # Menu 20 | menu.border.width: 6 21 | menu.separator.width: 2 22 | menu.separator.padding.width: 10 23 | menu.separator.padding.height: 2 24 | menu.overlap.x: -8 25 | menu.*.bg: flat solid 26 | menu.*.bg.color: #2f343f 27 | menu.*.color: #2f343f 28 | menu.title.text.color: #ffffff 29 | menu.items.text.color: #d8dee8 30 | menu.items.active.disabled.text.color: #707070 31 | menu.items.active.text.color: #d8dee8 32 | menu.title.text.justify: center 33 | menu.items.active.bg.color: #5294e2 34 | 35 | # OSD 36 | osd.border.width: 1 37 | osd.border.color: #2f343f 38 | osd.bg: flat solid 39 | osd.bg.color: #2f343f 40 | osd.label.bg: flat solid 41 | osd.label.bg.color: #2f343f 42 | osd.hilight.bg: flat solid 43 | osd.hilight.bg.color: #ef6b7b 44 | 45 | # Colour Trick 46 | window.active.button.close.unpressed.image.color: #ef6b7b 47 | window.inactive.button.close.unpressed.image.color: #bf616a 48 | -------------------------------------------------------------------------------- /assets/openbox/menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | /usr/bin/st 12 | 13 | 14 | 15 | 16 | 17 | yes 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /assets/slim/alpinelinux/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/assets/slim/alpinelinux/background.png -------------------------------------------------------------------------------- /assets/slim/alpinelinux/panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/assets/slim/alpinelinux/panel.png -------------------------------------------------------------------------------- /assets/slim/alpinelinux/slim.theme: -------------------------------------------------------------------------------- 1 | 2 | # Messages 3 | msg_color #FFFFFF 4 | msg_font Sans:size=16:bold 5 | msg_shadow_xoffset 1 6 | msg_shadow_yoffset 1 7 | msg_shadow_color #aaaaaa 8 | 9 | # Screen background style. Valid values: stretch, tile 10 | background_style stretch 11 | 12 | # Input controls 13 | input_panel_x 50% 14 | input_panel_y 50% 15 | input_name_x 160 16 | input_name_y 107 17 | input_pass_x 160 18 | input_pass_y 163 19 | 20 | input_font Sans:size=12 21 | input_color #000000 22 | input_bgcolor #000000 23 | input_fgcolor #ffffff 24 | 25 | # Welcome message 26 | welcome_font Sans:size=20:bold 27 | welcome_color #ffffff 28 | welcome_x 33 29 | welcome_y 55 30 | welcome_msg %host login: 31 | welcome_shadow_xoffset 2 32 | welcome_shadow_yoffset 2 33 | welcome_shadow_color #333333 34 | 35 | 36 | username_msg username: 37 | username_font Sans:size=14:bold 38 | username_color #f5f4fd 39 | username_x 35 40 | username_y 110 41 | 42 | password_msg password: 43 | password_color #f5f4fd 44 | password_x 35 45 | password_y 165 46 | -------------------------------------------------------------------------------- /assets/slim/slim.conf: -------------------------------------------------------------------------------- 1 | # Path, X server and arguments (if needed) 2 | # Note: -xauth $authfile is automatically appended 3 | default_path /bin:/usr/bin:/usr/local/bin 4 | default_xserver /usr/bin/X 5 | xserver_arguments -nolisten tcp vt07 6 | 7 | # Commands for halt, login, etc. 8 | halt_cmd /sbin/poweroff 9 | reboot_cmd /sbin/reboot 10 | console_cmd /usr/bin/terminal 11 | #suspend_cmd /usr/sbin/suspend 12 | 13 | # Full path to the xauth binary 14 | xauth_path /usr/bin/xauth 15 | 16 | # Xauth file for server 17 | authfile /var/run/slim.auth 18 | 19 | 20 | # Activate numlock when slim starts. Valid values: on|off 21 | # numlock on 22 | 23 | # Hide the mouse cursor (note: does not work with some WMs). 24 | # Valid values: true|false 25 | # hidecursor false 26 | 27 | # This command is executed after a succesful login. 28 | # you can place the %session and %theme variables 29 | # to handle launching of specific commands in .xinitrc 30 | # depending of chosen session and slim theme 31 | # 32 | # NOTE: if your system does not have bash you need 33 | # to adjust the command according to your preferred shell, 34 | # i.e. for freebsd use: 35 | # login_cmd exec /bin/sh -l /etc/X11/xinit/xinitrc 36 | login_cmd exec /bin/sh -l /etc/X11/xinit/Xsession openbox 37 | 38 | # Commands executed when starting and exiting a session. 39 | # They can be used for registering a X11 session with 40 | # sessreg. You can use the %user variable 41 | # 42 | # sessionstart_cmd some command 43 | # sessionstop_cmd some command 44 | 45 | # Start in daemon mode. Valid values: yes | no 46 | # Note that this can be overriden by the command line 47 | # options "-d" and "-nodaemon" 48 | # daemon yes 49 | 50 | # Available sessions (first one is the default). 51 | # The current chosen session name is replaced in the login_cmd exec /bin/sh -l /etc/X11/xinit/xinitrc 52 | # above, so your login command can handle different sessions. 53 | # see the xinitrc.sample file shipped with slim sources 54 | sessions openbox 55 | 56 | # Executed when pressing F11 (requires scrot) 57 | screenshot_cmd scrot /slim.png 58 | 59 | # welcome message. Available variables: %host, %domain 60 | welcome_msg Welcome to %host 61 | 62 | # Session message. Prepended to the session name when pressing F1 63 | # session_msg Session: 64 | 65 | # shutdown / reboot messages 66 | shutdown_msg The system is halting... 67 | reboot_msg The system is rebooting... 68 | 69 | # default user, leave blank or remove this line 70 | # for avoid pre-loading the username. 71 | #default_user alpine 72 | 73 | # Focus the password field on start when default_user is set 74 | # Set to "yes" to enable this feature 75 | #focus_password no 76 | 77 | # Automatically login the default user (without entering 78 | # the password. Set to "yes" to enable this feature 79 | #auto_login no 80 | 81 | 82 | # current theme, use comma separated list to specify a set to 83 | # randomly choose from 84 | current_theme alpinelinux 85 | 86 | # Lock file 87 | lockfile /var/lock/slim.lock 88 | 89 | # Log file 90 | logfile /var/log/slim.log 91 | -------------------------------------------------------------------------------- /assets/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | winecfg 4 | WINEPREFIX=/root/.wine 5 | WINEARCH=win64 6 | 7 | -------------------------------------------------------------------------------- /assets/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | user=root 4 | 5 | [program:slim] 6 | command=slim 7 | autorestart=true 8 | priority=100 9 | 10 | [program:x11vnc] 11 | command=/root/x11vnc-session.sh 12 | autorestart=true 13 | priority=200 14 | 15 | [program:dbus] 16 | command=/usr/bin/dbus-daemon --system --nofork 17 | user=root 18 | autorestart=true 19 | priority=300 20 | 21 | [program:envstart] 22 | command=/root/start.sh 23 | autorestart=true 24 | priority=400 25 | 26 | [unix_http_server] 27 | file = /tmp/supervisor.sock 28 | chmod = 0777 29 | chown= nobody:nogroup 30 | username = $USER 31 | password = $PASSWORD 32 | 33 | [supervisorctl] 34 | serverurl = unix:///tmp/supervisor.sock 35 | username = $USER 36 | password = $PASSWORD 37 | prompt = supervisor 38 | 39 | 40 | [program:metatrader] 41 | command=/usr/bin/wine /root/Metatrader/terminal64.exe /portable 42 | autorestart=true 43 | stdout_logfile=/dev/fd/1 44 | stdout_logfile_maxbytes=0 45 | redirect_stderr=true 46 | 47 | 48 | 49 | 50 | [rpcinterface:supervisor] 51 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 52 | -------------------------------------------------------------------------------- /assets/x11vnc-session.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -repeat -nopw -wait 5 -permitfiletransfer -tightfilexfer -auth /var/run/slim.auth 3 | #/usr/bin/supervisorctl restart slim 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/xinit/Xresources: -------------------------------------------------------------------------------- 1 | *foreground: #00cc00 2 | *foreground_bold: #a8a19f 3 | *cursor: #a8a19f 4 | *background: #1b1918 5 | !!*background: rgba(0, 0, 0, .7) 6 | 7 | !! black 8 | *color0: #1b1918 9 | *color8: #766e6b 10 | !! red 11 | *color1: #f22c40 12 | *color9: #f22c40 13 | !! green 14 | *color2: #5ab738 15 | *color10: #5ab738 16 | !! yellow 17 | *color3: #d5911a 18 | *color11: #d5911a 19 | !! blue 20 | *color4: #407ee7 21 | *color12: #407ee7 22 | !! magenta 23 | *color5: #6666ea 24 | *color13: #6666ea 25 | !! cyan 26 | *color6: #00ad9c 27 | *color14: #00ad9c 28 | !! white 29 | *color7: #a8a19f 30 | *color15: #f1efee 31 | 32 | URxvt.intensityStyles: false 33 | URxvt.background: [90]#000000 34 | URxvt.depth: 32 35 | URxvt.font: xft:monospace:size=12 36 | URxvt.scrollBar: false 37 | URxvt.cursorColor: white 38 | 39 | !! Extensions 40 | URxvt.perl-ext-common: default,matcher,resize-font,url-select,keyboard-select 41 | URxvt.colorUL: #4682B4 42 | 43 | !! url-select 44 | URxvt.keysym.M-u: perl:url-select:select_next 45 | URxvt.url-select.launcher: webview 46 | URxvt.url-select.underline: true 47 | 48 | !! keyboard-select: 49 | URxvt.keysym.M-Escape: perl:keyboard-select:activate 50 | 51 | !! resize-font 52 | URxvt.resize-font.smaller: C-Down 53 | URxvt.resize-font.bigger: C-Up 54 | 55 | !! Standard selection using clipboard 56 | URxvt.keysym.Shift-Control-V: eval:paste_clipboard 57 | URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard 58 | URxvt*iso14755: False 59 | 60 | !! Matcher 61 | URxvt.url-launcher: webview 62 | URxvt.matcher.button: 1 63 | 64 | rofi.color-enabled: true 65 | rofi.color-window: #000, #000, #000 66 | rofi.color-normal: #111, #819396, #222, #008ed4, #ffffff 67 | rofi.color-active: #002b37, #008ed4, #003643, #008ed4, #66c6ff 68 | rofi.color-urgent: #002b37, #da4281, #003643, #008ed4, #890661 69 | 70 | rofi.fake-transparency: true 71 | rofi.lines: 3 72 | rofi.bw: 0 73 | rofi.opacity: "10" 74 | rofi.hide-scrollbar: true 75 | rofi.width: 30 76 | -------------------------------------------------------------------------------- /assets/xinit/xinitrc.d/00-terminal-prompt: -------------------------------------------------------------------------------- 1 | export PS1="\e[33m\u:\e[31m\W\e[33m>\e[0m " 2 | -------------------------------------------------------------------------------- /assets/xorg.conf: -------------------------------------------------------------------------------- 1 | Section "Device" 2 | Identifier "Dummy" 3 | Driver "dummy" 4 | VideoRam 256000 5 | Option "IgnoreEDID" "true" 6 | Option "NoDDC" "true" 7 | EndSection 8 | 9 | Section "Module" 10 | Load "dbe" 11 | Load "extmod" 12 | Load "freetype" 13 | Load "glx" 14 | EndSection 15 | 16 | Section "Monitor" 17 | Identifier "Monitor" 18 | HorizSync 15.0-100.0 19 | VertRefresh 15.0-200.0 20 | Option "DPMS" 21 | EndSection 22 | 23 | Section "Screen" 24 | Identifier "Screen" 25 | Monitor "Monitor" 26 | Device "Dummy" 27 | DefaultDepth 24 28 | SubSection "Display" 29 | Depth 24 30 | Modes "1920x1080" "1280x1024" 31 | EndSubSection 32 | EndSection 33 | -------------------------------------------------------------------------------- /assets/xorg.conf.d/00-nopo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/assets/xorg.conf.d/00-nopo -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | metatrader: 4 | build: . 5 | ports: 6 | - "5900:5900" 7 | - "15555:15555" 8 | - "15556:15556" 9 | - "15557:15557" 10 | - "15558:15558" 11 | volumes: 12 | - ./Metatrader:/root/Metatrader 13 | 14 | 15 | -------------------------------------------------------------------------------- /docker_executable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Carga la imagen desde el archivo tar 4 | docker load -i pyzmq.tar 5 | 6 | # Cambia el nombre de la imagen 7 | docker tag ejtrader/pyzmq:dev pyzmq:dev 8 | 9 | # Inicia Docker Compose 10 | docker-compose up -d 11 | 12 | -------------------------------------------------------------------------------- /images/attach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/images/attach.png -------------------------------------------------------------------------------- /images/init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/images/init.png -------------------------------------------------------------------------------- /images/mt5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/images/mt5.png -------------------------------------------------------------------------------- /images/options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/images/options.png -------------------------------------------------------------------------------- /images/vnc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/images/vnc.png -------------------------------------------------------------------------------- /pyzmq.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartLever/Docker_mt5/b89d335371bbb3234a3deb8ab2c779d6c57e2204/pyzmq.tar -------------------------------------------------------------------------------- /st/LEGACY: -------------------------------------------------------------------------------- 1 | A STATEMENT ON LEGACY SUPPORT 2 | 3 | In the terminal world there is much cruft that comes from old and unsup‐ 4 | ported terminals that inherit incompatible modes and escape sequences 5 | which noone is able to know, except when he/she comes from that time and 6 | developed a graphical vt100 emulator at that time. 7 | 8 | One goal of st is to only support what is really needed. When you en‐ 9 | counter a sequence which you really need, implement it. But while you 10 | are at it, do not add the other cruft you might encounter while sneek‐ 11 | ing at other terminal emulators. History has bloated them and there is 12 | no real evidence that most of the sequences are used today. 13 | 14 | 15 | Christoph Lohmann <20h@r-36.net> 16 | 2012-09-13T07:00:36.081271045+02:00 17 | 18 | -------------------------------------------------------------------------------- /st/LICENSE: -------------------------------------------------------------------------------- 1 | MIT/X Consortium License 2 | 3 | © 2009-2012 Aurélien APTEL 4 | © 2009 Anselm R Garbe 5 | © 2012-2016 Roberto E. Vargas Caballero 6 | © 2012-2016 Christoph Lohmann <20h at r-36 dot net> 7 | © 2013 Eon S. Jeon 8 | © 2013 Alexander Sedov 9 | © 2013 Mark Edgar 10 | © 2013 Eric Pruitt 11 | © 2013 Michael Forney 12 | © 2013-2014 Markus Teich 13 | © 2014-2015 Laslo Hunhold 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a 16 | copy of this software and associated documentation files (the "Software"), 17 | to deal in the Software without restriction, including without limitation 18 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 19 | and/or sell copies of the Software, and to permit persons to whom the 20 | Software is furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in 23 | all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 28 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 30 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 31 | DEALINGS IN THE SOFTWARE. 32 | -------------------------------------------------------------------------------- /st/Makefile: -------------------------------------------------------------------------------- 1 | # st - simple terminal 2 | # See LICENSE file for copyright and license details. 3 | 4 | include config.mk 5 | 6 | SRC = st.c 7 | OBJ = ${SRC:.c=.o} 8 | 9 | all: options st 10 | 11 | options: 12 | @echo st build options: 13 | @echo "CFLAGS = ${CFLAGS}" 14 | @echo "LDFLAGS = ${LDFLAGS}" 15 | @echo "CC = ${CC}" 16 | 17 | config.h: 18 | cp config.def.h config.h 19 | 20 | .c.o: 21 | @echo CC $< 22 | @${CC} -c ${CFLAGS} $< 23 | 24 | ${OBJ}: config.h config.mk 25 | 26 | st: ${OBJ} 27 | @echo CC -o $@ 28 | @${CC} -o $@ ${OBJ} ${LDFLAGS} 29 | 30 | clean: 31 | @echo cleaning 32 | @rm -f config.h st ${OBJ} st-${VERSION}.tar.gz 33 | 34 | dist: clean 35 | @echo creating dist tarball 36 | @mkdir -p st-${VERSION} 37 | @cp -R LICENSE Makefile README config.mk config.def.h st.info st.1 arg.h ${SRC} st-${VERSION} 38 | @tar -cf st-${VERSION}.tar st-${VERSION} 39 | @gzip st-${VERSION}.tar 40 | @rm -rf st-${VERSION} 41 | 42 | install: all 43 | @echo installing executable file to ${DESTDIR}${PREFIX}/bin 44 | @mkdir -p ${DESTDIR}${PREFIX}/bin 45 | @cp -f st ${DESTDIR}${PREFIX}/bin 46 | @chmod 755 ${DESTDIR}${PREFIX}/bin/st 47 | @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 48 | @mkdir -p ${DESTDIR}${MANPREFIX}/man1 49 | @sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1 50 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1 51 | @echo Please see the README file regarding the terminfo entry of st. 52 | @tic -sx st.info 53 | 54 | uninstall: 55 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin 56 | @rm -f ${DESTDIR}${PREFIX}/bin/st 57 | @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 58 | @rm -f ${DESTDIR}${MANPREFIX}/man1/st.1 59 | 60 | .PHONY: all options clean dist install uninstall 61 | -------------------------------------------------------------------------------- /st/README.md: -------------------------------------------------------------------------------- 1 | # Denis's build of st - the simple (suckless) terminal 2 | 3 | Forked from [https://github.com/LukeSmithxyz/st](https://github.com/LukeSmithxyz/st) for simplicity's sake, which is the [suckless terminal (st)](https://st.suckless.org/) with some patches added: 4 | 5 | + transparency 6 | + copy to clipboard 7 | + solarized colors (light and dark toggleable) 8 | + vertcenter 9 | + scrollback with keyboard 10 | + scrollback with mouse 11 | 12 | ## My additions 13 | 14 | + Changed key-binding for solarized color switch to M-s 15 | 16 | ## Luke's additions 17 | 18 | + Default font is system "mono" at 14pt 19 | + Fixed transparency patch (see below for installation) 20 | + Toggle light/dark mode now Alt-Tab instead of the frequently conflicting F6 21 | + Alt-k and Alt-j scroll back/foward in history one line at a time 22 | + Alt-u and Alt-d scroll back/foward in history a page at a time 23 | 24 | ## Terminal-specific mappings 25 | 26 | (Additions before Luke.) 27 | 28 | + Scroll through history -- Shift+PageUp/PageDown or Shift+Mouse wheel 29 | + Increase/decrease font size -- Shift+Alt+PageUp/PageDown 30 | + Return to default font size -- Shift+Alt+Home 31 | + Paste -- Shift+Insert 32 | 33 | ## Installation for newbs 34 | 35 | ``` 36 | make 37 | sudo make install 38 | ``` 39 | 40 | ### Solarized mode 41 | 42 | The terminal is now transparent by default, if you want non-transparent solarized colors, run the following: 43 | 44 | ``` 45 | make clean 46 | patch -R < patches/transparency.diff 47 | make 48 | sudo make install 49 | ``` 50 | 51 | You can change the transparency value by changing the `alpha` variable in the `config.h` file. 52 | -------------------------------------------------------------------------------- /st/TODO: -------------------------------------------------------------------------------- 1 | vt emulation 2 | ------------ 3 | 4 | * double-height support 5 | 6 | code & interface 7 | ---------------- 8 | 9 | * add a simple way to do multiplexing 10 | 11 | drawing 12 | ------- 13 | * add diacritics support to xdraws() 14 | * switch to a suckless font drawing library 15 | * make the font cache simpler 16 | * add better support for brightening of the upper colors 17 | 18 | bugs 19 | ---- 20 | 21 | * fix shift up/down (shift selection in emacs) 22 | * remove DEC test sequence when appropriate 23 | 24 | misc 25 | ---- 26 | 27 | $ grep -nE 'XXX|TODO' st.c 28 | 29 | -------------------------------------------------------------------------------- /st/arg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copy me if you can. 3 | * by 20h 4 | */ 5 | 6 | #ifndef ARG_H__ 7 | #define ARG_H__ 8 | 9 | extern char *argv0; 10 | 11 | /* use main(int argc, char *argv[]) */ 12 | #define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ 13 | argv[0] && argv[0][0] == '-'\ 14 | && argv[0][1];\ 15 | argc--, argv++) {\ 16 | char argc_;\ 17 | char **argv_;\ 18 | int brk_;\ 19 | if (argv[0][1] == '-' && argv[0][2] == '\0') {\ 20 | argv++;\ 21 | argc--;\ 22 | break;\ 23 | }\ 24 | for (brk_ = 0, argv[0]++, argv_ = argv;\ 25 | argv[0][0] && !brk_;\ 26 | argv[0]++) {\ 27 | if (argv_ != argv)\ 28 | break;\ 29 | argc_ = argv[0][0];\ 30 | switch (argc_) 31 | #define ARGEND }\ 32 | } 33 | 34 | #define ARGC() argc_ 35 | 36 | #define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ 37 | ((x), abort(), (char *)0) :\ 38 | (brk_ = 1, (argv[0][1] != '\0')?\ 39 | (&argv[0][1]) :\ 40 | (argc--, argv++, argv[0]))) 41 | 42 | #define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ 43 | (char *)0 :\ 44 | (brk_ = 1, (argv[0][1] != '\0')?\ 45 | (&argv[0][1]) :\ 46 | (argc--, argv++, argv[0]))) 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /st/config.mk: -------------------------------------------------------------------------------- 1 | # st version 2 | VERSION = 0.7 3 | 4 | # Customize below to fit your system 5 | 6 | # paths 7 | PREFIX = /usr/local 8 | MANPREFIX = ${PREFIX}/share/man 9 | 10 | X11INC = /usr/X11R6/include 11 | X11LIB = /usr/X11R6/lib 12 | 13 | # includes and libs 14 | INCS = -I. -I/usr/include -I${X11INC} \ 15 | `pkg-config --cflags fontconfig` \ 16 | `pkg-config --cflags freetype2` 17 | LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lrt -lX11 -lutil -lXext -lXft -lXrender\ 18 | `pkg-config --libs fontconfig` \ 19 | `pkg-config --libs freetype2` 20 | 21 | # flags 22 | CPPFLAGS = -DVERSION=\"${VERSION}\" -D_XOPEN_SOURCE=600 23 | CFLAGS += -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os ${INCS} ${CPPFLAGS} 24 | LDFLAGS += -g ${LIBS} 25 | 26 | # compiler and linker 27 | # CC = cc 28 | 29 | -------------------------------------------------------------------------------- /st/patches/st-clipboard-20160727-308bfbf.diff: -------------------------------------------------------------------------------- 1 | diff --git a/st.c b/st.c 2 | index 2594c65..ebdde9f 100644 3 | --- a/st.c 4 | +++ b/st.c 5 | @@ -1263,6 +1263,8 @@ xsetsel(char *str, Time t) 6 | XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t); 7 | if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win) 8 | selclear(0); 9 | + 10 | + clipcopy(NULL); 11 | } 12 | 13 | void 14 | -------------------------------------------------------------------------------- /st/patches/st-no_bold_colors-20160727-308bfbf.diff: -------------------------------------------------------------------------------- 1 | diff --git a/st.c b/st.c 2 | index 2594c65..f6fe717 100644 3 | --- a/st.c 4 | +++ b/st.c 5 | @@ -3719,7 +3719,7 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i 6 | 7 | /* Change basic system colors [0-7] to bright system colors [8-15] */ 8 | if ((base.mode & ATTR_BOLD_FAINT) == ATTR_BOLD && BETWEEN(base.fg, 0, 7)) 9 | - fg = &dc.col[base.fg + 8]; 10 | + fg = &dc.col[base.fg]; 11 | 12 | if (IS_SET(MODE_REVERSE)) { 13 | if (fg == &dc.col[defaultfg]) { 14 | -------------------------------------------------------------------------------- /st/patches/st-scrollback-mouse-20161020-6e79e83.diff: -------------------------------------------------------------------------------- 1 | diff --git a/config.def.h b/config.def.h 2 | index eae969e..34ebb44 100644 3 | --- a/config.def.h 4 | +++ b/config.def.h 5 | @@ -152,8 +152,14 @@ static unsigned int defaultunderline = 7; 6 | */ 7 | static MouseShortcut mshortcuts[] = { 8 | /* button mask string */ 9 | - { Button4, XK_ANY_MOD, "\031" }, 10 | - { Button5, XK_ANY_MOD, "\005" }, 11 | + { Button4, XK_NO_MOD, "\031" }, 12 | + { Button5, XK_NO_MOD, "\005" }, 13 | +}; 14 | + 15 | +static MouseKey mkeys[] = { 16 | + /* button mask function argument */ 17 | + { Button4, ShiftMask, kscrollup, {.i = 1} }, 18 | + { Button5, ShiftMask, kscrolldown, {.i = 1} }, 19 | }; 20 | 21 | /* Internal keyboard shortcuts. */ 22 | diff --git a/st.c b/st.c 23 | index 233d301..c71b6e7 100644 24 | --- a/st.c 25 | +++ b/st.c 26 | @@ -299,6 +299,13 @@ typedef union { 27 | const void *v; 28 | } Arg; 29 | 30 | +typedef struct { 31 | + uint b; 32 | + uint mask; 33 | + void (*func)(const Arg *); 34 | + const Arg arg; 35 | +} MouseKey; 36 | + 37 | typedef struct { 38 | uint mod; 39 | KeySym keysym; 40 | @@ -953,6 +960,7 @@ bpress(XEvent *e) 41 | { 42 | struct timespec now; 43 | MouseShortcut *ms; 44 | + MouseKey *mk; 45 | 46 | if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { 47 | mousereport(e); 48 | @@ -967,6 +975,14 @@ bpress(XEvent *e) 49 | } 50 | } 51 | 52 | + for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) { 53 | + if (e->xbutton.button == mk->b 54 | + && match(mk->mask, e->xbutton.state)) { 55 | + mk->func(&mk->arg); 56 | + return; 57 | + } 58 | + } 59 | + 60 | if (e->xbutton.button == Button1) { 61 | clock_gettime(CLOCK_MONOTONIC, &now); 62 | 63 | -------------------------------------------------------------------------------- /st/patches/st-vertcenter-20160819-023225e.diff: -------------------------------------------------------------------------------- 1 | diff --git a/st.c b/st.c 2 | index 2594c65..7285237 100644 3 | --- a/st.c 4 | +++ b/st.c 5 | @@ -268,6 +268,7 @@ typedef struct { 6 | int w, h; /* window width and height */ 7 | int ch; /* char height */ 8 | int cw; /* char width */ 9 | + int cyo; /* char y offset */ 10 | char state; /* focus, redraw, visible */ 11 | int cursor; /* cursor style */ 12 | } XWindow; 13 | @@ -3359,6 +3360,7 @@ xloadfonts(char *fontstr, double fontsize) 14 | /* Setting character width and height. */ 15 | xw.cw = ceilf(dc.font.width * cwscale); 16 | xw.ch = ceilf(dc.font.height * chscale); 17 | + xw.cyo = ceilf(dc.font.height * (chscale - 1) / 2); 18 | 19 | FcPatternDel(pattern, FC_SLANT); 20 | FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC); 21 | @@ -3584,7 +3586,7 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x 22 | font = &dc.bfont; 23 | frcflags = FRC_BOLD; 24 | } 25 | - yp = winy + font->ascent; 26 | + yp = winy + font->ascent + xw.cyo; 27 | } 28 | 29 | /* Lookup character index with default font. */ 30 | @@ -3796,12 +3798,12 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i 31 | 32 | /* Render underline and strikethrough. */ 33 | if (base.mode & ATTR_UNDERLINE) { 34 | - XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1, 35 | + XftDrawRect(xw.draw, fg, winx, winy + xw.cyo + dc.font.ascent + 1, 36 | width, 1); 37 | } 38 | 39 | if (base.mode & ATTR_STRUCK) { 40 | - XftDrawRect(xw.draw, fg, winx, winy + 2 * dc.font.ascent / 3, 41 | + XftDrawRect(xw.draw, fg, winx, winy + xw.cyo + 2 * dc.font.ascent / 3, 42 | width, 1); 43 | } 44 | 45 | --------------------------------------------------------------------------------