ParabolicSAR Conditional Order


Category:
0
0

Pete,

Is it possible to only use the Parabolic SAR to setup a conditional order? I keep receiving an error “No such function: ParabolicSAR at 1:1”. Is this something ThinkorSwim specific to not allow the Parabolic SAR? If so, are there any work arounds? My code is below:

<pre>

input dollarsPerTrade = 10000;
input accelerationFactor = 0.02;
input accelerationLimit = 0.2;

def psar = ParabolicSAR(“acceleration limit” = accelerationLimit, “acceleration factor” = accelerationFactor);

plot parSAR = psar;
parSar.setPaintingStrategy(paintingStrategy.POINTS);
parSar.setDefaultColor(color.red);

plot Buy_signal =  close crosses above psar;
Buy_signal.setpaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Buy_signal.setdefaultColor(color.dark_GREEN);
Buy_signal.hidetitle();

plot Sell_signal =  close crosses below psar;
Sell_signal.setpaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_down);
Sell_signal.setDefaultColor(color.red);
Sell_signal.hidetitle();plot Data = close;

</pre>

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on July 26, 2019 12:27 pm
348 views
0
Private answer

It is not supported at this time and there is no workaround. The problem is that this indicator uses recursion and that is not permitted in Study Alerts or Conditional Orders.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on July 26, 2019 6:27 pm
0
Hey Pete, I'm trying to do this exact thing and I'm able to enter the ParabolicSAR in my Conditional Order Wizard, but haven't figured out how to enter the actual order so that the exit will be triggered on the 10-bar Regression Line crossing below the PSAR. The study comparison is pretty straight forward. I'm combining this exit with a Trailing Stop in an OCO bracket custom order, and have tested it on a few live trades. The trailing stop has always fired and Conditional Exit order never fires. Part of my confusion is what exactly I should put into the Order Rules window. Chained or unlinked, Stop or Market, etc. I haven't found any resources on the web that explain that window in detail, and the text is more confusing than helpful. I can add screen shots if you like.
( at February 3, 2024 11:36 pm)
0

The first suggestion I have is to view our Master Video on the topic of conditional orders:

https://www.hahn-tech.com/thinkorswim-automated-round-trip-trades/.

The questions you are asking about how to configure the order are explained in detail in that video. So after reading your question I am left with the impression you have not viewed that video yet.

In regards to the idea you are trying to implement: "...10-bar Regression Line crossing below the PSAR...".

I am very certain that Conditional Order tools on Thinkorswim are much to fragile to try to handle something that complex. I know it sounds simple on paper. But I think you have vastly overestimated what Thinkorswim is capable of performing.

( at February 4, 2024 9:08 am)