Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0301· openaiHugging Face Suzhen/CodeChat

hi

  1. User

    hi

  2. Assistant

    Hello! How may I assist you today?

  3. User

    //HIGH-LOW(S-R) xx=ta.pivothigh(ipush,3,3) yy=ta.pivotlow(ipush,3,3) plotshape(xx,'H',style = shape.labeldown, size = size.tiny,location = location.absolute,color=color.navy, text = 'H',textcolor = color.white,offset = -3) plotshape(yy,'L',style = shape.labelup, size= size.tiny, location = location.absolute,color = color.orange, text = 'L',textcolor = color.white,offset = -3)

  4. Assistant

    It seems like you are using the TradingView programming language, Pine Script. This code calculates the pivot high and pivot low for a given range of candles, and plots the result as a label on the chart using an "H" for pivot highs and an "L" for pivot lows. While this code may be useful for analyzing price action, please note that it does not constitute financial advice and should be used in conjunction with a comprehensive trading strategy.

  5. User

    i wanna make h and l showing immediately without late

  6. Assistant

    If you want the pivot high and pivot low to appear on the chart immediately, you can adjust the offset parameter to a lower value or set it to zero. This will move the label closer to the candles, making it easier to identify the pivot levels as soon as they occur. For example, you can try changing the offset parameter in both plotshape functions to 0 as follows:

    xx=ta.pivothigh(ipush,3,3)
    yy=ta.pivotlow(ipush,3,3)
    plotshape(xx,'H',style = shape.labeldown, size = size.tiny,location = location.absolute,color=color.navy, text = 'H',textcolor = color.white,offset = 0)
    plotshape(yy,'L',style = shape.labelup, size= size.tiny, location = location.absolute,color = color.orange, text = 'L',textcolor = color.white,offset = 0)
    

    This will display the labels right on top of the pivot points without any delay. Keep in mind that this can result in a cluttered chart, so you may want to adjust the size and color of the labels or use different charting styles to make the pivot levels easier to interpret.

  7. User

    i dont wanna i wanna another soluation

  8. Assistant

    If you want the labels to appear even faster, you can try using the fill parameter in the plotshape function to display a colored background around the labels instead of just a text label. This will make the levels more visible and easier to spot when they occur. Here's an example code that implements this technique:

    //@version=4
    study("Pivot High Low with Immediate Labels", overlay=true)
    
    ph = ta.pivothigh(high,3,3)
    pl = ta.pivotlow(low,3,3)
    
    plotshape(ph, location=location.abovebar, style=shape.circle, color=color.green, size=size.small, fill=color.green, transp=0, offset=0, text="H", textcolor=color.white, textsize=size.tiny, textalign=text.align_center)
    plotshape(pl, location=location.belowbar, style=shape.circle, color=color.red, size=size.small, fill=color.red, transp=0, offset=0, text="L", textcolor=color.white, textsize=size.tiny, textalign=text.align_center)
    

    In this code, we use the fill parameter to color the area around the labels with red or green, depending on whether it's a pivot low or pivot high. The transp parameter is set to 0 to make the label background completely opaque, and the offset parameter is set to 0 to make the label appear immediately on the pivot point. Additionally, we set the location parameter to abovebar for pivot highs and belowbar for pivot lows to indicate their position relative to the candle.

    Using this code, you should be able to quickly identify pivot high and pivot low points on the chart as soon as they occur.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.