Forum

How to Use OrderMagicNumber() instead of OrderTicket() for closing the current position?

Hello, I wonder if i can use OrderMagicNumber() instead of OrderTicket() for closing the current position? OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),Slippage,Red); return ( 0 );

How to use || at int?

Hello I am a beginner, i just try to say: for ( int j = 1 ; j <= 900 ; j++ ) if (Close[i] > Close[ 1 +J]) It is mean that close 0 is above all closes of the last 900 candles, but i need to say that close 0 is above close 1 or above close 2 ... to the last 900 candles! when i write: int x= 1 || 2 ||

Mql5 | How can i call the last indicator signal?

Hello, i have an indicator that gives me signals (buy and sell). I want to determine if the current signal is buy and the preview signal is sell and the preview signal is buy, drawing lines between these signals as the picture to link the last 2 signals with the current one. How can i do this

I want to Open 1 deal every 1 condition

In this code there are 2 buy conditions, but i just want to open 1 deal every one condition to be the total deals are unlimited, but every buy condition is equal to just 1 deal extern int MagicNumber= 10005 ; extern double Lots = 0.1 ; extern double StopLoss= 0 ; extern double TakeProfit= 20 ;

Very Important Function

Hello, This is MQL4 function, I need to use this function in MQL5. Is there easy way to enable me to know the roles to do this? double LastClosedInfo( string S, int type = - 1 ) { for ( int i = OrdersHistoryTotal() - 1 ; i >= 0 ; i--) if ( OrderSelect (i, SELECT_BY_POS, MODE_HISTORY)) if

This indicator dose not refresh data

Hello I wander what is the mistake in this indicator because it isn't update the data on chart every candle? #property strict #property indicator_chart_window #property indicator_buffers 1 #property indicator_plots 1 #property indicator_type1 DRAW_LINE #property indicator_width1 1 #property

Error when adding a new product

I try to add a new MQl5 indicator to the market, but it gives me this error: "Please recompile your product with new compiler" I searched for this error, but i can't solve it I work on windows 7 ,32 B How can i solve this problem? The code : - Work fine - Has no #includes - 0 errors, 0 warnings, 945

Question about Operations of Relation "NOT greater than"??

Operations of Relation True if a is equal to b a == b; True if a is not equal to b a != b; True if a is less than b a < b; True if a is greater than b a > b; True if a is less than or equal to b a <= b; True if a is

My Trailing stop does not work (MQL5)

//--- indicator settings #property indicator_chart_window #property indicator_buffers 2 #property indicator_plots 2 #property indicator_type1 DRAW_ARROW #property indicator_width1 3 #property indicator_color1 0xFF901E #property indicator_label1 "Buy" #property indicator_type2 DRAW_ARROW #property

How to open one buy deal every 1 candle?

Hello In this picture, i want my expert to open buy position then in the second signal close buy position and open sell position at the same time. But because of the stop loss on the second signal as you see, the expert close the buy and open sell, and when the price hit stop loss it close sell and