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

MQL5 Esperti Consulenza

Lavoro terminato

Tempo di esecuzione 28 minuti
Feedback del dipendente
Excellent customer and developer. Thanks.
Feedback del cliente
Developer was very patient and knowledgeable will definately work with The Huy Phan again

Specifiche

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.

Con risposta

1
Sviluppatore 1
Valutazioni
(71)
Progetti
103
20%
Arbitraggio
6
0% / 83%
In ritardo
3
3%
Gratuito
2
Sviluppatore 2
Valutazioni
(169)
Progetti
204
30%
Arbitraggio
25
40% / 44%
In ritardo
12
6%
Gratuito
3
Sviluppatore 3
Valutazioni
(74)
Progetti
121
43%
Arbitraggio
12
33% / 50%
In ritardo
17
14%
Gratuito
4
Sviluppatore 4
Valutazioni
(356)
Progetti
632
26%
Arbitraggio
89
73% / 13%
In ritardo
12
2%
Gratuito
Ordini simili
Hi guys I would like to k ow if someone has experience with machine learning models? I would like to train a model to identify if there is a range market or trendy market based on several parameters like EMA and ATR for example. If we use for example a 20 and 50 EMA and we measure the distance between both lines the algo should oearn if the trend is strong or weak. If it‘s steong it keeps trending and if it‘s weak
Hello The EA will work on particular zone choose by the user and can mark it on any TF and with some rules can open trades and mange the trade by some unique rules. the EA need to check the difference by RSI as well and with some extra rules . developer should have good attitude and good communication (englsih) with high performence and knowledge with coding EA
we want to build a dashboard ea that would display on another chart key metrics : i will foward screeshot of what i want to dashboard to look like : the function i would need to get display are the following: 1. classified past performance ea by magic number ( with classic : total trade , total profit , return/dd , max dd (base on history) , ) 2. equity chart of performance if we click on a magic number we should
the task will be actually quiet simple , i need an active develloper to devellope out of 3 updates an ea STEP 1 (this job): make a classical pair trading ea , that can calculate correlation between assets and trade when the correlation diverge above a specified % the develloper that will postulate for the job will need : 1- to be ok to do the full project this job and the update following 2- very low arbitration , i
Hello, I want to create an EA that can be able to take and optimise trade bids using the trend tracker concept I have developed. The tracker will monitor the 2 lines in the below pictures and then start to activate bids once they cross each other and then be able to manage all bids afterwards towards the direction of the market by opening and closing them intermittently and profitably until the position at the other
Hi man, How are u? I have an EA and I need to check few aspects of the code, if It works fine? I am looking for an expert coder, who can understand mt4 language and help us to solve this out. This job will hardly take about 3-4 hours max for an experienced coder, when explained detail. Also, I would like to give this to someone, who can understand and speak English well. Also, the coder should be able to come via
Hello The EA will work on particular zone choose by the user and can mark it on any TF and with some rules can open trades and mange the trade by some unique rules. the EA need to check the difference by RSI as well and with some extra rules . developer should have good attitude and good communication (englsih) with high performence and knowledge with coding EA. THREE TYPES OF ENTRIES 1: AGGRESSIVE 2: DIVERGENCE 3
Indicator in use: Bollinger Bands Mechanism (See diagrams provided for help) Sells: 1. Trigger candle: When candle low is above the top Bollinger band - accurate to the lowest point scale (e.g. On EURUSD if candle low is 1.07915 and the value of top bollinger is 1.07914 - this is a sell signal; or if on Futures if the increment is .25 or .10 then this is used) 2. Enter sell ONLY on the next candle if price breaks
Indicator in use: Bollinger Bands Mechanism: (See diagrams provided for help) Sells: 1. Trigger candle: When candle low is above the top Bollinger band - accurate to the point scale (e.g. On EURUSD if candle low is 1.07915 and the value of top bollinger is 1.07914 - this is a sell signal) 2. Enter sell ONLY on the next candle if price breaks below the trigger candle LOW (using the e.g. above- if next candle price
hey guys, im looking for an auto mt5 license system through a web app i have already, i simply want it so a unique license key is generated for memebers, they input this onto the EA input and then it checks if its valid. active license per user capped at 5. i already have an mt5 coder and dec team for the app so i dont know if youd prefer to intergrate onto the webapp yourself or simply provide the code and doc so my

Informazioni sul progetto

Budget
30+ USD
Per lo sviluppatore
27 USD
Scadenze
a 1 giorno(i)