Spike or candle identification
Wamaitha Nyamu: However is there a generic way of identify whether we are in a spike or a candle regardless of time frame or whether its a boom or crash without hardcoding the length.
Of course, there is. Code it without hard coding the size. E.g. the tail > 2 body size, or |prevClose-close| > ATR William Roeder #:
Of course, there is. Code it without hard coding the size. E.g. the tail > 2 body size, or |prevClose-close| > ATR
Of course, there is. Code it without hard coding the size. E.g. the tail > 2 body size, or |prevClose-close| > ATR
@William Roeder While this can work for some cases. It doesnt always work. Look at the attached image. They both have the same length. Im looking for a solution that doesnt rely on length. Like what prompts mq5 to plot that specific candle as a candle while another as a spike regardless of length.
Files:
booom.jpeg
223 kb
- Wamaitha Nyamu #: It doesnt always work. Look at the attached image. They both have the same length.
Until you can state your requirements in concrete terms, it can not be coded.
- Wamaitha Nyamu #: Like what prompts mq5 to plot that specific candle as a candle while another as a spike regardless of length.
The market movement made the terminal plot that candle.
How can I code a spike without hard coding it, that is using the length as a differentiating factor

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, I have the following code that hard-codes how to identify a spike and a candle on boom 1000 and crash 1000 for the M1. However is there a generic way of identify whether we are in a spike or a candle regardless of time frame or whether its a boom or crash without hardcoding the length. This code is part of ontick since I want to know at present if the current formation is a candle or a spike. Im assuming there is a mathematical way mql5 computes it so as to draw the different styling on the chart. For example on my chart a spike is red and a candle is green. So whats the code behind the scenes that does this regardless of timeframe or symbol.