rfresh737 9 posts msg #161462 - Ignore rfresh737 |
12/10/2024 5:07:05 AM
I'm trying to write a script that shows me stocks where the MACD has crossed above within the last 3 days but the charts I see showing the cross over 10 days ago or more or no cross over at 3 days.
What am I doing wrong?
chart-time is 20 days
MACD Line(12,26) crossed above Signal Line(12,26,9) within the last 3 days
and MACD Line(12,26) is above Signal Line(12,26,9) since 3 days ago
draw MACD Line(12,26)
draw Signal Line(12,26,9)
|
xarlor 585 posts msg #161463 - Ignore xarlor |
12/10/2024 8:39:06 AM
Signal Line is not an indicator in SF.
Are you looking for the crossover of the fast MACD line over the slow MACD line or are you looking for one of these to cross above 0?
|
SAFeTRADE 645 posts msg #161464 - Ignore SAFeTRADE modified |
12/10/2024 11:56:22 AM
Try this on for size.
draw zzz on plot price
Alterations can be made, just ask your tailor. :>)
added ZL(zero line) and fast line (e_ema) on chart for better visual. Hope that helps.
|
rfresh737 9 posts msg #161465 - Ignore rfresh737 |
12/10/2024 4:30:04 PM
>Are you looking for the crossover of the fast MACD line over the slow MACD line or are you looking for one of these to cross above 0?
I'm looking for the Fast cross over of the Slow, and for that to happen when both are below 0.
|
rfresh737 9 posts msg #161466 - Ignore rfresh737 |
12/10/2024 4:31:35 PM
>Try this on for size.
Thank you SAFeTrade for that code. I'm still learning SF so it will take me a little while to understand what you wrote, but thank you very much.
|
xarlor 585 posts msg #161467 - Ignore xarlor |
12/11/2024 8:43:05 AM
In simplest terms, here is what you're after:
|
rfresh737 9 posts msg #161468 - Ignore rfresh737 |
12/11/2024 8:53:32 AM
Thank you very much.
|