Testing

Spécifications

// กำหนดค่าตัวแปรเริ่มต้น
input double DailyProfitTarget = 200;   // กำไรที่ต้องการในแต่ละวัน (2% ของทุน)
input double LotSize = 0.1;             // ขนาด Lot
input double TakeProfit = 10;           // กำไรต่อการเทรดใน pip
input double StopLoss = 5;              // การหยุดขาดทุนต่อการเทรดใน pip

double dailyProfit = 0;                 // กำไรที่ทำได้ในวันนี้

// ฟังก์ชันเริ่มต้น
int OnInit() {
   dailyProfit = 0;
   return(INIT_SUCCEEDED);
}

// ฟังก์ชันหลัก
void OnTick() {
   // หยุดการเทรดหากทำกำไรถึงเป้าหมาย
   if(dailyProfit >= DailyProfitTarget) return;

   double maFast = iMA(NULL, 0, 10, 0, MODE_SMA, PRICE_CLOSE, 0);
   double maSlow = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, 0);

   // เช็คว่ามีออเดอร์เปิดอยู่หรือไม่
   if (OrdersTotal() == 0) {
       if (maFast > maSlow) { // เงื่อนไขการเปิด Buy
           int ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, 3, 
                                  Ask - StopLoss * Point, Ask + TakeProfit * Point, 
                                  "Buy Order", 0, 0, Blue);
           if(ticket > 0) dailyProfit += TakeProfit * Point * LotSize * 10;
       } else if (maFast < maSlow) { // เงื่อนไขการเปิด Sell
           int ticket = OrderSend(Symbol(), OP_SELL, LotSize, Bid, 3, 
                                  Bid + StopLoss * Point, Bid - TakeProfit * Point, 
                                  "Sell Order", 0, 0, Red);
           if(ticket > 0) dailyProfit += TakeProfit * Point * LotSize * 10;
       }
   }
}

// ฟังก์ชันรีเซ็ตกำไรทุกวัน
void OnTimer() {
   if(TimeHour(TimeCurrent()) == 0 && TimeMinute(TimeCurrent()) == 0) {
       dailyProfit = 0; // รีเซ็ตกำไรรายวันทุกวันใหม่
   }
}

Répondu

1
Développeur 1
Évaluation
(60)
Projets
67
6%
Arbitrage
29
17% / 38%
En retard
5
7%
Chargé
2
Développeur 2
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Travail
3
Développeur 3
Évaluation
(13)
Projets
29
28%
Arbitrage
3
0% / 0%
En retard
1
3%
Occupé
4
Développeur 4
Évaluation
(1)
Projets
3
0%
Arbitrage
3
33% / 0%
En retard
0
Travail
5
Développeur 5
Évaluation
(9)
Projets
15
7%
Arbitrage
0
En retard
2
13%
Travail
6
Développeur 6
Évaluation
(3)
Projets
2
0%
Arbitrage
1
0% / 0%
En retard
1
50%
Gratuit
7
Développeur 7
Évaluation
(66)
Projets
200
72%
Arbitrage
4
100% / 0%
En retard
1
1%
Gratuit
8
Développeur 8
Évaluation
(497)
Projets
568
33%
Arbitrage
28
43% / 43%
En retard
9
2%
Occupé
9
Développeur 9
Évaluation
(172)
Projets
195
11%
Arbitrage
37
38% / 35%
En retard
5
3%
Chargé
Commandes similaires
Hi Developers, I'm looking for a professional developer who can convert TradingView Pine Script to MT4 Indicator/EA.file is attached below.Indicator Screenshots also attached for reference.Indicator must work same as TradingView Script.This script is based on Breakout strategy
I need to compile my mt4 EA but there are some errors and warning if you can fix and compile send me your application I will select you upon Demo
Man on mayhem 30 - 100 USD
1. The idea of the trading system is as follows: market entries are performed when MACD's main and signal lines intersect in the current trend direction. 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is below
Hi, Expert should be Brazilian. I need the scalping ea for xauusd, usdjpy, AUDUSD, eurusd, gbpusd, nzdusd, uascad and usdchf with any strategy. But don't use buy limit in down trend and sell limit in sell trend. I need the profit with 0.5 usd minimum per trade
1. The idea of the trading system is as follows : markets entries are performed when the liquidity is grabbed or when a supply or demand is being touched. 2. Trend? There's no trend specified because this EA is based on liquidity and supply and demand. 3. Trading Signals : Buy Signal: EnterBuyMarket when price closes above the 5 period EMA (This EMA must be a parameter) after the liquidity has been grabbed or when a
Apply only if you understand market structure and understand English. Pls i don’t need translators because you will end up misunderstanding my explanation while translating English to your language I don’t need time wasters like my last experience I waited for a programmer for two weeks yet he no nothing because of language issues etc I need ea that set buy limit and sell limit oders using my market structure
MQL5 Automation 30 - 100 USD
I need to automate a trading strategy on mt5. i have the python script executing rightly. but i need to convert to mql5 and also automate the strategy robotically. Anyone with experience should reach out for further explanation
It is a Forex multi-currency fully automated strategy, which has been back-tested from 2008 to 2023, passing all Great Economic Crises with success. Started on Live account on 2024 passing the "Black Monday", i am now looking to expand I am looking for investors who want to achieve consistent returns in the Forex market through a carefully managed, risk-mitigated strategy that has demonstrated resilience and
Hello fellow developers, I am looking for an experienced freelancer to develop or modify an Expert Advisor (EA) on MT4 that can be used for trading on the Binance platform. This EA must be able to pull price data (charts) directly from Binance and trade based on indicator signals on MT4. Required Feature Details: 1. MT4 Connection to Binance via API The EA system must be able to connect MT4 to a Binance account using
Hi, i have a source code for a tradingview indicator. Other coder said that the indicator is complex due to the indicator use the library from tradingview. I need someone who can help me convert this complex indicator to MQL4 Indicator

Informations sur le projet

Budget
30 - 200 USD
Délais
à 100 jour(s)

Client

Commandes passées1
Nombre d'arbitrages0