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
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 ) {
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
"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
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
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 );
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
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()
Hello, I just start learn to write ea, can somebody give your samples, how to code this Enter Short: Bar # 1 must be up bar, bar #0 price lower than bar #1 low price then enter short Thanks if Bar #1 = Up Bars (Close-Open) Bar#0 ask price < Bar #1