Calculating a 30 minute ema & candle via code in a 3 minute chart
Posted: Sun Nov 12, 2023 12:02 pm
hi!
New here and to Pinescript. Not new to programming, tho....
I have a 3 minute chart open.
I need to see if a fast ema is crossing a slower ema as if it were on a 30 minute chart AND see where the bar close is in relation to the EMAs.
I use this as a confluence.
I don't need to see it on the 3 minute chart (tho, it would be nice).
So, if you open a 30 minute chart, and add the EMAs (any fast and slow length), the EMA lines go right up to the last candle. The last candle's EMA lines move up and down when it's live. This lets me see if the current price is above or below the EMAs.
If I put these EMAs on a 3 minute chart, but with a 30 minute timeframe, they stop about 9 candles short of the latest candle.
How do I fill in the rest of the line, all the way to the last candle to test the price-close relation to the lines?
Honestly, I don't even need to see it, I just need it in code to test. But not sure how to do this.
Any help would be appreciated!
New here and to Pinescript. Not new to programming, tho....
I have a 3 minute chart open.
I need to see if a fast ema is crossing a slower ema as if it were on a 30 minute chart AND see where the bar close is in relation to the EMAs.
I use this as a confluence.
I don't need to see it on the 3 minute chart (tho, it would be nice).
So, if you open a 30 minute chart, and add the EMAs (any fast and slow length), the EMA lines go right up to the last candle. The last candle's EMA lines move up and down when it's live. This lets me see if the current price is above or below the EMAs.
If I put these EMAs on a 3 minute chart, but with a 30 minute timeframe, they stop about 9 candles short of the latest candle.
How do I fill in the rest of the line, all the way to the last candle to test the price-close relation to the lines?
Honestly, I don't even need to see it, I just need it in code to test. But not sure how to do this.
Any help would be appreciated!