Creating custom script
Hello to all.
I'm reading on the Knowledge-Base and trying to copy-paste this TStop script (shown below) to observe how it will show in my chart, but it returns undefine variable error. Hoping anyone can help about resolving this error.
//Buy when RSI crosses 30 and sell if RSI crosses below 70. Cut loss of 5% from the close of the buy signal.
Set RSI = RSI(close,14)
Set Buy = crossover(RSI,30)
Set Sell = crossover(70,RSI)
Set cutloss = stop(close, -0.05, buy, sell)
Set cut = cutloss < -0.05 //This allows us to display the cut loss signal to differentiate it from a normal sell signal.
plot(cut,buy,yellow,main) //the cut or take profit signal will automatically be displayed as the same as your sell condition if you don’t explicitly plot the cut function.
Hi Pjm, tried running your script and it worked fine. I think you are using the old version of VAI, please redownload the new version 1.1 to use the function. Download link is on the main page, www.vaianalytics.com.
In version 1.1 also, all future features will be installed automatically. Let me know if you're still having problems.
Ok, im using the same version also 1.2. Can you send a screenshot of your script editor instead? Double clicking on the chart will show the editor with your script in it
We tested the script with another PC and it works fine. Can you create a new chart window (click on Chart/Widget button in the toolbar) and copy/paste the script to that new chart window's script editor instead? See if that works.
yeah, weird but glad it worked out haha reported this to the devs