storing a price level
-
I have been trying the following for hours but without success.
I want to store the price level of the previous candle (ID:1) body /2. In other words the price level of 50% previous candle body.
I tried formula block, but it doesn't seem to work yet.

Can you please help me out?
-
You are useing the same variable for two different price levels. You should use different variables.
-
I don't understand what you mean.
I have used 2 different variables for previous candle open (candle1OpenM5) and close (candle1CloseM5). Than I used a 3rd variable, which is the difference between (candle1OpenM5) and (candle1CloseM5) divided by 2 and stored in variable (variableprice_M5_short).
-
I was wrong sorry. I think your structure should work. I don't know why it doesn't, sorry.
-
You should insert a comment block to individual formula block. Read the value. In this way you know where is going wrong.
-
Thanks I will try to see what happens
-
I finally solved the issue. My calculation was not complete I realized. I needed to add another formula block. All good now;)
-
Could you please show the final form?
-
@isp00rt Sure, here it is:

-
-
@josecortesllobat Thanks! I was just looking into reducing the blocks. Although I did not get the right results with the candle body size (probably because it is in pips), I was able to reduce the project with one block. I now have this:

