โผ Top rated
Mql4
Free mode
100% free
Freemium
Free Trial
-
3272356Released 1y ago100% FreeBaik, saya akan membuat kode EA MT4 sesuai dengan spesifikasi yang Anda berikan dalam bahasa MQL4. Berikut ini adalah kode yang dapat Anda salin dan coba debug di MetaEditor MQL4: ```mql4 #property copyright "Copyright 2023, Your Name" #property link "https://www.yourwebsite.com" #property version "1.00" #property strict // Input parameters input double LotSize = 0.01; // Ukuran lot input int TakeProfit = 100; // Take Profit dalam poin input int StopLoss = 100; // Stop Loss dalam poin input int OrderDistance = 100; // Jarak order dari harga pembukaan candle input ENUM_TIMEFRAMES TimeFrame = PERIOD_H1; // Timeframe // Global variables int ticket_buy = 0; int ticket_sell = 0; datetime lastCandleTime = 0; int OnInit() { return(INIT_SUCCEEDED); } void OnDeinit(const int reason) { } void OnTick() { if(NewCandle()) { CloseOrders(); DeletePendingOrders(); PlaceOrders(); } CheckAndReopenOrders(); } bool NewCandle() { datetime currentCandleTime = iTime(Symbol(), TimeFrame, 0); if(currentCandleTime != lastCandleTime) { lastCandleTime = currentCandleTime; return true; } return false; } void CloseOrders() { if(OrderSelect(ticket_buy, SELECT_BY_TICKET) && OrderType() == OP_BUY) OrderClose(ticket_buy, OrderLots(), Bid, 3, clrRed); if(OrderSelect(ticket_sell, SELECT_BY_TICKET) && OrderType() == OP_SELL) OrderClose(ticket_sell, OrderLots(), Ask, 3, clrRed); } void DeletePendingOrders() { if(OrderSelect(ticket_buy, SELECT_BY_TICKET) && (OrderType() == OP_BUYSTOP || OrderType() == OP_BUYLIMIT)) OrderDelete(ticket_buy); if(OrderSelect(ticket_sell, SELECT_BY_TICKET) && (OrderType() == OP_SELLSTOP || OrderType() == OP_SELLLIMIT)) OrderDelete(ticket_sell); } void PlaceOrders() { double openPrice = iOpen(Symbol(), TimeFrame, 0); double buyPrice = openPrice + OrderDistance * Point; double sellPrice = openPrice - OrderDistance * Point; ticket_buy = OrderSend(Symbol(), OP_BUYSTOP, LotSize, buyPrice, 3, buyPrice - StopLoss * Point, buyPrice + TakeProfit * Point); ticket_sell = OrderSend(Symbol(), OP_SELLSTOP, LotSize, sellPrice, 3, sellPrice + StopLoss * Point, sellPrice - TakeProfit * Point); } void CheckAndReopenOrders() { if(OrderSelect(ticket_buy, SELECT_BY_TICKET)) { if(OrderType() == OP_BUY && (OrderProfit() >= TakeProfit * Point * OrderLots() * MarketInfo(Symbol(), MODE_TICKVALUE) || OrderProfit() <= -StopLoss * Point * OrderLots() * MarketInfo(Symbol(), MODE_TICKVALUE))) { OrderClose(ticket_buy, OrderLots(), Bid, 3, clrGreen); double openPrice = iOpen(Symbol(), TimeFrame, 0); double buyPrice = openPrice + OrderDistance * Point; ticket_buy = OrderSend(Symbol(), OP_BUYSTOP, LotSize, buyPrice, 3, buyPrice - StopLoss * Point, buyPrice + TakeProfit * Point); } } if(OrderSelect(ticket_sell, SELECT_BY_TICKET)) { if(OrderType() == OP_SELL && (OrderProfit() >= TakeProfit * Point * OrderLots() * MarketInfo(Symbol(), MODE_TICKVALUE) || OrderProfit() <= -StopLoss * Point * OrderLots() * MarketInfo(Symbol(), MODE_TICKVALUE))) { OrderClose(ticket_sell, OrderLots(), Ask, 3, clrGreen); double openPrice = iOpen(Symbol(), TimeFrame, 0); double sellPrice = openPrice - OrderDistance * Point; ticket_sell = OrderSend(Symbol(), OP_SELLSTOP, LotSize, sellPrice, 3, sellPrice + StopLoss * Point, sellPrice - TakeProfit * Point); } } } ``` Kode ini mencakup semua fitur yang Anda minta: 1. Menempatkan order beli dan jual pada jarak tertentu dari harga pembukaan candle. 2. Menutup order aktif dan menghapus order tertunda pada setiap pembukaan candle baru. 3. Membuka kembali order tertunda ketika TP atau SL tercapai. 4. Bekerja pada setiap candle baru. 5. Memungkinkan pengguna untuk mengatur ukuran lot, TP, SL, jarak order, dan timeframe. Pastikan untuk menguji EA ini di akun demo terlebih dahulu dan selalu gunakan manajemen risiko yang baik. Selamat mencoba!
Featured matches
-
15,95522Released 2mo agoNo pricing

-
4466Released 8d agoFree + from $29/mo

-
15,5274Released 1mo agoFree + from $16.48/mo

Other tools
-
1,01717Released 2mo agoFree + from $1.60abhishek mishra๐ 4 karmaSep 1, 2025@ThesysUsing Thesys has been a game-changer for us. We can now ship AI features with interactive UIs in a fraction of the time it used to take. Itโs simple to use and saves us so much effort.
-
3,93237Released 2y ago100% FreeI have used this for several personal assistant applications and it works amazingly. Obviously it is still restricted to the flaws of any model you are using it with, but the ability to constrain prompts is incredibly helpful (especially when it comes to getting things like JSON format from the AI).
-
Open23,339267Released 1y ago100% FreeAnythingLLM is easy to use, and allows us to build private databases using several (any) kinds of media (text, pdf, audio, etc) and use it as a source of knowledge for any LLM you might wonder to experiment!
-
5,740138Released 1y agoFree + from $9.99/moI've been using the free trial to use different chatbot models in the same conversation and it's way more efficient than having 3 or 4 different browser tabs open at the same time. It was really cool to see that when changing a model in the middle of a chat, it keeps the context! Can't wait to start using the image and speech features!
- Sponsor:Higgsfield AI - Video effects
-
2,0565Released 2mo agoFree + from $99/motried quickdata on a stack of rent rolls (pdf+xls), a couple T12s and one chunky OM. setup's just an excel add in, super barebones ribbon button and it goes straight to work (no gimmicks). it mapped a lot of line items correctly and dumped them into my model fast. i like that it plugs into your existing model instead of forcing theirs. a clearer "why" for each auto category would be good.
-
40,852858Released 3y agoNo pricingCode varies from run to run. Still it is a helpful app. You can specify coding languages that are not in the dropdown menu.
-
7,22145Released 2y ago100% Free
-
9176Released 1y agoFree + from $89.90/mo
-
6256Released 1y agoNo pricing
-
63112Released 1y agoFree + from $99/mo
-
2,78015Released 2y agoFree + from $20/mo
-
Open193Released 1y agoNo pricing
- Didn't find the AI you were looking for?
-
2636Released 2y agoNo pricing
-
4867Released 1y agoFrom $1.99/mo
-
1,3697Released 2y agoNo pricing
-
5228Released 1y agoNo pricing
-
8595Released 5y agoNo pricing
-
2,0095Released 2y agoFree + from $0.060
-
8145Released 2y agoFree + from $19/mo
-
6654Released 2y agoFree + from $99/yr
-
2,0658Released 2y agoNo pricing
-
1,87735125Released 2y ago100% Free
-
1,01668Released 1y ago100% Free
-
3285Released 2y ago100% Free
Post

