421 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
78
views
How to specify the color of an indicator used in expert adviser?
My Expert Advisor uses two Moving Averages (MAs). I want them to be displayed on the chart with two distinct colors, like in this example:
However, my EA draws both of them with the default color (...
Degger's user avatar
- 4,323
0
votes
0
answers
91
views
MQL5 SocketConnect fails with error 4014 connecting to local TCP server
I’m developing an MQL5 Expert Advisor that should connect to a local TCP server (127.0.0.1:5001).
The server is running and responds correctly to Telnet.
In MetaTrader, I added 127.0.0.1:5001 in ...
0
votes
0
answers
48
views
Make Fractal Indicator to start FRom Desired Candle number
Hi i Want to make this show Fractal from My desired Candle Index Number TO Latest Candle
but if i change start to a number and rate total-3 in for Loop It doesn't work what would I Do ?
i want to test ...
1
vote
1
answer
200
views
What does MQL5 ObjectGetInteger(0, ObjectName(0, i, 0, -1), OBJPROP_TYPE) give us?
I think the type of an object with an index i must be found by the following code:
ObjectGetInteger(0, ObjectName(0, i, 0, -1), OBJPROP_TYPE)
But this does not give me the index. The above code gives ...
0
votes
1
answer
78
views
Is there a way to draw a dashed line on a MQL5 chart that contains two colors?
I have an indicator that draws dashed lines in red or blue as needed for support and resistance levels. However, I have a difficult time seeing the lines on the black background charts, so I would ...
0
votes
1
answer
59
views
Can we put void OnInit() and int OnCalculate() in one page?
When I write this code in MetaEditor:
#include <Trade\Trade.mqh>
CTrade md;
void OnInit()
{
md.BuyLimit(0.01, 3370, _Symbol, 0, 0,ORDER_TIME_DAY, 0, NULL);
}
It works. But when I ...
0
votes
1
answer
63
views
ChartHeightInPixelsSet in MQL5 does not work
I have written the following codes in my Metaeditor, but it does not work.
void OnInit()
{
ChartHeightInPixelsSet(500, 0, 1);
}
bool ChartHeightInPixelsSet(const int value,const long chart_ID=0,const ...
0
votes
0
answers
162
views
MQL5: Unable to load DLL despite adding it to /Libraries
I've created a DLL that more or less looks like this:
#pragma once
#ifdef _WIN32
#ifdef ZMQL_EXPORTS
#define ZMQL_EXPORT extern "C" __declspec(dllexport)
#else
#define ZMQL_EXPORT extern &...
0
votes
1
answer
63
views
How can I detect when MACD visually touches the RSI in an MQL4/MQL5 indicator window for trade signals?
I'm developing an Expert Advisor in MQL4/MQL5 that should trigger trade orders based on the visual interaction of two indicators—the MACD and the RSI—displayed in the same indicator window. The idea ...
0
votes
0
answers
54
views
Error with use ONNX model from CatBoost in MQL5
I have a Python script that uses CatBoost to create and save two models in ONNX format - a classification model and a regression model.
The first model contains direction (up/down) and probability, ...
2
votes
1
answer
51
views
MACD in Debugging Mode and not plotting the oscillator
I’m developing an MQL5 Expert Advisor based on MACD crossovers
//+------------------------------------------------------------------+
//| Expert initialization function ...
0
votes
1
answer
30
views
Can we create more than 2 buttons in a msgbox in mql5?
With the command msgbox we can create a msgbox that has two buttons "Yes" or "No". But Can we create more than 2 buttons (for example 6 buttons) in a msgbox(by mql5)?
1
vote
0
answers
98
views
MQL5 Position closing function does not close positions as expected, where am I wrong?
I'm developing an EA in MQL5 that should automatically close open positions when the money profit reaches or exceeds a profit target of 20 or falls to -100. I have tried using both trade.PositionClose(...
0
votes
0
answers
45
views
MQL4 Multiple Timeframe and Indicator Checking
I am redesigning EA, so it can have more accuracy and flexibility.
Original code :
if(
iRSI(gRandomSymbol,PERIOD_M1,RSI_Period,RSI_AppliedPrice,RSI_shift) > ...
0
votes
0
answers
27
views
How do we draw trend lines without using Object Create?
I have the following property
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_plots 1
#property indicator_label1 "Trendline"
#property indicator_type1 ...