Add stoploss to ea0130

指定

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

応答済み

1
開発者 1
評価
(22)
プロジェクト
21
10%
仲裁
4
25% / 75%
期限切れ
0
2
開発者 2
評価
(633)
プロジェクト
1001
47%
仲裁
33
36% / 36%
期限切れ
98
10%
仕事中
パブリッシュした人: 6 codes
3
開発者 3
評価
(1)
プロジェクト
1
0%
仲裁
1
0% / 100%
期限切れ
1
100%
4
開発者 4
評価
(37)
プロジェクト
59
27%
仲裁
26
19% / 54%
期限切れ
10
17%
仕事中
パブリッシュした人: 1 code
5
開発者 5
評価
(72)
プロジェクト
80
10%
仲裁
38
8% / 58%
期限切れ
6
8%
6
開発者 6
評価
(279)
プロジェクト
341
37%
仲裁
6
50% / 17%
期限切れ
7
2%
パブリッシュした人: 5 codes
7
開発者 7
評価
(47)
プロジェクト
67
37%
仲裁
5
40% / 40%
期限切れ
1
1%
8
開発者 8
評価
(156)
プロジェクト
198
59%
仲裁
10
80% / 0%
期限切れ
0
仕事中
パブリッシュした人: 1 code
9
開発者 9
評価
(4)
プロジェクト
4
100%
仲裁
0
期限切れ
0
10
開発者 10
評価
(17)
プロジェクト
22
36%
仲裁
5
0% / 100%
期限切れ
4
18%
11
開発者 11
評価
(43)
プロジェクト
66
12%
仲裁
12
58% / 42%
期限切れ
1
2%
12
開発者 12
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
13
開発者 13
評価
(15)
プロジェクト
19
16%
仲裁
5
40% / 40%
期限切れ
0
14
開発者 14
評価
プロジェクト
1
0%
仲裁
0
期限切れ
0
15
開発者 15
評価
(574)
プロジェクト
945
47%
仲裁
309
58% / 27%
期限切れ
125
13%
16
開発者 16
評価
(69)
プロジェクト
146
34%
仲裁
13
8% / 62%
期限切れ
26
18%
パブリッシュした人: 6 codes
17
開発者 17
評価
(174)
プロジェクト
233
61%
仲裁
3
33% / 33%
期限切れ
6
3%
パブリッシュした人: 1 code
類似した注文
Hello, I am looking for someone who can help me to build a MT4/MT5 forex EA, by analyzing the trading history. You are responsible to find out trading logic behind the EA and Build a new EA that accurately replicates the existing strategy. I need someone who has proven previous experience to build a new EA by reverse engineering. Thanks
I am looking for an experienced MT4/MT5 developer to analyze my trading history and replicate the strategy in a new Expert Advisor (EA). The developer must have proven experience in reverse engineering strategies, analyzing trading data, and developing EAs across various trading methodologies. A deep understanding of XAUUDS and BTCUSD behavior, as well as chart analysis, is essential. Please note that we do not have
Title: MT5 Forex Trading Robot Development I need a MetaTrader 5 (MT5) Expert Advisor (EA) for automated Forex trading. Requirements: 1. The robot must be fully automated and capable of opening and closing trades without manual intervention. 2. Compatible with MetaTrader 5 (MT5). 3. Adjustable lot size, Stop Loss, and Take Profit settings. 4. Built-in risk management based on account balance. 5. Ability to trade
Risk management EA 30 - 200 USD
Looking to develop risk management EA for personal use probably commercially in the future. I want the EA to have a display panel with 0.1, 0.2, 0.5,1,2,3 percent risk management button. I also want BE, partial closure of 0.25,0.5,0.75 and full closure panel on both profit and loss. I’ll also like to include trailing stop, 2 trades max per day and BE+spread option. I’ll be attaching the image for a guidance on what
Sierra Chart Alerts to MT5 via Webhook (Alert Manager File Version) Objective: Create a Custom Study (ACSIL / C++) that monitors alerts from the Alert Manager file and forwards any valid alert directly to MT5 via an HTTP POST (Webhook) in JSON format. Additional Note: The study should allow adding any modifications in the future and provide clear insights into the alert points in Sierra Chart. 1. Data Flow Diagram
Ea.Mix 30+ USD
I am in need of a good scalping bot for gold or any currency pair. If you have one that is working, reach out. You must be able to provide a trial version so I can test the bot myself
A bot takes trades every few seconds until hit the profit with the same lots , i am attaching a picture as well. If anyone can do that please contact me i will give the account details
MT5 Expert Advisor Development Project Overview I am looking for an experienced MQL5 developer to build a custom MetaTrader 5 Expert Advisor based on a grid-cycle trading framework. This is not a standard grid EA . The system combines: Session-based trade initiation Multi-filter signal generation Dynamic grid management Advanced basket management State-machine-driven trade lifecycle management Dynamic take-profit
I have a MT5 Hull MTF Indicator that I like. I would like someone to add: 1) Time of day function (with start time and end time) so that it does not send messages during my night time. Default Start=0900 Default End=2300 2) Add to the Message (sound and email): so that it is Symbol+Buy-Or-Sell+Ask-OrBid Price+TimeFrame1 "/" TimeFrame2 I will send the indicator to the developer. Thank you
i have built a indicator on trading view which is veryt good, its based on liquidity sweeps on stop losses. im looking for an someone with experience in trading and indicators that has worked on similar strategy indicators. it already wins lots of very good trades im looking to tighten up on uneccesary trades it may send to clean it up as i currently am testing it out running to signal channel and want it the best /

プロジェクト情報

予算
30+ USD