• Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)

New EA 100 to 200k DD 20% and 1000 to 700k DD 8%

Logika Trading menggunakan Parabolic SAR

EA ini menggunakan logika trading berikut:

1. Periksa apakah harga close di atas atau di bawah EMA 200.
2. Periksa apakah harga close di atas atau di bawah PSAR.
3. Jika harga close di atas EMA 200 dan PSAR, maka buka posisi buy.
4. Jika harga close di bawah EMA 200 dan PSAR, maka buka posisi sell.
5. Jika trailing stop diaktifkan, maka atur trailing stop.
 
Littleguy, I'll test your EA. It makes a good impression. But you should have a broker that offers BTC/USD without commission. This can quickly lead to losses. The RAW account from Tickmill is without this commission.
 
Littleguy, I'll test your EA. It makes a good impression. But you should have a broker that offers BTC/USD without commission. This can quickly lead to losses. The RAW account from Tickmill is without this commission.
Forexnator,
Thank you for your suggestions. Please feel free to conduct the backtest—I truly appreciate it. Actually, I am using the Exness Raw account, which has no commission but a spread of around 2030 point. The backtest results were still good, but unfortunately, the forward test resulted in losses.
 

Attachments

I also have a spread of 2030 points, which is the case with BTC. Please change the trading volume. Otherwise it will over-leverage the account.
 
I also have a spread of 2030 points, which is the case with BTC. Please change the trading volume. Otherwise it will over-leverage the account.

P.S. Please do not bet on gold or any other currency. That's where he over-levers.
 
Last edited:
Please include this Trend Focus indicator in your EA. It provides more reliable signals than the EMA 200 or the Parapolic SAR.

https://www.mql5.com/en/charts/20664610/btcusd-m1-tickmill-ltd

btcusd-m1-tickmill-ltd.png
 

Attachments

This is my experiment EA on BTCUSD. Im looking for someone who can join me to develop this EA. Im not going to sell this EA if the EA work.
Im very interested on your opinion about this EA. Is this to good to be true or this maybe can happen actually.View attachment 167381 View attachment 167382

Saya coba backtest hasilnya seperti ini:

upload_2025-2-1_20-49-12.png

Saya compile file yang anda kirimkan, sudah bebas dari error, tapi ada 2 warning:

upload_2025-2-1_20-52-33.png

Saya tambahkan variabel untuk menghilangkan warning:

upload_2025-2-1_20-55-13.png
 

Attachments

  • upload_2025-2-1_20-49-12.png
    upload_2025-2-1_20-49-12.png
    24.3 KB · Views: 285
  • upload_2025-2-1_20-52-33.png
    upload_2025-2-1_20-52-33.png
    100.6 KB · Views: 285
  • upload_2025-2-1_20-55-13.png
    upload_2025-2-1_20-55-13.png
    33.4 KB · Views: 284
Sebaiknya dicoba running pada TF = H4 bro.
Saya tambahkan Magic Number agar user bisa melakukan pengaturan Magic Number.
Semula (untuk OrderSend Buy):
Code:
 int ticket = OrderSend(Symbol(), OP_BUY, lotSize, Ask, 3, stopLoss, takeProfit, "Buy Order", 0, 0, clrGreen);

Menjadi:
Code:
 int ticket = OrderSend(Symbol(), OP_BUY, lotSize, Ask, 3, stopLoss, takeProfit, "Buy Order", mgn, 0, clrGreen);

Semula (untuk OrderSend Sell):
Code:
 int ticket = OrderSend(Symbol(), OP_BUY, lotSize, Ask, 3, stopLoss, takeProfit, "Buy Order", 0, 0, clrGreen);

Menjadi:
Code:
 int ticket = OrderSend(Symbol(), OP_SELL, lotSize, Bid, 3, stopLoss, takeProfit, "Sell Order", mgn, 0, clrRed);

Dengan menambahkan input pada global area:

Code:
//+------------------------------------------------------------------+
//| Inputs & Variables                                                            |
//+------------------------------------------------------------------+
input int    mgn = 17081945; //Magic Number
 
Untuk batas minimum dan maximum Lot Size sebaiknya ditempatkan sebagai parameter input. Saya buat sedikit perubahan.
Semula:
Code:
 if (lotSize < 0.01) lotSize = 0.01;
if (lotSize > 10) lotSize = 10;

Menjadi:
Code:
 if (lotSize < MinLot) lotSize = MinLot;
if (lotSize > MaxLot) lotSize = MaxLot;

Dengan menambahkan input pada global area:
Code:
input double MinLot = 0.01; //Minimum Lots
input double MaxLot = 1; //Maximum Lots
 
Beberapa parameter yang ada di bagian atas saya rubah menjadi parameter input.
Semula:
Code:
double RiskPercent = 5.0; // Risiko per trade dalam persen
double LotMultiplier = 10.0; // Pengali lot
double kaliTP = 2; // RiskReward
double TrailingStopPoints = 1000;
datetime lastBar = 0;

Menjadi:
Code:
//+------------------------------------------------------------------+
//| Inputs & Variables                                                            |
//+------------------------------------------------------------------+
input int    mgn = 17081945; //Magic Number
input double RiskPercent = 5.0; // Risiko per trade dalam persen
input double LotMultiplier = 1.1; // Pengali lot
input double TakeProfit = 1; // RiskReward
input double TrailingStopPoints = 25;
input double MinLot = 0.01; //Minimum Lots
input double MaxLot = 1; //Maximum Lots
input ENUM_TIMEFRAMES MinPeriod = PERIOD_H4; //Minimum Period

datetime lastBar = 0;

Note:
Saya tambahkan 1 parameter input untuk menentukan time frame
Untuk Risk Reward saya ganti nama variabelnya menjadi TakeProfit
 
Untuk menurunkan resiko saya rubah input AccountBalance() untuk CalculateLot saya ganti dengan AccountFreeMargin().
Semula:
Code:
 double lotSize = CalculateLot(RiskPercent, AccountBalance(), slDistance, LotMultiplier);

Menjadi:
Code:
 double lotSize = CalculateLot(RiskPercent, AccountFreeMargin(), slDistance, LotMultiplier);
 
Untuk logika entry Buy dan entry Sell saya buat perubahan kecil untuk membuat Candle Bullish dan Candle Bearish menjadi lebih dikenali oleh EA:
Semula:
Code:
 // Logika entry buy
if (!signalUsedBuy &&
Close[1] > iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, 1) && // Harga di atas EMA 200
Close[1] > iSAR(NULL, 0, 0.02, 0.2, 1) && // Harga close di atas SAR[1]
Close[1] > lastSARCrossDown &&
Open[1] < Close[1]) // Candle bullish
{
OpenBuyOrder(iSAR(NULL, 0, 0.02, 0.2, 1)); // Buka order buy
signalUsedBuy = true; // Tandai sinyal telah digunakan
}

// Logika entry sell
if (!signalUsedSell &&
Close[1] < iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, 1) && // Harga di bawah EMA 200
Close[1] < iSAR(NULL, 0, 0.02, 0.2, 1) && // Harga close di bawah SAR[1]
Close[1] < lastSARCrossUp &&
Open[1] > Close[1]) // Candle bearish
{
OpenSellOrder(iSAR(NULL, 0, 0.02, 0.2, 1)); // Buka order sell
signalUsedSell = true; // Tandai sinyal telah digunakan
}

Menjadi:
Code:
 // Logika entry buy
if (!signalUsedBuy &&
Close[1] > iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, 1) && // Harga di atas EMA 200
Close[1] > iSAR(NULL, 0, 0.02, 0.2, 1) && // Harga close di atas SAR[1]
Close[1] > lastSARCrossDown &&
Close[1] < Bid) // Candle bullish
{
OpenBuyOrder(iSAR(NULL, 0, 0.02, 0.2, 1)); // Buka order buy
signalUsedBuy = true; // Tandai sinyal telah digunakan
}

// Logika entry sell
if (!signalUsedSell &&
Close[1] < iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, 1) && // Harga di bawah EMA 200
Close[1] < iSAR(NULL, 0, 0.02, 0.2, 1) && // Harga close di bawah SAR[1]
Close[1] < lastSARCrossUp &&
Close[1] > Ask) // Candle bearish
{
OpenSellOrder(iSAR(NULL, 0, 0.02, 0.2, 1)); // Buka order sell
signalUsedSell = true; // Tandai sinyal telah digunakan
}
 
Untuk memastikan EA running pada TF yang dipilih oleh user (lewat parameter input).
Semula:
Code:
//+------------------------------------------------------------------+
//| Expert initialization                                              |
//+------------------------------------------------------------------+
int OnInit() {
Print("EA Initialized Successfully");
return(INIT_SUCCEEDED);
}

Menjadi:
Code:
//+------------------------------------------------------------------+
//| Expert initialization                                                         |
//+------------------------------------------------------------------+
int OnInit() {
if(_Period < MinPeriod) return(INIT_FAILED); //Memastikan EA running di TF pilihan
Print("EA Initialized Successfully");
return(INIT_SUCCEEDED);
}
 
Perubahan di atas membuat EA mempunyai parameter input sebagai berikut:
upload_2025-2-1_21-27-12.png

Dengan grafik hasil backtest (1 bulan lalu sampai hari ini pada broker Octa) sebagai berikut:
upload_2025-2-1_21-28-14.png


Report:
upload_2025-2-1_21-29-1.png

Happy coding, have a nice day :)
 

Attachments

  • upload_2025-2-1_21-27-12.png
    upload_2025-2-1_21-27-12.png
    14.4 KB · Views: 278
  • upload_2025-2-1_21-28-14.png
    upload_2025-2-1_21-28-14.png
    17.5 KB · Views: 279
  • upload_2025-2-1_21-29-1.png
    upload_2025-2-1_21-29-1.png
    33.1 KB · Views: 278
Last edited:
Untuk logika entry Buy dan entry Sell saya buat perubahan kecil untuk membuat Candle Bullish dan Candle Bearish menjadi lebih dikenali oleh EA:
Semula:
Code:
 // Logika entry buy
if (!signalUsedBuy &&
Close[1] > iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, 1) && // Harga di atas EMA 200
Close[1] > iSAR(NULL, 0, 0.02, 0.2, 1) && // Harga close di atas SAR[1]
Close[1] > lastSARCrossDown &&
Open[1] < Close[1]) // Candle bullish
{
OpenBuyOrder(iSAR(NULL, 0, 0.02, 0.2, 1)); // Buka order buy
signalUsedBuy = true; // Tandai sinyal telah digunakan
}

// Logika entry sell
if (!signalUsedSell &&
Close[1] < iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, 1) && // Harga di bawah EMA 200
Close[1] < iSAR(NULL, 0, 0.02, 0.2, 1) && // Harga close di bawah SAR[1]
Close[1] < lastSARCrossUp &&
Open[1] > Close[1]) // Candle bearish
{
OpenSellOrder(iSAR(NULL, 0, 0.02, 0.2, 1)); // Buka order sell
signalUsedSell = true; // Tandai sinyal telah digunakan
}

Menjadi:
Code:
 // Logika entry buy
if (!signalUsedBuy &&
Close[1] > iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, 1) && // Harga di atas EMA 200
Close[1] > iSAR(NULL, 0, 0.02, 0.2, 1) && // Harga close di atas SAR[1]
Close[1] > lastSARCrossDown &&
Close[1] < Bid) // Candle bullish
{
OpenBuyOrder(iSAR(NULL, 0, 0.02, 0.2, 1)); // Buka order buy
signalUsedBuy = true; // Tandai sinyal telah digunakan
}

// Logika entry sell
if (!signalUsedSell &&
Close[1] < iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, 1) && // Harga di bawah EMA 200
Close[1] < iSAR(NULL, 0, 0.02, 0.2, 1) && // Harga close di bawah SAR[1]
Close[1] < lastSARCrossUp &&
Close[1] > Ask) // Candle bearish
{
OpenSellOrder(iSAR(NULL, 0, 0.02, 0.2, 1)); // Buka order sell
signalUsedSell = true; // Tandai sinyal telah digunakan
}
Terimakasih petunjuknya pak guru :)
Percobaan_entah_yg_ke_berapa.png
 

Attachments

  • Percobaan_entah_yg_ke_berapa.png
    Percobaan_entah_yg_ke_berapa.png
    185.5 KB · Views: 250
Back
Top