Use rec or Compoundvalue from Strategy (TOS) in conditional order


Category:
0
0

Hi there,

I implemented a strategy in thinkorswim and backtested it using papermoney. Psrt of the strategy is using the HeikinAshiDiff study (which itself uses ComoundValue). I have read that thinkorswim does not allow the use of recursive or CompundValue in conditional orders, but it doesnt explain why that is, and if there is a workaround.

 

What I want to get is this:

def haclose = (open + high + low + close) / 4;
def haopen = CompoundValue(1, (haopen[1] + haclose[1]) / 2, (open[1] + close[1]) / 2);

haopen just spits out a value, and I would like to use this value as part of the conditional order. Is that somewhat possible? It does work in strategies and P/L floating.

 

Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on November 25, 2018 11:47 pm
415 views
0

Of course the value for haopen also depends on the time frame being used

( at November 25, 2018 11:53 pm)
0

Thanks Pete for the reply, much appreciated. I did search for recursion, but the threads I found did not really go into why TOS doesnt allow to use recursion in study alerts or conditional orders. If I have a certain timeframe open (lets say 10min intraday) and the study (including recursion as outlined above) gives me a tick as output, it seems very easy to transform this into an alarm or conditional order, but still TOS wont allow it. Just trying to understand there reasoning behind this.

Related, are there other brokers which allow this kind of recursion for alerts and conditional orders?

Many thanks.

( at November 27, 2018 8:22 pm)
0

There is no why. Thinkorswim has not enabled it for Study Alerts or Conditional order. Period. You will need to take this up with them if you want more information.

( at November 28, 2018 7:42 am)
0
Private answer

This question appears many times throughout the forum. Not sure what terms folks are using to search for this before posting a new question. Or if they are even searching first. Not possible. No workaround.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on November 26, 2018 8:23 am