Help with Higher Lows Price sync with Higher Low MACD when candle crosses MA
Forums › ProRealTime English forum › ProBuilder support › Help with Higher Lows Price sync with Higher Low MACD when candle crosses MA
- This topic has 72 replies, 3 voices, and was last updated 5 years ago by GraHal.
-
-
09/09/2019 at 3:24 PM #10698009/09/2019 at 3:59 PM #10698109/09/2019 at 4:08 PM #10698209/09/2019 at 5:08 PM #106984
I have loaded the indicator in the chart for the lowest Price and in the MACD for the lowest MACD.
I still see some hesitations. See my attachment.
.
Below the MACD you see the histogram of the candles/period of the cycle low..
I see there is a moment where there are 2 cycle lows next to each othere, but in both it doesn’t take the lowest Price..
In the MACD below the chart, I made the lowest MACD in cycle light blue dashed. That doesn’t fit with the real lowest MACD in cycle.
.
Do I overlook something?09/09/2019 at 5:11 PM #10698509/09/2019 at 5:56 PM #10698709/09/2019 at 6:58 PM #106995Yes – I thought that was what you said you wanted – but I did wonder. So you really want the lowest price during the cycle – not the lowest price at the lowest MACD in the cycle? That’s easily fixed.
123456789101112131415161718192021222324macdl = macdline[12,26,9]macds = exponentialaverage[9](macdl)//start of cycleIf macdl < macds and macdl[1] > macds[1] thenmacdlowest2 = macdlowestlowestprice2 = lowestpriceincycle = 1macdlowest = macdlLowestPrice = lowendif//Eend of cycleIf macdl > macds and macdl[1] < macds[1] thenincycle = 0endif//lowest macd and price in cycleif incycle thenmacdlowest = min(macdlowest, macdl)lowestPrice = min(lowestprice, low)endifreturn macdlowest as "lowest macd in cycle", lowestprice as "lowest price in cycle", macdlowest2 as "previous lowest macd in cycle", lowestprice2 as "previous lowest price in cycle"09/09/2019 at 7:55 PM #107004Yes, with an extra endif after line 22 that works perfectly for the lowest price. But for the lowest of the MACD I still have some problems.
See thee attachement. The lowest prices are perfect, but the MACD is still not right, see the ellipses in the image. The light blue dashed line in the MACD is the lowest MACD of the indicator.09/09/2019 at 8:14 PM #10701009/09/2019 at 8:17 PM #107011Add the indicator directly into your chart and make the lowest MACD end the previous lowest MACD invisible.
And Add the indicator directly into you MACD and make the lowest price and the previous lowest price invisble.
Then the indicator is the best visible to test it.09/09/2019 at 8:37 PM #107012Sorry for the many posts.
It works with the MACD lowest when I add it as a seperate indicator. The I see the lowest macd in cycle is the lowest macd from the last finished cycle low. When I add the indicator into the MACD itself, then it makes something totally different out of it.
The previous lowest in the MACD, I don’t understand what comes out of that. But that doesn’t matter to me, because what I need to see is shown in the lowest MACD. So I switch that to invisible.09/09/2019 at 9:08 PM #107015I was just about to post to say that I found exactly the same problem. Plotting on the MACD indicator does not seem to work correctly.
It is best to draw your own MACD so I adapted the code this to prove that the positions were all correctly identified:
123456789101112131415161718192021222324252627282930313233343536macdl = macdline[12,26,9]macds = exponentialaverage[9](macdl)//start of cycleIf macdl < macds and macdl[1] > macds[1] thenmacdindex2 = macdindexlowindex2 = lowindex//macdlowest2 = macdlowest//lowestprice2 = lowestpricedrawvline(macdindex) coloured(0,0,255)drawvline(macdindex2) coloured(0,0,0)drawvline(lowindex) coloured(255,0,0)drawvline(lowindex2) coloured(0,255,0)incycle = 1macdlowest = macdlLowestPrice = lowendif//Eend of cycleIf macdl > macds and macdl[1] < macds[1] thenincycle = 0endif//lowest macd and price in cycleif incycle thenmacdlowest = min(macdlowest, macdl)lowestPrice = min(lowestprice, low)if macdlowest = macdl thenmacdindex = barindexendifif lowestprice = low thenlowindex = barindexendifendifreturn macdl, macds//macdlowest as "lowest macd in cycle", macdlowest2 as "previous lowest macd in cycle", lowestprice as "lowest price in cycle", macdlowest2 as "previous lowest macd in cycle", lowestprice2 as "previous lowest price in cycle"09/09/2019 at 10:58 PM #107022I saw that the values are correct in the indicator when I inserted it as an individual indicator, not when I inserted it into the MACD-indicator.
I have also made the cycle high version :-). It works.
I am now gonna work on how to make the indicator better readable.
I keep you posted.
Thanks a lot Vonasi for your patience and your passion,
Marc09/10/2019 at 8:10 AM #107028Good morning,
I have a few questions….still.
-Which vlines are the the ones inline 13 and line 15? They mark the bar with the lowest Macd before the next bar with the lowest MACD in the cycle, right? Are these interesting?Is there a reason you gave them a vline?And….
Is there a way to name the lowestprice of the last cycle low and the lowest price of the cycle low befor the last cycle low.
.
So I can drawtext when…………… the lowest price of the cycle low [1] < the lowestprice of the cycle low
The same with the macdl.…………. the lowest macdl of the cycle low [1] < the lowest macdl of the cycle low
.Actually don’t want to see all the movements from from the lowest prices and macdl’s. It makes the chart so noisy. I am only interested actual bars.
I tell you the end result I am working on.
if open < sma50 and close > sma50 and macdl > macdlowest from the last cycle low and low > lowest of the last previous cycle low then
DRAWTEXT…….
This is the only place where I want something to see in my chart.
I included this allready some post befor, but here again in the image.09/10/2019 at 8:49 AM #107032I chose vertical lines because… well because I just did! No real reason.
You can draw arrows or write text wherever you like on a chart. See DRAWTEXT and DRAWARROWUP, DRAWARROWDOWN etc in the documentation.
Here is the cycle low code with arrows added when the conditions you describe are met.
Apply it directly to the price chart using the wrench/spanner in the corner
123456789101112131415161718192021222324252627282930313233macdl = macdline[12,26,9]macds = exponentialaverage[9](macdl)//start of cycleIf macdl < macds and macdl[1] > macds[1] thenmacdlowest2 = macdlowestlowestprice2 = lowestpriceincycle = 1macdlowest = macdlLowestPrice = lowendif//end of cycleIf macdl > macds and macdl[1] < macds[1] thenincycle = 0endif//lowest macd and price in cycleif incycle thenmacdlowest = min(macdlowest, macdl)lowestPrice = min(lowestprice, low)c1 = open < average[50](close)c2 = close > average[50](close)c3 = macdlowest > macdlowest2c4 = lowestprice > lowestprice2if c1 and c2 and c3 and c4 thendrawarrowup(barindex,low)coloured(0,128,0)endifendifreturnNote: code edited at 1102 to correct averages.
-
AuthorPosts
Find exclusive trading pro-tools on