dubcanada Posted September 21, 2021 Report Share Posted September 21, 2021 Hello, I am trying to replicate the code on https://www.prorealcode.com/prorealtime-indicators/hikkake-pattern/ for the Paintbar to make my own indicator. But I am a little confused how to draw an arrow and I can't seem to find any examples. My code at the moment is I am not sure how to get the graphics engine and such to pass into DrawArrowUp and how to do the calculations for the X,Y. public void MainCalculation() { bool HikakkeBull = false; bool WithinTimeLimit = false; double InsideBullBarHigh; int InsideBarNumber; int HikakkeBarNumber; if (High[1] < High[2] && Low[1] > Low[2]) { HikakkeBull = true; InsideBullBarHigh = High[1]; InsideBarNumber = candleIndex - 1; HikakkeBarNumber = candleIndex; } if (HikakkeBull) { WithinTimeLimit = (candleIndex - HikakkeBarNumber) <= 3; if (Close > InsideBullBarHigh && WithinTimeLimit) { Color upArrow = Color.Green; DrawArrowUp(g, upArrow, candleIndex) HikakkeBull = false; } } } Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted September 21, 2021 Report Share Posted September 21, 2021 You cannot get into graphics from paintbar. Paintbar can do either of 3 things. A. Draw a colored bar or shape either in a band or above/below candle B. Draw one line or a band - two lines with color in between C. Draw a straight line or several lines on the chart What you need is covered by A above. Just set the Color to green or red in the paintbar and set the shape to up or down arrrow. Then once you put the paintbar on the chart, tell it to display above or below the candle. Can't have the same paintbar display both below and above candle, but that's minor. Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted September 22, 2021 Report Share Posted September 22, 2021 Hikakke Candlestick Pattern has been added to MT 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.