I got it already, thanks same way.
Hi Filip, all,
hope you are well.
I was testing the simple MA strategy and I get this error:
Add to Chart operation failed, reason: Script could not be translated from: null
The script is:
strategy(title=MAstrategy")
m=sma(close, 10)
buy=close > m
sell=close < m
strategy.entry(âbuyâ, true, 1, when=buy)
strategy.close(âbuyâ, when=sell)
Can you, please, help?
Thanks
I found the error, forgot " before âtitleâ.
Thanks
Does anyone know of there is a platform, in which you can program trades using Pine Script or equal. It would be great to find a site so that I can copy backtested programs from Tradingview Pine Script into say CFi . Is it possible? Any thoughts? Any platforms?
Hi everyone, I am just getting started with pinescript, I do have a bit of programming knowledge in other languages, but totally new to pinescript
I have 2 question,
is it possible to read values from data generated with Java script?
Can pinescript get values from a python script?
I searched through the official references but didnât find anything.
Hey @Ahmer_Malik, hope you are great.
If there is nothing related on the pinescript documentation nor internet, probably it is because there is no way, what it comes to my mind is an API that you can develop to bridge python code and pinescript, if pinescript have methods to work with APIs, if not, through javascript probably.
i did not understand quite well this question, i mean it is possible to read any value generated through a function on JS, you just have to send it through the console for example.
If you have any more questions, please let us know so we can help you!
Carlos Z.
i try to use your code and i get : Add to Chart operation failed, reason: Script could not be translated from: null
what indicator is this that makes a thick bar under the candles and where can i get it? thanks bro
Probably some conflict or variable problem. I am not 100% sure how all parameters can/must be declared.
Question:
i followed yiur instructions 1:1 but when i try to add it to the chart it says:
âAdd to Chart operation failed, reason: Script could nt be translated from: )|E| /B/ buy=close > mâ
Whats up with that??
Thanks for your help!! @filip
its ok i got it!!! i accidently had a" , " after (close, 10)⌠haha
Hi @filip @thecil
First of all thanks for the interesting course.
I just watched the âBuilding a Simple Strategyâ lesson and wonder isnât it a mistake in buying above MA and selling below it?
This way it seems like buying at higher price and selling at lower, what leads to losses, doesnât it?
I canât assure you that, depends too much on the strategy, some times buying/selling below or above an MA values could be part of the strategy, so any case i advice to run some tests over your theory and check if the results are positives (gains) or negative (loses).
Carlos Z
Hi can someone please help me with backtesting the strategy of an existing indicator in TradingView?
It keeps giving me errors.
I want to backtest this strategy:
https://www.tradingview.com/script/DfKqRsJb/
I tried different combinations of strategy.long inputs. Latest being:
strategy.entry(âLongâ, strategy.long, 1000, when=long_final, comment=âLongâ)
strategy.close(âLongâ , when = short_final, comment=âSellâ)
doing the same exmaple strategy as you did, as today, it gives a maximum drawdown of 3%.
Ho is this possible since you had about 22%?
From what I understand if once the drawdown has been 22% in the future it has to be at least the same (or lower if a new DD occurs).
thanks
Different prices on different times, its completely normal .
Market conditions change all the time, so is there is no a perfect strategy that works long term (unless you improve it over years).
Carlos Z
Hi @filip
In your strategy example, is it more complex if you would want to add leverage into the back test script?
That is onchain data. It is the BSI indicator that Filip has created that can be purchased from Ivanontech.
Hello sir @filip are we still using tradingview for building and testing strategies? Iâm just making sure before making a subscription on their site.
Dropping a comment because I would love to know as well.