Candle coding help

 

Hey there, I want to make an EA robot that trades based off of the latest 3 COMPLETE candlesticks in time.

Basically I want the last 3 candles in time to be used as an indicator to buy if the candles meet the following criteria: Candle 3 being the latest and Candle 2 being the second latest and candle 1 being the third latest. I want to execute a trade if candle 3 is greater than or equal to candle 1, but candle 2 is less than candles 1 and 3. 

Any code help would be much appreciated. Thanks

 
TimmyGack :

Hey there, I want to make an EA robot that trades based off of the latest 3 COMPLETE candlesticks in time.

Basically I want the last 3 candles in time to be used as an indicator to buy if the candles meet the following criteria: Candle 3 being the latest and Candle 2 being the second latest and candle 1 being the third latest. I want to execute a trade if candle 3 is greater than or equal to candle 1, but candle 2 is less than candles 1 and 3. 

Any code help would be much appreciated. Thanks

Draw your idea in the form of a picture - just keep in mind this moment: it is generally accepted that the rightmost bar on the chart has index # 0.


 
TimmyGack: I want  … candle 2 is less than candles 1 and 3. 
  1. You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help 2017.04.21

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum 2018.05.12

  2. A candle has four (4) values (OHLC,) "less" is meaningless in this context. Unless you can state your want in concrete terms it can't be coded.