Relative Content

Tag Archive for pine-scriptpine-script-v5tradingview-apipine-script-v4

Save intermediate price of realtime candle in var

I want to write the candle price in a var for every true of my indicator. I also want to output every candle price that was achieved by the indicator over the day in a total. Therefore, I want to summarize all profits that were made using the indicator over a session day in a total. Since I work with realtime candles, I don’t want to have the close, open, high or low price because if I specify var myprice = close for realtime candles, I won’t see the current price when the indicator = true, but the last close price of the entire realtime candle. It would be important for me to save the realtime price for the indicator true in a var, which is available when the indicator goes to true

How can i join 3 different alert conditions together with logical operators

I want to join 3 minute macd signal crossover alert on 3 minute timeframe. The alert should only be activated when 15 seconds macd is under zero line and macd crossover signal. Also same for when 3 minute macd signal crossunder alert on 3 minute timeframe, Alert should only be activated when 15 seconds macd is over zero line and macd crossunder

Problem at Strategy Positions, Script cannot compile after this

I tried to automate my strategy using webhook. For this, when entering an alarm, I need to determine whether it is buy or sell from the “side”: “{{strategy.order.comment}}” section. I used the Strategy.entry and strategy.exit commands for this, but my indicator was broken.