Add stoploss to ea0130

İş Gereklilikleri

//+------------------------------------------------------------------+
//|                                                     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());
        }
     }
  }
//+------------------------------------------------------------------+

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(22)
Projeler
21
10%
Arabuluculuk
4
25% / 75%
Süresi dolmuş
0
Serbest
2
Geliştirici 2
Derecelendirme
(626)
Projeler
985
46%
Arabuluculuk
33
36% / 36%
Süresi dolmuş
98
10%
Çalışıyor
Yayınlandı: 6 kod
3
Geliştirici 3
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
1
100%
Serbest
4
Geliştirici 4
Derecelendirme
(37)
Projeler
59
27%
Arabuluculuk
26
19% / 54%
Süresi dolmuş
10
17%
Çalışıyor
Yayınlandı: 1 kod
5
Geliştirici 5
Derecelendirme
(72)
Projeler
80
10%
Arabuluculuk
38
8% / 58%
Süresi dolmuş
6
8%
Serbest
6
Geliştirici 6
Derecelendirme
(278)
Projeler
340
37%
Arabuluculuk
6
50% / 17%
Süresi dolmuş
7
2%
Serbest
Yayınlandı: 5 kod
7
Geliştirici 7
Derecelendirme
(47)
Projeler
67
37%
Arabuluculuk
5
40% / 40%
Süresi dolmuş
1
1%
Serbest
8
Geliştirici 8
Derecelendirme
(154)
Projeler
193
58%
Arabuluculuk
10
80% / 0%
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
9
Geliştirici 9
Derecelendirme
(4)
Projeler
4
100%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
10
Geliştirici 10
Derecelendirme
(17)
Projeler
22
36%
Arabuluculuk
5
0% / 100%
Süresi dolmuş
4
18%
Serbest
11
Geliştirici 11
Derecelendirme
(43)
Projeler
66
12%
Arabuluculuk
12
58% / 42%
Süresi dolmuş
1
2%
Serbest
12
Geliştirici 12
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
13
Geliştirici 13
Derecelendirme
(15)
Projeler
19
16%
Arabuluculuk
5
40% / 40%
Süresi dolmuş
0
Serbest
14
Geliştirici 14
Derecelendirme
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
15
Geliştirici 15
Derecelendirme
(574)
Projeler
945
47%
Arabuluculuk
309
58% / 27%
Süresi dolmuş
125
13%
Serbest
16
Geliştirici 16
Derecelendirme
(69)
Projeler
146
34%
Arabuluculuk
13
8% / 62%
Süresi dolmuş
26
18%
Serbest
Yayınlandı: 6 kod
17
Geliştirici 17
Derecelendirme
(173)
Projeler
231
61%
Arabuluculuk
3
33% / 33%
Süresi dolmuş
6
3%
Serbest
Yayınlandı: 1 kod
Benzer siparişler
حلل لي اصل مالي ) اكتب هنا مثلا XAU EUR USD USD اريد تحليلا تعليما و ليس توصية مالية ۱- نوع التحليل المطلوب : ( فني / اساسي / سلوك سعري ) ٢ - المدي الزمني : ( قصير / متوسط / طويل ) M15 / H1 / H4 / ) اذكر الفريمات المطلوبه + (D1 ما اريد استخراجه من التحليل : الاتجاه العام اقوي مستويات دعم و مقاومة رقمية سيناريو صعود و سيناريو هبوط مع شروط كل سيناريو ( IF / THEN ) اين يصبح السيناريو لاغيا مناطق دخول و خروج تعليمية (
Project Description I have three detailed CSV files containing: OHLC price data Timestamps Aggregated time & sales data A column called Arrow showing where signals occurred The data was captured using NinjaTrader 8 with NinZa Renko 8:4 bars on the ES market. All arrows are non-repainting and appear on candle close. Objective The goal is to create a NinjaTrader 8 indicator that reproduces the arrows in real-time
I need modifications to an existing MT5 Expert Advisor. Modification 1 EA must be able to run on indices as well as forex , specifically: SP500 US100 US30 No other changes to the current logic Modification 2 Other alterations/notes: Opening breakout range option for 15min or 30 min from session start. 5 min fair value gap (FVG) break outside of the range (instead of 1 min). At least one of the candles must be within
AutoTrade_v4_Arbon-v4 35 - 250 USD
============================================================ GOLD AI INSTITUTIONAL TERMINAL v4.0 - AutoTrade + EA Indikator EDISI GABUNGAN Sinkronisasi MT4 Realtime + Dasbor PWA + AI Multi-TF Menggabungkan MT4 + Server AI Node.js ============================================================ CARA MENJALANKAN (MUDAH): -------------------------- 1. Ekstrak ZIP ke folder manapun (misal: C:\GoldAI\) 2. Buka folder hasil
I am looking for an experienced quantitative developer to analyze and optimize an MT5 Expert Advisor that I have already developed. The EA is relatively complex and includes: Multiple strategies (Trend Pullback, Breakout, Mean Reversion, EMA Reclaim) Scoring system combining technical score and probabilistic filter Regime detection (ADX based) Volatility filters (ATR regime) Correlation and cluster exposure control
Until zone detection is coded , you will be from that point . Trailing Stop Optimization for live chart . Apply with Specific Currency Support . Clean Code . Zone Upper Limit and Lower Limit . Apply with careful understanding of the project requirement
Subject: Professional MT5 Trading Bot Inquiry - Pre-Purchase Requirements Dear [Bot Name/Company Name] Developers, Greetings, I am a professional trader seeking a highly professional and extremely powerful MT5 trading bot , and after extensive research, your product has caught my attention. However, before I click the payment button, I have specific requirements as I am not looking for an ordinary bot, but rather a
hello, please take a moment to review my project. It is for Quanttower. it is very detailed in the instructions. Thank you, Just let me know if you can do it and the whats the cost and timeframe
GoldAI_v2_FINAL 30 - 70 USD
========================================================== Terminal Institusional GOLD AI v2.10 Sinkronisasi Realtime MT4 + Dasbor PWA + AI Multi-TF ========================================================== CARA MENJALANKAN (MUDAH): -------------------------- 1. Ekstrak ZIP ke folder manapun (misal: C:\GoldAI\) 2. Buka folder hasil ekstrak 3. Klik dua kali: INSTALL.bat → installotomatis 4. Klik dua kali
Exe source code 70+ USD
Need a developer to help with a exe file and provide the source code, if you can do this please kidnly apply and tell me what you need to get this started

Proje bilgisi

Bütçe
30+ USD