ID 1 = 50% of ID 2
-

I was trying to make the buttom condition. The "Close" part of ID 1 have to be in the middle of the ID 2. When it does. its going to sell

but i cant find median close or do I need to use another way to reach this "condition"
-
Store the candle's middle price in a variable

Here you have an example
-
Thank you so much for your replay
-
@josecortesllobat for some reason it doesnt work. The bottom part of ID 1 need to 50% shorter then ID 2 (just like the first picture). So I use "/2" on aditional setting (as you do). Then I type "CandleMiddleValue" on "put the result in this variable". When I press update there are appear a " you must select a variable". What does it means
-



-
@fxdreema I still doenst work. The bottom part of ID 1 candle need 50% shorter then ID 2 (like picture 1). So the type: double, name is CandlemiddlValue, Value is /2. And it still ask for put variables.
-
I tried many way but still no results. could some one help me. its said select a variable
-
I am not sure if it works as you expected because I have not gotten any signal backtesting it.
https://fxdreema.com/shared/KSrxkWrJ

But it could be an inspiration for you.
-
@josecortesllobat Thank you for the efforts. I see you succeeded the "formula block"How did you did it? everytime when I tried it ask me to select a variable. What did i do wrong?
-

-
To have the closing price of ID1 50% or lower then ID 2 I have the following setting.

Candlemiddleprice or Candlemiddlevalue and /2 means a half of the preview candle. In this case candle ID 2. Am I right?
-

Previous Candle is ID = 1
You're taking the CandleOpen[2] and CandleClose[1]. It is not the CandleMiddleValue of the previous candle [1].
-
@josecortesllobat to making that's happen I need to make 3 separate formula? The first two is define ID 1 and 2? And the third is to make the connection betwine those two?
-
You can use as many formula blocks as you need to achieve what you want.
By definition,
CandleMiddlePrice = (HIGH - LOW)/2
If you want to calculate that price level for any candle going backwards, you just need to type the candle´s ID number for which you want to know its MiddlePrice by following the ID rules given by fxDreema at the formula´s block Candle ID field.
CandleMiddlePrice [0] = (HIGH [0] - LOW [0])/2 -> MiddlePrice of the newest candle
CandleMiddlePrice [1] = (HIGH [1] - LOW [1])/2 -> MiddlePrice of the previous candle
.
.
.
CandleMiddlePrice [n] = (HIGH [n] - LOW [n])/2 -> MiddlePrice of the n-est candle -
@josecortesllobat I dont know what you mean with candle 0.

the first picture (upper part) is recognize by this condition:

ID 1 need to be higher then ID 2. So it can be set on "adjust" +1pips or +0.1pips

The second part (bottom part) is recognize by

But its lack a connection between ID1 closing to ID 2. ID 1 closing need to be at the middle or lower of ID 2. So I put this variable to connect ID 1 and ID 2

If the condition is a fact it will "sell" on the next candle.
Or do I misunderstand you.
-
The candle [0] is the most recent and is being formed as the ticks arrive.

Condition 1 -> CandleOpen[ID = 1] > CandleClose[ID = 2]
Does it matter if the candles are bearish or bullish?

Formula 1 -> CandleMiddleValue [1] = (CandleOpen[ID = 1] + CandleClose[ID = 1] )/2 --> Is this block required? I would say no because of your second condition.
Condition 2 -> ID 1 closing need to be at the middle or lower of ID 2 --> What you want is that the CandleClose[ID = 1] is equal or below CandleMiddleValue [ID = 2] Then, you would need to calculate the middle price of the candle with ID = 2. Right?

Formula 2 -> CandleMiddleValue [2] = (CandleOpen[ID = 2] + CandleClose[ID = 2] )/2Condition 2 -> CandleClose[ID = 1] <= CandleMiddleValue [2]
-
@josecortesllobat Just adding 2 more blocks (formula and condition). I will try. thank you for reaction
-
@josecortesllobat In the last picture I dont see a relation between Candle ID 1 and 2. Its all about ID 2, And what does the plus mean
-
"Condition" block with
CandleClose[ID = 1] <= CandleMiddleValue [2]
As you said
Condition 2 -> ID 1 closing need to be at the middle or lower of ID 2

