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.
plotbuysell(buy,sell,green,red,main)
plot(rsi,line,cyan,rsi)
plot(70,line,red,rsi)
plot(30,line,green,rsi)
pjm
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
@vanguardai sir patulong bakit ganito lumalabas
undefined variable "SET NFS" error
copy ko lang yung script galing dito sa Knowledge base functions
//Alignment of the Stars Screener
//Set variables
//You can change the periods and averages used
Set SMA1 = sma(close,20)
Set SMA2 = sma(close,50)
Set SMA3 = sma(close,100)
//Set conditions
Set Aligned = sma1 > sma2 and sma2 > sma3
//Plot Indicators
//Plot(value,type,color,pane)
plot(sma1,line,green,main)
plot(sma2,line,blue,main)
plot(sma3,line,red,main)
//Set Variable
Set RSI = RSI(close,14)
//Plot Indicators
//Plot(value,type,color,pane)
plot(RSI,line,cyan,RSI)
plot(70,line,Red,RSI)
plot(30,line,Green,RSI)
plot(50,line,gray,rsi)
//Plot Net Foreign
Set NFS = NetForeign
Plot(NFS,bar,any,NFS)
//Signals - used to display flags in screener and backtesting.
signals(Aligned,0)
pjm
@vanguardai sir meron pa isang tanung.
paano po palakihin yung font size ng indicator value, yung mga value ng RSI SMA etc. (black circle in the photo)
pjm