Add stoploss to ea0130

Spezifikation

//+------------------------------------------------------------------+
//|                                                     MyEA.mq5     |
//|                        Copyright 2024, Your Company Name        |
//|                                       http://www.yourwebsite.com|
//+------------------------------------------------------------------+
#property copyright "2024, Your Company Name"
#property link      "http://www.yourwebsite.com"
#property version   "1.00"
#property strict

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   // Place your initialization code here
   return INIT_SUCCEEDED;
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   // Place your deinitialization code here
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   // Place your trading logic here
   double stopLossDistance = 30.0; // Stop loss distance in pips
   double stopLossPrice = 0.0;     // Stop loss price
   double entryPrice = Ask();      // Get current ask price (assuming long trade)

   // Calculate stop loss price
   if (stopLossDistance > 0)
     {
      stopLossPrice = entryPrice - stopLossDistance * Point;
     }

   // Place stop loss order
   if (stopLossPrice > 0)
     {
      int ticket = OrderSend(Symbol(), OP_BUY, 0.1, entryPrice, 2, stopLossPrice, 0, "Stop Loss", 0, 0, clrNONE);
      
      if (ticket > 0)
        {
         Print("Stop loss order placed successfully at price ", stopLossPrice);
        }
      else
        {
         Print("Error placing stop loss order: ", GetLastError());
        }
     }
  }
//+------------------------------------------------------------------+

Bewerbungen

1
Entwickler 1
Bewertung
(22)
Projekte
21
10%
Schlichtung
4
25% / 75%
Frist nicht eingehalten
0
Frei
2
Entwickler 2
Bewertung
(623)
Projekte
980
47%
Schlichtung
32
38% / 34%
Frist nicht eingehalten
96
10%
Arbeitet
Veröffentlicht: 6 Beispiele
3
Entwickler 3
Bewertung
(1)
Projekte
1
0%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
1
100%
Frei
4
Entwickler 4
Bewertung
(37)
Projekte
59
27%
Schlichtung
26
19% / 54%
Frist nicht eingehalten
10
17%
Arbeitet
Veröffentlicht: 1 Beispiel
5
Entwickler 5
Bewertung
(72)
Projekte
80
10%
Schlichtung
38
8% / 58%
Frist nicht eingehalten
6
8%
Frei
6
Entwickler 6
Bewertung
(278)
Projekte
340
37%
Schlichtung
6
50% / 17%
Frist nicht eingehalten
7
2%
Frei
Veröffentlicht: 5 Beispiele
7
Entwickler 7
Bewertung
(47)
Projekte
67
37%
Schlichtung
5
40% / 40%
Frist nicht eingehalten
1
1%
Frei
8
Entwickler 8
Bewertung
(152)
Projekte
190
57%
Schlichtung
10
80% / 0%
Frist nicht eingehalten
0
Frei
Veröffentlicht: 1 Beispiel
9
Entwickler 9
Bewertung
(4)
Projekte
4
100%
Schlichtung
0
Frist nicht eingehalten
0
Frei
10
Entwickler 10
Bewertung
(17)
Projekte
22
36%
Schlichtung
5
0% / 100%
Frist nicht eingehalten
4
18%
Frei
11
Entwickler 11
Bewertung
(43)
Projekte
66
12%
Schlichtung
12
58% / 42%
Frist nicht eingehalten
1
2%
Frei
12
Entwickler 12
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
13
Entwickler 13
Bewertung
(15)
Projekte
19
16%
Schlichtung
5
40% / 40%
Frist nicht eingehalten
0
Frei
14
Entwickler 14
Bewertung
Projekte
1
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
15
Entwickler 15
Bewertung
(574)
Projekte
945
47%
Schlichtung
309
58% / 27%
Frist nicht eingehalten
125
13%
Frei
16
Entwickler 16
Bewertung
(69)
Projekte
146
34%
Schlichtung
13
8% / 62%
Frist nicht eingehalten
26
18%
Frei
Veröffentlicht: 6 Beispiele
17
Entwickler 17
Bewertung
(170)
Projekte
228
60%
Schlichtung
3
33% / 33%
Frist nicht eingehalten
6
3%
Frei
Veröffentlicht: 1 Beispiel
Ähnliche Aufträge
step by step and structure this into a full IEEE 830 / ISO/IEC/IEEE 29148 style Requirements Specification. This format will include: Introduction System Overview Functional and Performance Requirements Traceability Matrix (linking requirements to test cases) Verification and Validation Compliance Standards 1. Introduction 1.1 Purpose The purpose of this document is to define the technical requirements for the
i need an expert to help join 3 model i have in ninjatrader into one, kindly message me and i will be expecting from you and i need this work done in maximum of 4 days, so i need expert that can get it done
I want an EA that work with my support and resistance indicator. Buy entry condition are: 1. hen candlestick closes in side the support bar. 2. When candlestick break above resistance bar. Likewise sell condition: 1. When candlestick closes inside the resistance bar, 2. When candlestick break below support bar
1. Goal I want a MetaTrader 5 Expert Advisor that trades a simple Supertrend trend‑following idea, but with professional‑grade risk management and filters. It should be robust enough for real money on instruments like XAUUSD and GBP pairs, using small, consistent risk per trade rather than martingale or grid. 2. Strategy Logic Indicators (I will supply the .mq5 files if needed): Supertrend (ATR‑based), with
Hi developers, I need someone to help me create a simple EA with my indicators and trading plan... I will give you all parameters and you help me create... 2 moving averages, one candle pattern
Please a need a very good expert for this jou I want to create 2 robot one a trade manager Perfect — here’s a clean, professional order description you can post directly to an EA freelancer (MQL5). I’ve written it so it’s clear, serious, and attractive to skilled developers 👌 MQL5 Trade Manager EA – Development Request I am looking for an experienced MQL5 developer to build a robust Trade Manager Expert Advisor for
Henryy999 30 - 3000 USD
The Ai robot must help me with forex and I don't have money soon can the Ai robot give me some money and I will pay it back if the Ai robot does a good job making me rich
Project Title: MT5 Algo Trading EA (Single Strategy + License Panel + Ownership + Manual Trade) --- Project Description I am looking for an experienced MT5 (MQL5) developer to create a clean, stable and professional Algo Trading EA for my company and future clients. This is a long-term business project, not a one-time personal EA. --- 1. Strategy Requirements - Only 1 single trading strategy - No martingale - No grid
I am looking for an experienced StrategyQuant X (SQX) developer to build a reusable trading template , not a single strategy. ⚠️ Please do NOT apply unless you actively use StrategyQuant X and have access to it. This project cannot be completed without SQX. 1. Session and Time Filters Trading restricted to fixed GMT sessions per index Sessions must convert correctly to broker server time and remain correct through
Is there someone who coded the PipJuice indicator? Here is the link: https://www.pipjuice.io/ Unfortunately, I don‘t have access to the indicator or the code. If someone have it please send me some screenshots

Projektdetails

Budget
30+ USD