Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I am new to this forum and thinkscript but I am picking it up quick as I have prior programming experience. I'm trying to create a basic strategy with the criteria shown below. I created the code off a modified version of the parabolicsarcrossover study so I am confused why this is not working. No plot is being shown even though I can see this criteria occurring by manually looking at the daily. My code to date is shown below each criteria. Any assistance is appreciated. Thank you
Last I checked which was about a few months ago, strategies, while being able to be parsed in Thinkscript, still doesn't work on TOS. The development resources seemed to have moved on to Prodigio.
First off, thanks for the extremely quick reply. While I am new to TOS I have created/modified some other very basic strategies and they seem to work fine. I believe my problem is with the syntax of the parabolic sar as I have created strategies with the MACD with no problems.
took a quick look and I don't like this line:
def psarcrossover = if crosses(sar, close, CrossingType == CrossingType.Bearish) then 1 else 0;
CrossingType is an enumerated variable (like an array basically), you assign its value in the study settings, but then pass it to the crosses() function.. and it will not mean anything to it, where it expects an actual direction (Above, Below)? would be surprised if that line doesn't produce a script error.. but that's where I would look to change. the next line to it sounds OK.