Specifiche
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;
}
}
}
//+------------------------------------------------------------------+
Con risposta
1
Valutazioni
Progetti
968
46%
Arbitraggio
32
38%
/
34%
In ritardo
96
10%
Gratuito
Pubblicati: 6 codici
2
Valutazioni
Progetti
72
22%
Arbitraggio
13
46%
/
15%
In ritardo
5
7%
Gratuito
3
Valutazioni
Progetti
641
41%
Arbitraggio
23
52%
/
30%
In ritardo
46
7%
In elaborazione
4
Valutazioni
Progetti
10
50%
Arbitraggio
6
17%
/
50%
In ritardo
3
30%
In elaborazione
5
Valutazioni
Progetti
226
80%
Arbitraggio
18
33%
/
44%
In ritardo
11
5%
In elaborazione
Pubblicati: 24 articoli, 1882 codici
6
Valutazioni
Progetti
18
28%
Arbitraggio
3
67%
/
33%
In ritardo
1
6%
Gratuito
7
Valutazioni
Progetti
195
72%
Arbitraggio
0
In ritardo
0
Gratuito
8
Valutazioni
Progetti
102
23%
Arbitraggio
12
25%
/
17%
In ritardo
13
13%
Gratuito
9
Valutazioni
Progetti
194
42%
Arbitraggio
10
10%
/
40%
In ritardo
9
5%
In elaborazione
Pubblicati: 3 codici
10
Valutazioni
Progetti
73
5%
Arbitraggio
33
15%
/
36%
In ritardo
6
8%
In elaborazione
Ordini simili
I need an Expert advisor based on AOX signal . it must have check and handing of trade operation..errors. The main criterin for opening and dosing a position : moving average direction the price is higher than the previous bar Trade lots is input parameter bar
Description: Gildepak is a purchasing cooperative for packaging materials. We need a program to calculate and fairly distribute the annual bonus (received from preferred suppliers) among our member companies (partners and members). The program should work with a set of predefined tables and data flows, and it must be able to import and export Excel files. Main Tables: Member Companies Company ID Company Name Partner
PLEASE READ: IF YOU ARE NOT GOING TO ACCEPT THE BELOW THEN PLEASE MOVE ON TO THE NEXT CLIENT. I NEED SOMEONE WHO WILL DO THE WORK FIRST AND THEN CREATE A BUILT-IN DEMO INDI AS PER SPECIFICATIONS BELOW WHICH HAS AN EXPIRY (A DAY OR 2) SO THAT I TEST THE INDI BEFORE WE CREATE THE ORDER. I HAVE HAD PEOPLE WHO PRESSURE ME TO CREATE THE ORDER AND THEN THEY END UP DEVELOPING A FAULTY INDICATOR. AND I HAVE GIVEN THEM THE
Hello, I am looking for an experienced QuantConnect/Lean developer for a trading strategy project on futures (Micro Nasdaq – MNQ) with Interactive Brokers integration (paper + live). The strategy includes several key features: • Multi-timeframe analysis (signal validation across multiple horizons) • Integration of economic news/events into the trading logic • Advanced risk management (daily stop, position sizing
Boom crash spike tool
30+ USD
READ CAREFULLY And if you have done 50 projects before then apply others i will reject SEPARATE LOGIC MUST BE SEPARATE AND ALL INPUTS MUST BE VISIBLE WITH FALSE TRUE OPTION TO ON OFF FUNCTION 🔺 BUY Signal (Boom Market) ✅ Pattern Formation (Spike-Based Buy Setup) First Spike : Large bullish spike candle . Mitigation Candle : Small bearish candle inside or partially inside the bullish spike. Second Spike
Bainanans
500+ USD
Bainanan good f المؤشر. ينبغي إضافة نقطة صفراء عند أعلى نقطة في الشموع في منطقة ذروة الشراء - وهي نقطة H. ينبغي إضافة نقطة خضراء عند النقطة المنخفضة للشموع في منطقة ذروة البيع - وهي نقطة L. إذا وُجدت نقطة L واحدة على الأقل بين نقطتي H، فابحث عن نقطة LL في الفترة الفاصلة بينهما. ستكون الشمعة ذات أدنى سعر قاع هي نقطة LL. بشكل عام، لا تُعتبر نقطة LL بالضرورة نقطة L. ابحث عن الشموع ذات أدنى سعر قاع. إذا كانت هناك نقطة H
Døsh forex
30 - 200 USD
I want a robot that will help me and trade the the robot will be very good I don’t want to loose money I repeat I don’t want to loose money
📌 Forex EA Bot Requirement Document 1. General Information Trading Platform: MetaTrader 5 (MT5) / MetaTrader 4 (MT4) Trading Instruments: (e.g., GBP/JPY, XAU/USD, BTC/USD) Timeframes to Trade: (e.g., 15M, 1H, 4H, Daily) Trading Style: (Scalping, Swing trading, Intraday, Position trading) 2. Entry Rules Define the indicators/strategies for entry (e.g., Moving Averages, MACD, RSI, Order Blocks, Supply & Demand)
Trading Robot development
30 - 200 USD
I am looking for an experienced MQL5 developer to build a trading robot based on my personal strategy. The EA should be coded professionally, with efficiency, accuracy, and risk management in mind. Strategy Overview: The strategy is structure-based with Fibonacci retracement (0.618–0.79) as the primary Point of Interest (POI). Secondary confluences include order blocks, support/resistance, psychological levels, and
I want a bot that reads signals from my Telegram channel and auto-executes those trades on my Pocket Option account. 1. Direction mode hedge_both: open BUY (CALL) and SELL (PUT) at the same time (typically split the amount 50/50 per side). signal_only: open only the direction specified by the signal (CALL or PUT). 2. Respect signal direction When direction_mode = signal_only, a CALL signal opens a CALL; a PUT signal
Informazioni sul progetto
Budget
40+ USD
Per lo sviluppatore
36
USD