Pivot Variable Help
-
Hello all,
So I'm trying to make a very basic pivot price action EA just for fun.
It's pretty simple but I can't seem to get the logic right on it. My conditions for a Bull Pivot are - Bear Candle id 1 > Bull Candle id 2 and try to save it as a variable and vice versa for a Bear pivot like the screenshot shown here >

I'd like to draw a line when the bear pivot is broken from that candle id to the current candle that closed above it.
Would someone be able to help me with my logic? I really appreciate it in advance.
https://fxdreema.com/shared/HSPYseXebThanks
Butters
-
@jstap would you be able to assist with this king?
-
Your pivots are not set to record an ID, they are set to record price:

-
@Labutters @jstap Okay thank you! Gave that a try and it still doesn't seem to work. I feel like my logic is correct here but no lines are being drawn. Is there something I should look into i'm missing?
-
That's still using price and ID, saving the candle time then use it from time, ID is static but IDs change, time is static but doesn't change.
-
I am so sorry King but I have read the back 10 times and can't seem to understand. Would you be able to give me a quick example?
I even asked chatgpt to explain it to me like i'm 12 lol
-
I use chatgpt all the time, ask it 5-year-old questions, and you quite often get a usable answer. This is an example of what I mean, I forgot how some blocks need adding to to do everything you need: https://fxdreema.com/shared/lAuzqMT7c
-
@jstap oh wow thank you! This is super helpful! Does this look okay to you?
-
Yes it looks good, is it working as needed?
-
@jstap I could not show my gratitude for your help! I think I'm starting to understand. I think it's working properly but the line is static and not being redrawn every time the condition is met. I'm very close to figuring it out but not quiet there.
How would I work around this?
-
Move the once per bar just above the modify block
-
@jstap I actually completely re worked it using @miro1360 candle formations examples and modifying the variables to save the candle id's. For some reason, using conditions and creating the Bull/Bear blocks are easier to work with as variables compared to the actual built in Bull/Bear blocks!
Thank you again for your help!
Will turn to solved
-
