NexusFi: Find Your Edge


Home Menu

 





very basic thinkscript, having problems


Discussion in ThinkOrSwim

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




 
Search this Thread

very basic thinkscript, having problems

  #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?
Build trailing stop for micro index(s)
Psychology and Money Management
ZombieSqueeze
Platforms and Indicators
Exit Strategy
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
Better Renko Gaps
The Elite Circle
 
  #2 (permalink)
 nguyen74 
Baton Rouge, LA - USA
 
Experience: None
Platform: NinjaTrader, RTrader
Trading: Emini ES, Crude CL
Posts: 60 since Sep 2016
Thanks Given: 24
Thanks Received: 67


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://tlc.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://tlc.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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts