NexusFi: Find Your Edge


Home Menu

 





very basic thinkscript, having problems


Discussion in ThinkOrSwim

Updated
    1. trending_up 2,447 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?
Iran Update May 8: Still Reviewing MOU, Demands Reparati …
Traders Hideout
Post-Summit Market Verdict: ES -1%, NQ -1.5%, 10-Year Yi …
Traders Hideout
Netherlands & Germany Surge as World Cup Field Narro …
Prediction Markets & Event Contracts
ATFX Suspends Prop Trading Unit ATFunded -- Full Review …
Funded Trading Evaluation Firms
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
13 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 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