Counting

To add comments, please log in or register
Trader250
13
Trader250  

Hello,

Is there a way to count green/red candles in a period? 

Marco vd Heijden
Moderator
8156
Marco vd Heijden  
Of course.
honest_knave
Moderator
2302
honest_knave  

Yes, create a variable to store the green count, and another variable to store the red count.

Run a loop through your period. For each candle, if the open is less than the close it is a green candle. Otherwise it is a red candle. You need to decide what you want to do with dojis.

The code varies depending on whether this is MQL4 or MQL5.

Trader250
13
Trader250  
honest_knave:

Yes, create a variable to store the green count, and another variable to store the red count.

Run a loop through your period. For each candle, if the open is less than the close it is a green candle. Otherwise it is a red candle. You need to decide what you want to do with dojis.

The code varies depending on whether this is MQL4 or MQL5.

Could you please explain you better? Because i'm quite new on this platform and i don't know how to use that, i've got mql5, what's the code name?
whroeder1
17943
whroeder1  
  1. No one could explain it better. There is no "code name."
  2. You haven't bothered to learn the language so there is no common language to communicate.
  3. You have only three choices: Search for it, learn to code it, or pay (Freelance) someone to code it. We're not going to code it for you. We are willing to help you when you post your attempt (using SRC) and the nature of your problem.
To add comments, please log in or register