Features of the mql5 language, subtleties and tricks - page 63
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It sets the flag to hide indicators called by the Expert Advisor.
This requires that an EA "wire" is running in parallel, i.e. an auxiliary chart is required.
The situation in the example is somewhat different: there is one chart and some EA is already running on it. And we want to run OrderSend through the indicator without opening new ones.
Of course, without DLL, in order to pass the Market.
I have cornered the order taking possibility panel in the owl for this purpose and sometimes I drop orders in manual mode, but they go as the owl takes them.
I have added a possibility to place orders in the owl and sometimes place orders in the manual mode, but they are placed the way the owl takes them.
In the beginning it was a good trick when the indicator itself runs an order-script on OBJ_CHART.
Postfix operators (operator ++ and operator --) are defined as
Forum on trading, automated trading systems and testing trading strategies
Need help to spot some slight error .
whroeder1, 2014.07.07 11:37
Please advise, there is such a function in 4, but how to implement it in MQL5?
Set the flag to hide indicators called by the Expert Advisor.
This is something like that, see help.
Forum on trading, automated trading systems and testing trading strategies
Testing 'CopyTicks'
fxsaber, 2016.10.19 07:59
// А так же задает привычные MT4-функции: iOpen, iHigh, iLow, iClose, iTime, iVolume.
#define DEFINE_TIMESERIE(NAME,FUNC,T) \
class CLASS##NAME \
{ \
public: \
static T Get( const string Symb, const int TimeFrame, const int iShift ) \
{ \
T tValue[]; \
\
return((Copy##FUNC((Symb == NULL) ? _Symbol : Symb, _Period, iShift, 1, tValue) > 0) ? tValue[0] : -1); \
} \
\
T operator []( const int iPos ) const \
{ \
return(CLASS##NAME::Get(_Symbol, _Period, iPos)); \
} \
}; \
\
CLASS##NAME NAME; \
\
T i##NAME( const string Symb, const int TimeFrame, const int iShift ) \
{ \
return(CLASS##NAME::Get(Symb, TimeFrame, iShift)); \
}
DEFINE_TIMESERIE(Volume, TickVolume, long)
DEFINE_TIMESERIE(Time, Time, datetime)
DEFINE_TIMESERIE(Open, Open, double)
DEFINE_TIMESERIE(High, High, double)
DEFINE_TIMESERIE(Low, Low, double)
DEFINE_TIMESERIE(Close, Close, double)
Maybe someone may find the MQL4 approach useful in working with tick history as well
Application
I think so, see help.
Thanks a lot, I will try it, the SD said IndicatorRelease should do this
Who has encountered, how will it be more correct to arrange fields in the structure in terms of alignment?
In idea alignment in structures is from top to bottom, but we have an array, for which there is a memory allocation under 20 elements, it seems like way A will be correctFor MQL4 adepts there is an ancient way of working with TF in MQL5, in the usual way
Application...
That's a cool way to put a whole class into Macros. Too bad I can't work with such a class in the Debugger :-((
If you have encountered a problem, what is the correct way to arrange fields in the structure in terms of alignment?
Alignment in structures is supposed to go from top to bottom, but we have an array that is allocated memory under 20 elements, so way A is kind of rightIf you mean MQL, there is no alignment.
If you mean C++, struct B is better.
Anyway, in C++ alignment is up to the programmer anyway.