Getting the index of the lowest close price for the last 30 Candles.

MQL5 Experts Consultation

Tâche terminée

Temps d'exécution 28 minutes
Commentaires de l'employé
Excellent customer and developer. Thanks.
Commentaires du client
Developer was very patient and knowledgeable will definately work with The Huy Phan again

Spécifications

I have written an EA buy I am struggling to use ILowest within a loop.

If I print out ILowest I get the correct value. But If I iterate through a loop and increase the start position of ILowest I get different values.

Surely the logic is the same for printing it out on each new candle as it is changing the start index.

I require help to work out this logic.

Basically I want to save the previous lowest candle for the last 25 candles into an arraybased on close price.

If candle[1] is the lowest array[0] = 0

if candle[2] is also lowest array[1]=0

if candle[3] is second lowest array[2]=1 

   if(!isNewBar() && InpTradeOnNewBar)
     {
      return;
     }
       
  //Something like this can be done
  ArrayResize(buyarr,30)

  buyarr[0] = ilowest(Symbol(),Period(),Mode_close,InpLookBackPeriod,1) - 1;

  //Shift values up one

   if(CopyRates(Symbol(),Period(),0,InpLookBackPeriod,BuyRates) < InpLookBackPeriod ||
      CopyRates(Symbol(),Period(),0,InpSLookBackPeriod,SellRates) < InpSLookBackPeriod)
     {
      return;
     }

   buyrank=iLowest(Symbol(),Period(),MODE_CLOSE,InpLookBackPeriod,1) - 1;
   sellrank=iHighest(Symbol(),Period(),MODE_CLOSE,InpSLookBackPeriod,1) - 1;


   
   Print(buyrank); //this prints the correct value. I would like to save this value for the previous 25 candles

   ArrayResize(buyarr,InpLookBackPeriod);

   for(int i=0; i<InpLookBackPeriod; i++)
     {
      buyarr[i] = iLowest(Symbol(),Period(),MODE_CLOSE,InpLookBackPeriod,i+1) - 1;
     }
ArrayPrint(buyarr); // This prints out totally incorrect values.

Répondu

1
Développeur 1
Évaluation
(71)
Projets
103
20%
Arbitrage
6
0% / 83%
En retard
3
3%
Gratuit
2
Développeur 2
Évaluation
(169)
Projets
204
30%
Arbitrage
25
40% / 44%
En retard
12
6%
Gratuit
3
Développeur 3
Évaluation
(75)
Projets
124
44%
Arbitrage
14
29% / 50%
En retard
17
14%
Gratuit
4
Développeur 4
Évaluation
(361)
Projets
643
26%
Arbitrage
92
72% / 14%
En retard
12
2%
Travail
Publié : 1 code
Commandes similaires
Hi, I’m looking for an experienced Forex developer with proven, long-term market experience to partner with me in building a professional trading bot for my EA business. Please note: I am not looking to provide the trading strategy or concept. I expect you to propose the strategy, justify it, and fully develop the EA based on the requirements below. Strategy Requirements:. Day trading approach: 1–3 trades per day
Hallo zusammen, für einen sehr aufwändigen Expert Advisor in MQL5 suche ich einen (oder mehrere) talentierte und erfahrene Programmierer, die bereits mehr als +5 Jahre einschlägige Programmiererfahrung in MQL5 OOP haben. Darüber hinaus suche ich Experten für Maschinelles Lernen und Neuronale Netzwerke, denn ich möchte den Expert Advisor um Bibliotheken mit selbstständigen Lernen und Anpassen kontinuierlich erweitern
Product Name: Smart Profit EA Price: $600 (One-time) 📩 Contact & Support Interested buyers can contact me directly on Telegram: @SACHINKOULAGE for support, setup guidance, and pre-sale questions. 📌 Overview Smart Profit EA is a fully automated trading Expert Advisor designed to deliver stable and consistent monthly profits with controlled risk. This EA has been tested on a $500 trading account , where it is capable
Scalping ea mt5 30 - 50 USD
PHẦN 1: TIẾNG ANH (For MQL5 Freelance) Title: I need a Pro Dev for Scalping EA: I provide STRICT Money Management, YOU provide the Strategy Description: I have a strict Capital & Risk Management Framework. The Entry Strategy is UP TO YOU (Must be "King Scalping" / Multi-Timeframe style). 1. STRATEGY (YOUR JOB) * Requirement: You decide the entry logic. It must be a High Probability and High Volume scalping strategy
I’m looking to purchase an MT5 Expert Advisor that focuses on swing trades with large-move targets (e.g., 100+ pips profit per trade ). Requirements ✅ Must work on MetaTrader 5 (MT5) ✅ Can trade any Forex pair (multi-symbol), GOLD preference ✅ Designed for swing trading style (medium-term — not scalping) ✅ Targets 100+ pips per trade / large market moves ✅ Built-in risk management (stop loss, take profit, breakeven
Evil trader 30+ USD
Trading bot using resistance for is strategy with no taking to much of risk on the lots size making it the best trading tp for me to use and also no when to trade and when not to
I have an expert advisor (MQL5) that works professionally on all timeframes. This is a test on a 5-minute timeframe, from $10,000 to $614,195.70, from the beginning of 2025 to the beginning of 2026 on the Dow Jones
1441 30+ USD
444fwefwefw jlklklklklklklklklkeaNRFNEWM EWQJEWQIOREJEWQKLFDNMKLFD.MDW/LFDK.MEWFDLK;EMFWEKLMFWELKFREWNMFNDM,VSDV/S.DAFLMWEO;RWEJRPWOEJWE09PUJR9O EJ WKEWMK F FMKDSMKF SDEWJWJ [Q\ /QLDKNQNDQPIUHQD.Q,DMASDOAIFDA,M DFA AAS,KFDJNLOFD NOIFDJNFDAS NKNLOASJOFIKJD ASOIJFISFNKSNF SFSNOIWWQJ-0I[PKEM DAI-0IK-0DQMDQ NDACAI-0 I- EKQ;LDN0912KDMMOIKM Cdjoiasd f09wilf d qkdfokawsd-09fdkdadsomfasdlkkf-0 q[pkkd-0]q2kda\fld
Signal Logic - Swing points detected correctly (Fractals or N-bar) - BOS triggers only on bar close beyond swing level (+ optional min break distance) - FVG zones detected correctly (3-candle gap) and stored with clear boundaries - FVG invalidation works as configured (full fill / partial fill / timeout) Entry & Execution - Entry only after BOS (if enabled) and on return to active FVG zone - Bar-close confirmation
Hi, I’m searching for a developer who already has a high‑performance Gold EA that can beat the results shown in my screenshot. If you have such an EA, please reply with: - A brief description of how it works (grid, scalping, SMC, etc.) - Backtest results and the set files you used - Whether you’re willing to make minor tweaks so I can use it as my own If the performance looks good, we can discuss adjustments and next

Informations sur le projet

Budget
30+ USD
Délais
à 1 jour(s)