NexusFi: Find Your Edge


Home Menu

 





very basic thinkscript, having problems


Discussion in ThinkOrSwim

Updated
    1. trending_up 2,521 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
sf8193
San Francisco
 
Posts: 2 since May 2020
Thanks Given: 0
Thanks Received: 0

Hey all,

Just trying to create a script that triggers a trade based on parabolic sar

here is the code.
 
Code
input accFactor = 0.02;
input accelerationLimit = 0.2;

def sar = ParabolicSAR(accelerationFactor=accFactor,accelerationLimit=accelerationLimit);
The scripting editor highlights ParabolicSar and throws an error saying

No such function: ParabolicSAR at 5:12

It works fine when I do this for other studies, having trouble understanding why I get this error with the PSAR study


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trump Media to sell instant access to market-moving soci …
Traders Hideout
My Rant with AMP Futures
Trading Reviews and Vendors
No book, only a stair: journaling fills where price move …
Cryptocurrency
EA
Platforms and Indicators
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
TopStep Trader disappointment
2 thanks
Johnnys Journal
2 thanks
  #2 (permalink)
 nguyen74 
Baton Rouge, LA - USA
 
Experience: None
Platform: NinjaTrader, RTrader
Trading: Emini ES, Crude CL
Posts: 61 since Sep 2016
Thanks Given: 24
Thanks Received: 72


sf8193 View Post
Hey all,

Just trying to create a script that triggers a trade based on parabolic sar

here is the code.
 
Code
input accFactor = 0.02;
input accelerationLimit = 0.2;

def sar = ParabolicSAR(accelerationFactor=accFactor,accelerationLimit=accelerationLimit);
The scripting editor highlights ParabolicSar and throws an error saying

No such function: ParabolicSAR at 5:12

It works fine when I do this for other studies, having trouble understanding why I get this error with the PSAR study

It seems the ParabolicSAR is a study and not a function in thinkscript. Refer to TOS Learning Center for more info.

https://toslc.thinkorswim.com/center/reference/thinkScript/Functions

Have you tried creating a new study by copy & pasting the script from the ParabolicSAR onto the new study then create buy conditions and add whatever alerts you want in the new study?


Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
sf8193
San Francisco
 
Posts: 2 since May 2020
Thanks Given: 0
Thanks Received: 0



nguyen74 View Post
It seems the ParabolicSAR is a study and not a function in thinkscript. Refer to TOS Learning Center for more info.

https://toslc.thinkorswim.com/center/reference/thinkScript/Functions

Have you tried creating a new study by copy & pasting the script from the ParabolicSAR onto the new study then create buy conditions and add whatever alerts you want in the new study?

Yes, I realized the issue is TOS doesn't support studies that use recursive caclulations (like ParabolicSar) so this is unusable for triggers or alerts


Reply With Quote




Last Updated on May 25, 2020


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts