Trabajo finalizado
Plazo de ejecución 10 horas
Tarea técnica
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; } }
Han respondido
1
Evaluación
Proyectos
150
29%
Arbitraje
9
44%
/
11%
Caducado
46
31%
Libre
2
Evaluación
Proyectos
2820
80%
Arbitraje
156
22%
/
43%
Caducado
488
17%
Libre
3
Evaluación
Proyectos
46
54%
Arbitraje
3
67%
/
0%
Caducado
14
30%
Libre
4
Evaluación
Proyectos
809
73%
Arbitraje
30
33%
/
37%
Caducado
194
24%
Libre
5
Evaluación
Proyectos
140
46%
Arbitraje
19
42%
/
16%
Caducado
32
23%
Libre
6
Evaluación
Proyectos
1395
72%
Arbitraje
115
29%
/
47%
Caducado
345
25%
Trabajando
Solicitudes similares
Project Overview: We are seeking a skilled Pine Script developer to implement and backtest a Connors RSI (CRSI) strategy along with two profit-taking methods on TradingView. The project includes developing and testing these strategies, followed by a basic comparative analysis. This is a short-term project within a larger initiative, with the potential for future collaboration based on performance. Scope of Work: 1
Small ninjascript code
30+ USD
Hello, thank you for your interest in my project. I want to develop a simple piece of code in ninjascript that does not exceed 8 lines of code. I will give the details of the code in the messages. the work is urgent Thank you
MT4 to eToro trade and order copier
30 - 700 USD
Need to copy the trades and orders generated by expert advisors from my MT4 platform to eToro broker. Etoro offers a trading API (). This could be used to make the connection to their propietary web platform. If the programmer considers there is more stable and faster way to do it then I'm open to suggestions
I have some specific conditions that i want to check during FVG, OB, BB, MSS, BOS, etc. but lets tell them in private if you will choose to work with me
DON'T REACH OUT IF YOU CAN'T CONVERT STRATEGY ON TRADINGVIEW TO A WELL AUTOMATED EXPERT ADVISOR THAT RUN WITHOUT PROBLEM ON METATRADER 5 Well, I am only looking for a programmer who is proficient in coding and can turn strategy on tradingview to a well customized expert advisor, please reach out if you can work timely on exactly what I just said
I want to pull a fib, with set entry price at a certain percentage, with stopploss set at another percentage of the fib. Risk is set in USD. Risk to match stop loss level. TP is set as ratio to stop loss. Calculate no. of contracts. A hot key for buy and one for sell. Illustration: In settings Inputs: Fib% to be displayed Entry level fib% stop loss fib percentage TP ratio Risk in USD or account percentage Operation
Create trading chat room with custom sessions.
30 - 90 USD
I need help with creating a website traders chatroom, it must show traders online,offline,inactive. the chatroom top section must show four clocks with different times and time scale like this.. the chatroom must have a history data of up to 10days, then longer history must be deleted automatically. if you have better chatroom please say your recommendations
Bug fixing a python script
30+ USD
I have a python script that connects MT5 to Deriv for binary trading which is having some bug. It stops executing trades after a while. I need someone to check the code and fix it. Negotiable price
Información sobre el proyecto
Presupuesto
10 - 20 USD
Para el ejecutor
9
- 18
USD
Plazo límite de ejecución
de 1 a 2 día(s)