Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Recheck price range saved in variables by condition

$
0
0

I would like to adapt or expand my PineScript v5 code. Unfortunately, with the current version I get the “Memeory exceeded” bug. I have two time units that I retrieve via request.security. I have the same conditions that I check in the times that create an order block. If the condition is met in the higher time unit, this period of time should be checked again in a lower time unit according to the same conditions. I have two variables HigherTFHigh and HigherTFLow where the values are stored after completion.

here is the part to get the values from the lower TF

`getTimeframe1mData() =>[highTimeframe1, lowTimeframe1, closeTimeframe1] = request.security(syminfo.tickerid, inputTimeframe1, [high, low, close])[highTimeframe1, lowTimeframe1, closeTimeframe1]

[hTf1, lTf1, cTf1] = getTimeframe1mData()`

and here is the part that needs to be checked.

else if lTf1 < BullBoxLow1 and cTf1 > BullBoxHigh1 BullBoxDraw (bar_index, BullBoxHigh1, lTf1, BullBoxColor1, BoxTransparency, "Bull Up")

If the condition is true, the function is executed and stored in an array.

  • Check in Arrays but get memory bug

Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>