Job finished
Execution time 10 hours
Specification
MQL4 - Get Price Difference between Position and current price
Basically I want the following code
If i got 0 position, bool validGap = 0;
Then it open e.g UJ long at 99.00
Now i got 1 order
UJ long at 99.00
My setting is gap 25 Points
if UJ goes to 99.25, i want to open 1 more position (add to winner)
or if UJ goes to 98.75 , I want to open 1 more position ( add to loser )
Take note the amount of digits or what symbol I playing need to be dynamic, no hardcoding.
My current code is something like this, however the EA keep open position despite there is no 25 * one Pip gap
Consider my gapTrade is value 25
double SL,TP,onePip; int Ticket; onePip = 0.00; if (MarketInfo(OrderSymbol(), MODE_POINT) == 0.00001) onePip = 0.0001; else if (MarketInfo(OrderSymbol(), MODE_POINT) == 0.001) onePip = 0.01; else onePip = MarketInfo(OrderSymbol(), MODE_POINT); /***********************************/ //check if price match double currentPrice; currentPrice = MarketInfo(Symbol(),MODE_BID); bool validGap = false; // Initial - Not Okay. double minValue,maxValue,priceDiff; priceDiff = 0.00; minValue = 9999.0; for (int ii=OrdersTotal()-1 ; ii>=0 ; ii--) { if (!OrderSelect(ii,SELECT_BY_POS)) continue; if (OrderSymbol() == Symbol()) if (OrderOpenPrice() > maxValue) { maxValue = OrderOpenPrice(); } if (OrderOpenPrice() < minValue) { minValue = OrderOpenPrice(); } } if(direction=="SELL") { priceDiff = currentPrice - maxValue; if( priceDiff > onePip*gapTrade) { validGap = true; } } if(direction=="BUY") { priceDiff = minValue - currentPrice; //We use max value if( priceDiff > onePip*gapTrade) { validGap = true; } } //Check if best trade in a buy is in profit /* ADD NEW POSITION TO A WINNING 1 */ if(direction=="BUY") { priceDiff = currentPrice - maxValue; if( priceDiff > onePip*gapTrade) { validGap = true; } } if(direction=="SELL") { priceDiff = minValue - currentPrice; if( priceDiff > onePip*gapTrade) { validGap = true; } }
Responded
1
Rating
Projects
150
29%
Arbitration
9
44%
/
11%
Overdue
46
31%
Free
2
Rating
Projects
2820
80%
Arbitration
156
22%
/
43%
Overdue
487
17%
Free
3
Rating
Projects
46
54%
Arbitration
3
67%
/
0%
Overdue
14
30%
Free
4
Rating
Projects
809
73%
Arbitration
30
33%
/
37%
Overdue
194
24%
Free
5
Rating
Projects
144
46%
Arbitration
19
42%
/
16%
Overdue
32
22%
Working
6
Rating
Projects
1447
72%
Arbitration
119
29%
/
47%
Overdue
355
25%
Working
Published: 3 articles
Similar orders
Algo Trading Rebot/ EA
30 - 100 USD
I would like someone Who can design an EA for me. I will give him the Required Details and Trading Plan How it should Work. its going to be a Simple EA System Around Moving Averages Crossover. I will Provide Him the Moving Averages Settings and How It should execute trades and Exit them
Tradingview to Ninjatrader
30+ USD
Hello. I already have a fully working TradingView indicator written in Pine Script. I am NOT asking for a new strategy or indicator to be designed. I need an experienced NinjaTrader (NinjaScript / C#) developer to replicate the same logic and behavior of my existing TradingView indicator so it works on NinjaTrader. Important points: The TradingView indicator does NOT repaint (uses confirmed bars only). This is logic
No jokers copy pasters allowed. If you're proficient in MQL5, have a proven track record with EAs apply. Commissioning the development of a high-performance Expert Advisor (EA) engineered for the MetaTrader 5 (MT5) environment. The objective is to deploy an institutional-grade automated trading system capable of systematic market analysis, precision execution, and strict risk governance within the global forex
Create an ea that exit buy trades when red smiley face appear,exit sell trades when blue smiley face appear.in this case you need to better use the Smiley face signals which are 4 for BUY (blue smiley face)and 5 For SELL( red smiley face)
I’m looking to acquire an existing, profitable Expert Advisor (EA) with full source code to add to our client investment portfolio. To be clear, this is not a request to develop or design a new strategy. If you already have an EA that is proven, consistent, and production-ready, I’m open to reviewing it immediately. Please apply only if you meet all the requirements below. Submissions without a proper introduction or
Sniper
30+ USD
Hello, I would like you to develop a trading robot (EA) with the following specifications: The robot should be able to target large moves, ideally 60–100 pips or more per trade. It should use high-precision “sniper” entries, focusing on high-probability setups rather than frequent trades. Once the initial trade reaches breakeven, the robot should be able to add additional positions (scale in) while maintaining strict
True
30+ USD
Hello, I would like to commission the development of a trading robot (EA) designed specifically to pass a prop firm challenge within one week, with a maximum allowable drawdown of 2%. Key requirements: Strict risk management with drawdown hard-limits Controlled lot sizing and position management Strategy focused on high-probability, low-risk entries Full compliance with prop firm rules (daily drawdown, max drawdown
Sniper EA and pattern EA
30+ USD
I want you to help me and create a sniper entry robot and with proper risk management that follow trend and when is not going to the direction it exit
I need an MQL5 Expert Advisor fixed and compiled. Symbol: XAUUSD Timeframe: M1 Strategy: - Pending order breakout using last 3 candles - Buy Stop +4 points above range - Sell Stop -4 points below range - Lot size: 0.01 fixed - No martingale, no grid, no trailing stop Exits: - Take Profit: 8–10 points - Stop Loss: 10–12 points - Time-based exit: ~75 seconds Risk rules: - Trade only between 09:00 and 17:00 - Max spread
I have been trading manually for years by disciplining myself to follow a rigorous risk management system and using entry and exit strategies crafted from Implied Volatility(IV), Real Volume ,RSI and Moving Average ,but never had I automated the entire system until now . I have just completed the automation of the gold Expert Advisor and the results are astonishing .Below you'll see the graph and a statistics file
Project information
Budget
10 - 20 USD
Deadline
from 1 to 2 day(s)