명시
here's the code,
+------------------------------------------------------------------+
//| kama.mq4 |
//| Copyright 2022, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//| Heikin/Kaufman Strategy Expert Advisor |
//| By OpenAI (ChatGPT) |
//+------------------------------------------------------------------+
// Inputs
input int Length = 5;
input double Fastend = 2.5;
input int Slowend = 20;
input int test = 0;
input int sloma = 20;
// Indicator buffers
double nAMABuffer[];
double fmaBuffer[];
double smaBuffer[];
double ha_closeBuffer[];
double mha_closeBuffer[];
// External variables
extern double LotSize = 0.01; // Trading lot size
extern int StopLoss = 50; // Stop loss in pips
extern int TakeProfit = 100; // Take profit in pips
// Trading parameters
int ticket = -1;
int slippage = 3;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnCalculate(const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[])
{
int start = prev_calculated > 0 ? prev_calculated - 1 : 0;
ArrayResize(nAMABuffer, rates_total);
ArrayResize(fmaBuffer, rates_total);
ArrayResize(smaBuffer, rates_total);
ArrayResize(ha_closeBuffer, rates_total);
ArrayResize(mha_closeBuffer, rates_total);
double nfastend = 2 / (Fastend + 1);
double nslowend = 2 / (Slowend + 1);
for(int i = start; i < rates_total; i++)
{
double xPrice = (high[i] + low[i] + close[i]) / 3;
double xvnoise = MathAbs(xPrice - xPrice[test]);
double nsignal = MathAbs(xPrice - xPrice[i - Length]);
double nnoise = 0;
for(int j = i - Length + 1; j <= i; j++)
{
double xv = MathAbs((high[j] + low[j] + close[j]) / 3 - (high[j - 1] + low[j - 1] + close[j - 1]) / 3);
nnoise += xv;
}
double nefratio = nnoise != 0 ? nsignal / nnoise : 0;
double nsmooth = MathPow(nefratio * (nfastend - nslowend) + nslowend, 2);
nAMABuffer[i] = i > 0 ? nAMABuffer[i - 1] + nsmooth * (xPrice - nAMABuffer[i - 1]) : xPrice;
int ha_t = iCustom(NULL, 0, "Heikin Ashi", 0, i);
ha_closeBuffer[i] = iCustom(NULL, 0, "Heikin Ashi", 2, i, ha_t);
mha_closeBuffer[i] = iCustom(NULL, res1, "Heikin Ashi", 1, i, ha_t);
if(i >= test)
{
fmaBuffer[i] = iMAOnArray(mha_closeBuffer, rates_total, 1, 0, test, i);
}
if(i >= sloma)
{
smaBuffer[i] = iMAOnArray(ha_closeBuffer, rates_total, sloma, 0, MODE_EMA, i);
}
}
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int OnInit()
{
SetIndexBuffer(0, fmaBuffer);
SetIndexBuffer(1, smaBuffer);
SetIndexStyle(0, DRAW_LINE);
SetIndexStyle(1, DRAW_LINE);
SetIndexLabel(0, "MA");
SetIndexLabel(1, "SMA");
double emptyBufferArray[];
{
int totalBars = ArraySize(open); // Retrieve the size of the 'open' array
int start = prev_calculated > 0 ? prev_calculated - 1 : 0;
// Rest of your code...
for(int i = start; i < totalBars; i++)
{
// Processing for each bar
}
// Rest of your code...
}
SetIndexBuffer(2, emptyBufferArray, INDICATOR_DATA);
double emptyBufferArray2[];
ArrayResize(emptyBufferArray2, rates_total);
SetIndexBuffer(3, emptyBufferArray2, INDICATOR_DATA);
SetIndexStyle(2, DRAW_ARROW);
SetIndexStyle(3, DRAW_ARROW);
SetIndexArrow(2, SYMBOL_ARROWUP);
SetIndexArrow(3, SYMBOL_ARROWDOWN);
SetIndexEmptyValue(2, 0);
SetIndexEmptyValue(3, 0);
return INIT_SUCCEEDED;
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
ArrayFree(nAMABuffer);
ArrayFree(fmaBuffer);
ArrayFree(smaBuffer);
ArrayFree(ha_closeBuffer);
ArrayFree(mha_closeBuffer);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnTick()
{
if(ticket == -1 && OrdersTotal() == 0)
{
int rates_total = RatesTotal();
int start = MathMax(0, rates_total - 1 - 1000);
for(int i = start; i < rates_total; i++)
{
if(fmaBuffer[i - 1] > smaBuffer[i - 1] && fmaBuffer[i] < smaBuffer[i])
{
ObjectCreate("CrossUnder", OBJ_TRIANGLE, 0, Time[i], High[i], 0);
ObjectSet("CrossUnder", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("CrossUnder", OBJPROP_WIDTH, 1);
ObjectSet("CrossUnder", OBJPROP_BACK, Red);
ObjectSetText("CrossUnder", "S", 8, "Arial", Red);
}
}
if(fmaBuffer[rates_total - 2] > smaBuffer[rates_total - 2] && fmaBuffer[rates_total - 1] < smaBuffer[rates_total - 1])
{
ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, slippage, Ask - StopLoss * Point, Ask + TakeProfit * Point);
if(ticket < 0)
Print("Error opening buy order:", GetLastError());
}
else
{
if(ticket == -1 && OrdersTotal() == 0)
{
int crossUnderBar = -1;
{
if(fmaBuffer[i - 1] > smaBuffer[i - 1] && fmaBuffer[i] < smaBuffer[i])
{
crossUnderBar = i;
}
}
if(crossUnderBar != -1)
{
double crossUnderPrice = Low[crossUnderBar];
ObjectCreate("CrossUnder", OBJ_TRIANGLE, 0, Time[crossUnderBar], crossUnderPrice, 0);
ObjectSet("CrossUnder", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("CrossUnder", OBJPROP_WIDTH, 1);
ObjectSet("CrossUnder", OBJPROP_BACK, Red);
ObjectSetText("CrossUnder", "S", 8, "Arial", Red);
}
// Rest of your code...
}
// Rest of your code...
}
{
ticket = OrderSend(Symbol(), OP_SELL, LotSize, Bid, slippage, Bid + StopLoss * Point, Bid - TakeProfit * Point);
if(ticket < 0)
Print("Error opening sell order:", GetLastError());
}
}
if(ticket >= 0)
{
if(OrderSelect(ticket, SELECT_BY_TICKET, MODE_TRADES))
{
if(OrderType() == OP_BUY && Bid - OrderStopLoss() > TakeProfit * Point)
{
if(OrderModify(ticket, OrderOpenPrice(), Bid - TakeProfit * Point, OrderTakeProfit(), 0, Green))
{
ticket = -1;
}
else
{
Print("Error modifying buy order:", GetLastError());
}
}
else
if(OrderType() == OP_SELL && OrderStopLoss() - Ask > TakeProfit * Point)
{
if(OrderModify(ticket, OrderOpenPrice(), Ask + TakeProfit * Point, OrderTakeProfit(), 0, Green))
{
ticket = -1;
}
else
{
Print("Error modifying sell order:", GetLastError());
}
}
}
else
{
Print("Error selecting order:", GetLastError());
ticket = -1;
}
}
}
//+------------------------------------------------------------------+
응답함
1
등급
프로젝트
975
46%
중재
32
38%
/
34%
기한 초과
96
10%
로드됨
게재됨: 6 코드
2
등급
프로젝트
72
22%
중재
13
46%
/
15%
기한 초과
5
7%
무료
3
등급
프로젝트
641
41%
중재
25
48%
/
36%
기한 초과
46
7%
작업중
4
등급
프로젝트
10
50%
중재
6
17%
/
50%
기한 초과
3
30%
작업중
5
등급
프로젝트
228
80%
중재
22
27%
/
50%
기한 초과
11
5%
무료
게재됨: 24 기고글, 1882 코드
6
등급
프로젝트
18
28%
중재
4
50%
/
50%
기한 초과
1
6%
무료
7
등급
프로젝트
216
75%
중재
0
기한 초과
0
무료
8
등급
프로젝트
102
23%
중재
12
25%
/
17%
기한 초과
13
13%
무료
9
등급
프로젝트
195
42%
중재
13
8%
/
54%
기한 초과
9
5%
무료
게재됨: 3 코드
10
등급
프로젝트
79
6%
중재
46
11%
/
54%
기한 초과
7
9%
작업중
비슷한 주문
Create The Profitunity System Trading
200 - 500 USD
For only developer who understand Chaos/ Profiunity trading system by Bill WIlliams, Create The Profitunity System Trading based on Bill Williams Chaos theory, Trade based on Trend Affirmation in Daily, entry in H4, using Williams Fractal, Williams Alligator, Awesome Oscillator, Accelerator Oscillator, Market Facilitation Index. Balance Line, entry on Reversal, add on while market show continuation sign. Please quote
Converting MT4 EA .ex4 to MT5 EA .ex5
30 - 55 USD
Need someone who has the ability to convert MT4 EA in .ex4 to MT5 EA .ex5 I have an existing EA .ex4 file which i want to convert to trade in metatrader5, means i want to convert .ex4 to .ex5 without tampering or changing logics or anything, the EA should be the same but work in mt5
Hi, I am looking for someone who has already developed a high-performance Gold EA that can outperform the one shown in my screenshot. If you have such an EA, please apply for this job. Please describe how the EA works (for example, whether it uses a grid system) and provide backtest results along with the set files. If the EA meets my expectations, you can make the necessary adjustments and I will use it as my own
Requirements Specification examples Here is an example of Requirements Specification for the development of the MACD Sample Expert Advisor, which is available in the MetaTrader 5 standard package. 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
EA that trades XAUUSD on a cross over strategy
30 - 400 USD
I am looking for a developer to create a trading robot (EA) to trade XAUUSD, NAS100 and SPX500. The rules are as follows: Buy when the 2 EMA crosses over the 10 EMA and price closes over the 50 ema. Sell when the 2 EMAs cross below the 10 EMAs and the price closes below the 50 EMAs. The take profit and stop loss can be adjusted by me selecting from a drop-down box. I am open to other parameters to optimize
Description I need an very low latency MT5 Expert Advisor (EA) developed in MQL5 to automate TradingView alerts into MT5 trades for alerts set up done on trading view. The EA must work on both DEMO and LIVE accounts whichever will be attached to MT5 (XM, IC Markets and similar MT5 brokers) and be suitable for fast 1-minute timeframe scalping.End to End solution. Functional Requirements 1. TradingView Integration
Project Overview I am looking for an experienced MQL5 developer to build a custom, prop-firm-compliant trend-following Expert Advisor (EA) for MetaTrader 5 . This EA will be used on prop firm accounts (e.g., FTMO-style rules), so strict risk control and rule compliance are mandatory . This is NOT a grid, martingale, scalping, or recovery EA. The goal is consistency, rule compliance, and capital preservation , not
I am looking of an Expert Advisor (EA) that has undergone independent validation and demonstrates a capability to successfully navigate prop firm challenges, as well as efficiently manage funded accounts. It is imperative that you provide a comprehensive explanation of the strategy utilized by your EA, along with a demo version that has a 30-day expiration. This will facilitate extensive back testing and forward
Hellow,l hope you are well,l am writing to place an order for a professional trading robot.l am looking for a reliable,well optimized robot that can trade efficiently,manage risk properly and deliver consistent performance in the market,I am particularly interested in a trading robot that uses a proven and transparent strategy,has strong risk management features,works well on common trading platforms,is suitable for
I am looking for an experienced MQL5 developer to build a professional MT5 software (indicator or semi-automated EA) for metals and major forex pairs. 📌 PLATFORM & MARKETS Platform: MetaTrader 5 Instruments: XAUUSD (Gold vs USD) XAGUSD (Silver vs USD) EURUSD GBPUSD USDJPY Trading styles: Scalping Intraday / short-term swing 🎯 MAIN OBJECTIVE I do NOT want an aggressive fully automated robot. I want a
프로젝트 정보
예산
40+ USD