Hello,
I am making a code,
If Buy Order reach above 30 Point from Entry price, close Sell Order
If Sell Order reach below 30 Point from Entry Price, Close Buy Order.
int gRangeClosing_Automatic = 30;
if((LastOrderPrice(OP_SELL, gSellMagic) - Ask) / Point > gRangeClosing_Automatic)
{...
I Made an EA, but get an Error which sais Order Send Error 138
Can someone Help me?
input double UpZone = 1.3000; // Define your UpZone value
input double DownZone = 1.2900; // Define your DownZone value
input int ATR_Period = 14; // ATR period
input double MinATRLevel = 0.001; // Minimum ATR...
I attempted to convert an MT4 multi-timeframe fractal indicator to MT5 but encountered difficulties due to the differences in syntax, particularly with the absence of barshift in MQL5. I'm not acoder, I would greatly appreciate any assistance in implementing the iFractals coding (copy buffer...
Hello,
I am adding new feature in my EA, which close trade automatically when it fulfilled defined earning set by user and than it redefine with value again with new Account balance.
Example :
Account Balance = $1000
Target Percentage = 10% (10% of 1000$ = $100)
When Account...
Hello,
What does OrderType() > OP_SELL mean? There are a few instances in the EA I am working with that have some if conditions with OrderType() > OP_SELL . I understand that OrderType() == OP_SELL means it should be equal to a sell order, and OrderType() != OP_SELL means it should not be...
Hello,
I am finding little difficult in understanding Trailing Stop loss. How does it work, does it take value from Stop Limit, Trade Entry Price or Current Price or Highest Peak in Favorable direction.
After reading some blogs about Trailing Stop, This what i understand :-
Condition: If...
Hello Enivid or any coder here ;
I have a simple EA that has been working very good for me ; the only problem I have with it is
the Time Filter ;the Hour funtion is OK but the Minute function is not ;if I set it to trade from
7:15 to 11:20 it still start to trade from 7 :00 and stop trading...
Hello, Currently i am coding a news filter EA and having some errors.
#import "urlmon.dll"
int URLDownloadToFileW(int pCaller,string szURL,string szFileName,int dwReserved,int Callback);
#import
#define INAME "FFCPing"+_Symbol
#define TITLE 0
#define COUNTRY 1
#define DATE 2
#define TIME...
Hello,
What is correct way to add if else statement.
TYPE 1 : If else sequence separately :
if (condition1) {
//Condition 1 task
} else {
if (condition2) {
//condition2 task
} else {
if(condition3) {
//condition3 task
} else {
//condition else task
}
TYPE 2 : Else if statement sequence...
how can i remove this warnings,,,,,
return value of orderclose should be checked,
also for orderdelete and orderselect.
Also,,,,this
Expression has no effect....i have three of this....please help me here
Please use this thread to discuss our Close All Orders (Positions) MetaTrader script. It's a simple script to mass-close orders in MT4 or positions in MT5. You can download the script from its description page (linked earlier) and ask any questions about this free script here.
Helloo guys ,,,can someone help me here,,,
Iam trying to monitor the current price movement of a candlestick but iam little pit confused .how can i show that movement .Help plzzz
hello all ,, can u help me to modify my code ?... i wanna build strategy like this https://telegra.ph/file/fbdc32ed144011a1c8c0a.jpg with Fxgen and the model is like this https://telegra.ph/file/10ac5ab589d8a46a05554.jpg
as u can see the model is not simple ... if the order reach Buyorder5...
Hello,
I'm using this function in my EA to calculate the lot size position according to account balance percentage but the problem is that the calculation is not accurate specially in JPY pairs,
For example if the loss must be 50 usd according to account balance percentage risk most of the...
Hello,
I keep getting the error 130 and found this article about it.
https://www.earnforex.com/guides/ordersend-error-130/
I would like to implement this code but is not clear to me what the entry value contains.
if (Entry - Bid < StopLevel * _Point) Entry = Bid + StopLevel * _Point;
if...
I get sporadic 130s when using an MA as my stop loss value, so I want to write something that will check for all OrderModify() calls when I have a change in my take profit (or stop loss) values, like:
retval = OrderModify( OrderTicket(), OrderOpenPrice(), Valid_SL(MyCalcSL,OrderType())...
Hello Forum!
I'm trying to code a very simple EA which opens a trade when the new / next candle occurs + TS .
Part of the code is working as I want and new trades are opening fine but TS simply doesn't work.
I was wondering if somebody would be so kind and help me fixing this code ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.