Closed kookic closed 6 months ago
well even after looking at the pinescript manual - i'm not sure what highestbars()
is supposed to show / do.
From the name - i'd suspect it's something around dataframe['ema'].rolling().max()
- but the description says "offset to highest bar" - which i assume will be something around dataframe['ema'].rolling().max() - dataframe['ema']
(using close as your code provides the ema as "prices").
However, i'm absolutely uncertain about this (the main problem here is that i don't understand the pinescript manual).
Hope this gets you started in the right direction.
Actual conversations from pinescript to python are however often problematic - and is not something we'll provide actual help or support with.
Thank you very much, I agree, I will drop the matter.
Le sam. 16 mars 2024 à 20:10, Matthias @.***> a écrit :
well even after looking at the pinescript manual - i'm not sure what highestbars() is supposed to show / do.
From the name - i'd suspect it's something around dataframe['ema'].rolling().max() - but the description says "offset to highest bar" - which i assume will be something around dataframe['ema'].rolling().max()
- dataframe['ema'] (using close as your code provides the ema as "prices").
However, i'm absolutely uncertain about this (the main problem here is that i don't understand the pinescript manual).
Hope this gets you started in the right direction.
Actual conversations from pinescript to python are however often problematic - and is not something we'll provide actual help or support with.
— Reply to this email directly, view it on GitHub https://github.com/freqtrade/technical/issues/427#issuecomment-2002093042, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJ2EVOKVCP2DZREXL5B3JTYYSKI3AVCNFSM6AAAAABEZOXPTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGA4TGMBUGI . You are receiving this because you authored the thread.Message ID: @.***>
Hello, I need your help because I cannot convert and use this Pinescript code in my Freqtrade strategy. ta.highestbars is my problem! TV return number hbar from 0 to -CalcPeriod If anyone has a solution, thank you very much.
The part indicator of the pinescript I want to use:
float CalcPrice = "Source" int CalcPeriod = 30
float prices = ta.ema("close", 8) int hbar = ta.highestbars(prices, CalcPeriod) float hval = nz(CalcPrice[math.abs(hbar)]) int lbar = ta.lowestbars(prices, CalcPeriod) float lval = nz(CalcPrice[math.abs(lbar)])