Questions from Beginners MQL5 MT5 MetaTrader 5 - page 737

 
ANDREY:
Good afternoon, everyone.
The code below encodes a simple idea.
If the last closed order was on SEL
If the last closed order was on the NEL
Open a NEL order
if (OrderSelect (Ht-1,SELECT_BY_POS, MODE_HISTORY))                                            
if ( OrderType ()==OP_SELL)                                            
X = OrderProfit( );                                            

if (OrderSelect (Ht-1,SELECT_BY_POS, MODE_HISTORY))                                            
if ( OrderType ()==OP_BUY)                                              
if(X < 0)                                              

OrderSend(Symbol(),OP_SELL,0.1,Bid ,3,Ask+400*Point,Ask-200*Point,"17-10",123 );
QUESTION
What language construct can be used to add two more conditions to this code (circled in red)

If the last closed order is NEL
If the last CEL order closed
If the last closed order has closed on the NEL
If the last closed order has been closed through the NOR

Thank you for your help.


Open
a SEL order
Theme on MQL5
 
prostotrader:
MQL5 topic


Got it. I need MQL4 topic

Please give me a link to a similar MQL4 forum
 
ANDREY:


Got it. I need a topic on MQL4

Please give me a link to a similar MQL4 forum
https://www.mql5.com/ru/forum/mql4
 
Thank you
 

Hello ,

Can you tell me if MT5 has a coordinate system on the charts ?

Is it possible to edit the built-in standard indicators in MT5?

 
alex.n:

Hello ,

Can you tell me if MT5 has a coordinate system on the charts ?

***

Yes, they do - they are pixels. There is a whole group of graphical objects that uses pixels as coordinates when drawing. There's also a canvas - a canvas that you can draw with pixels.


alex.n:

***

Is it possible to edit built-in standard indicators in MT5?


No, you can't, but all built-in indicators have their own open-source analogues: \MQL5\Indicators\Examples\.

 
Vladimir Karputov:

Yes, there is - they are pixels. There is a whole group of graphical objects that use pixels as coordinates when drawing. There is also a canvas which can be used as a canvas to draw with pixels.



No, you can't, but all built-in indicators have their own open-source analogues: \MQL5\Indicators\Examples\.


Honestly, I meant the X-axis and Y-axis coordinate system,

Do you know where I can read about the pixel structure?

Thanks for the link to the source code!

 
alex.n:


To be honest I meant the coordinate system of X-axis and Y-axis,

Can you tell me where I can read about the pixel device?

Thanks for the link to the source code!


ArticleExploring the CCanvas Class. Implementation of transparency of graphical objects:

Figure 12: Coordinates on the graph

Fig. 12. coordinates on the chart

 

That is, there is vector X and vector Y, and that is what we need to know,

Thanks for the links, I will study it.

 

Hello forum members,

I need to get time series from ZigZag indicator, which will correspond to minima and maxima of this indicator, but as far as I know, I can only get double data from the indicator. Is it possible to do it easily and efficiently?

Документация по MQL5: Основы языка / Типы данных / Вещественные типы (double, float)
Документация по MQL5: Основы языка / Типы данных / Вещественные типы (double, float)
  • www.mql5.com
Основы языка / Типы данных / Вещественные типы (double, float) - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
Reason: