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

MQL5 Experten Beratung

Auftrag beendet

Ausführungszeit 28 Minuten
Bewertung des Entwicklers
Excellent customer and developer. Thanks.
Bewertung des Kunden
Developer was very patient and knowledgeable will definately work with The Huy Phan again

Spezifikation

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.

Bewerbungen

1
Entwickler 1
Bewertung
(71)
Projekte
103
20%
Schlichtung
6
0% / 83%
Frist nicht eingehalten
3
3%
Frei
2
Entwickler 2
Bewertung
(169)
Projekte
204
30%
Schlichtung
25
40% / 44%
Frist nicht eingehalten
12
6%
Frei
3
Entwickler 3
Bewertung
(75)
Projekte
124
44%
Schlichtung
14
29% / 50%
Frist nicht eingehalten
17
14%
Frei
4
Entwickler 4
Bewertung
(361)
Projekte
643
26%
Schlichtung
92
72% / 14%
Frist nicht eingehalten
12
2%
Arbeitet
Veröffentlicht: 1 Beispiel
Ähnliche Aufträge
I run an ea it makes good profits bit that one bad grid blows up the account. I want an EA which runs parallel to it which can intelligently close bad trades or grids. It shouldn't close recoverable trades but close very bad entries and grids. It can even close with hedging. The goal recover max and also not blow up the account
I need a bot that open a trade when I click on a button. the only use case is for prop firm to see that I am operating from a bot. It need only the lot size and direction input
I am looking for an expert MQL5 developer to build a high-precision Hedging System between two different MT5 brokers running on the same local PC. Core Objective: Execute opposite (inverse) trades between a Master and Slave account (e.g., Master BUY = Slave SELL, Master SELL = Slave BUY). The Challenge: Standard "Trade Copiers" are insufficient as they cannot prevent single-legged exposure when using manual trading
Aranda 30+ USD
- Project Overview: A brief description of the project’s purpose and the main problem it solves. - Core Features: List the essential functionalities required (e.g., user registration, payment gateway integration, real-time data tracking). - Technical Stack Preferences: Specify if you require a particular programming language, framework, or platform (e.g., Python/Django, React Native, MQL5). - User Interface (UI)
I want robot that can help me trade and make some money so that I can be able to learn from it while I'm still in depot account now.Is how it gonna help me with some money
Project Requirements: I need a professional MQL5 developer to create a high-frequency Gold (XAUUSD) scalping EA for MT5, optimized for Exness Zero/Raw Spread accounts. ​Core Logic: ​Strategy: Scalping on M1/M5 Timeframe using price momentum. ​No Time Limit: Since I am using an ECN broker, I do not need the 4-minute duration rule. The EA should close trades as soon as the target is hit. ​Filters: > 1. Max Spread
Hello, I have two requests: First: Feature Modification Request Currently, the EA places only one pending order at a time. I want to modify this to place two opposite pending orders (Buy Stop and Sell Stop) simultaneously, with the distance between them aligned with the existing Breakeven and Trailing Stop settings in the bot. How it should work: The EA places a Buy Stop above current price and a Sell Stop
Hello, I am looking for a professional developer to create a fully automated MT5 Expert Advisor with complete source code and resell rights. Below are my requirements: 🔹 Strategy Details: Strategy Type: (Trend + Controlled Grid / or your preferred logic) Indicators: EMA 50, EMA 200, RSI (customizable inputs) Entry Conditions: Buy when price above EMA 50 & EMA 200 + RSI confirmation Sell when price below EMA 50 & EMA
Hello, I need a professional MT5 Expert Advisor for currency trading. PAIRS: EURUSD, GBPUSD, USDJPY, USDCHF TIMEFRAME: M15 STRATEGY: - EMA 8 cross EMA 21 (entry signal) - EMA 50 for trend filter - RSI 14 confirmation (Buy > 52, Sell < 48) - No trade if RSI > 75 or < 25 SESSION: London + New York only 07:00 to 17:00 GMT No weekend trading TRADE MANAGEMENT: - Lot size: 0.06 - Take Profit: $15 per trade - Stop Loss: $8
Knight king 30+ USD
1. The bot must start when the markets start. 2.Then his capacity must be $1000. 3.and his trades must start at 0.04 slot and it must open up most available trades

Projektdetails

Budget
30+ USD
Ausführungsfristen
bis 1 Tag(e)