Forum

How to make the MT4 auto refresh itself?

Some of the indicators repaint and always need to refresh to get the result. How to make the MT4 auto refresh itself

Pending Buy / Sell at specific price

external enter a price value, when price reach the value then buy/sell. Problem: 'Ask' - constant cannot be modified extern double Price = 1.0 ; //+------------------------------------------------------------------+ //| Expert initialization function |

Problem create a graphical objects at the corner of main window

//+------------------------------------------------------------------+ //| Corner.mq4 | //| Copyright 2013, MetaQuotes Software Corp. | //| http://www.metaquotes.net |

How to call out the ticket number and close it?

for (cnt= 0 ;cnt<total;cnt++) { OrderSelect (cnt, SELECT_BY_POS, MODE_TRADES); if (OrderType()<=OP_SELL && OrderSymbol()== Symbol ()) { if (OrderType()==OP_BUY) // long position is opened { // should it be closed? if (isCrossed == 2 ) { OrderClose(OrderTicket(),OrderLots(),Bid, 3 ,Violet); // close

Change the SuperTrend View

I try to change the indicators view from main window to sub window by replace #property indicator_chart_window to #property indicator_separate_window What code need to add to make it view like the MACD View below? SuperTrend Indicator: https://www.mql5.com/en/code/10005

What is the name of this line?

"MACD-Cross" EA place order upon Cross of 2 MA Lines. while in additional windows it show a horizontal line which value of zero. What is the name of the horizontal line? Do we can create an EA base on MA lines above horizontal line then BUY or vice versa? Any Example

Stoplose base on support and resistance?

There are support and resistance indicators like https://www.mql5.com/en/code/9711, https://www.mql5.com/en/code/9373. If there any EA sample with "Stoplose" of these support and resistance? Or other EA Stoplose base on support and resistance? Please give some example. Thanks

Trailing Stop after OrderSend(), not work, please give suggestion

I try to put a trailing stop after OrderSend(), but it not work, please give suggestion. Thanks. Code: ticket= OrderSend ( Symbol (),OP_SELL,Lots,Bid,Slippage,Stoplose,TakeProfit, "My EA" ,MagicNumber, 0 , Red ); if (ticket> 0 ) { if ( OrderSelect

EA will not open other trade during the trade opened, it need to wait it end

As Newbie, I just know to use below code total = OrdersTotal (); if (total < 1 ) and the EA will not open other trade during the trade opened, it need to wait it end that make it miss out a lot entry chances I still working with my simple EA https://www.mql5.com/en/forum/137972 How to code it open

Bars cross over Moving Average, possible?

I try to code this Bars (Ask Price) over moving average period 30 then buy and vise versa most of the trend code wrote as 2 moving average line cross then buy, so i like to write only bar and one single moving average the code is int start() { //---- int MALine, CurrentPrice; CurrentPrice =