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

MQL5 专家 咨询

工作已完成

执行时间28 分钟
员工反馈
Excellent customer and developer. Thanks.
客户反馈
Developer was very patient and knowledgeable will definately work with The Huy Phan again

指定

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.

反馈

1
开发者 1
等级
(71)
项目
103
20%
仲裁
6
0% / 83%
逾期
3
3%
空闲
2
开发者 2
等级
(169)
项目
204
30%
仲裁
25
40% / 44%
逾期
12
6%
空闲
3
开发者 3
等级
(75)
项目
124
44%
仲裁
14
29% / 50%
逾期
17
14%
空闲
4
开发者 4
等级
(361)
项目
643
26%
仲裁
92
72% / 14%
逾期
12
2%
工作中
发布者: 1 代码
相似订单
- Bring in your support and resistance expert to save time . - My expert already has money management , session filter , threshold based . - Also show a screen or a picture of the chart showing the support and resistance on live chart
Project Description I am seeking a professional MT4/MT5 Expert Advisor (EA) developer to design and code a prop-firm-compliant scalping EA for the M1–M5 timeframes , based on a proven and verifiable scalping strategy . This project is results-driven . The developer must have real trading experience or access to a verified live scalping strategy . EA Trading Logic Requirements Timeframes: M1–M5 only Multiple Symbols
hello great developer Looking for an experienced Web3 / crypto bot developer to build a copy-trading bot for Polymarket . The bot should track selected traders or wallets in real time and automatically replicate trades with minimal delay. Experience with Polymarket, blockchain APIs, and low-latency trading bots is required. Open to custom features and long-term collaboration. Platform: Polymarket (Web3 / API-based)
EA grid hunter 30 - 200 USD
1. Platform & Environment Platform: MetaTrader 5 (MT5 ONLY) Language: MQL5 Account type: ECN / Netting or Hedging Designed for broker rebate/commission return programs No DLLs, no external dependencies 2. Strategy Overview The EA is a high-frequency scalping Expert Advisor focused on maximizing the number of trades with minimal price movement, where the main source of profitability is broker rebate rather than market
This strategy is built around the idea that price seeks liquidity, and that retail traders often get trapped around key highs and lows. Instead of entering trades before price hits liquidity, this playbook waits for the market to run stops (take liquidity) and then trade the reversal after the trap is formed. The concept is simple: buy below lows, sell above highs, but only when those lows or highs have respected
Need to create a New EA that focuses only on closing trades of an Existing EA . The New EA should be attached to the Existing EA and also it should not interfere the functions of Existing EA. The developer of the New EA should provide guidelines in order to attach the New EA to the Existing EA. The existing EA will not be shared to the developer. The conditions of new EA is as follows: The new EA should close all
I am looking for an experienced MT5 developer to create a Gold (XAUUSD) scalping Expert Advisor similar to the strategy shown in the attached video. General Requirements: Platform: MetaTrader 5 (MT5) Symbol: XAUUSD (Gold) only Strategy type: Scalping Timeframes: M1 and M5 (preferred), optional M15 Trades should be fast and precise, suitable for gold volatility Trading Logic: Automatic BUY and SELL entries Clear entry
Hello everyone, I am looking for a highly experienced MQL5 developer to build a fully automated Expert Advisor (EA) based strictly on Smart Money Concepts (SMC) , designed to operate and pass prop firm accounts . 🔍 Core Strategy Requirements (SMC Only) The EA must be based on institutional Smart Money Concepts , including: ✅ Market Structure (BOS & CHOCH) ✅ Liquidity concepts (equal highs/lows, stop hunts)✅ Trap
I want to create Fib Retracement strategy in EA or TradingView strategy. I should work in 1 min TF with XAUUSD and Use golden zone of fib which is 0.613 for retracement. I can share video of strategy. I will only complete order after doing proper backtesting of strategy. In my manual backtesting it has win rate of 75% and risk to reward ratio of 1:1.5 to 1:1.7 So yes strategy is working fine. You have knowledge of
Hello, I want to create 1 EA which works on Gold with low drawdown and good returns. Monthly 3-5% returns is fine but I need as much as low drawdown. First I need this EA. If this works well I will give more orders for more EAs. Explain me strategy of EA. If possible include 3-4 trading strategies to make it more powerful and good to use. I don't Grid, Martingale or any gambling EAs. Send me EA for demo first. I

项目信息

预算
30+ USD
截止日期
 1 天