♥ 0 |
Hello Pete I’m new to TOS platform, Saw your web site, very nicely put together. I don’t have much programming experience, i was able to write this one line code with help of the strategy builder, there seems to be something wrong with the code since the order just keep following the ask but doesn’t gets executed, attached are the screen capture.
Thanks.
Marked as spam
|
Private answer
There are actually two problems. First, your question’s title says “Buy if current ask if higher than previous bar High”. So you really don’t want to use the close here, do you? That should be the high. Second, the phrase So I would suggest: Notice I have left out the parentheses following the word ask. They are not required: http://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Fundamentals/ask.html However when building this with the condition wizard the parentheses are added. So it works either way. See screenshot below for how this would be build using the condition wizard. Marked as spam
|
|
Private answer
Hello Pete Thanks for the quick reply, today i test out this on the paper trade side of TOS, and something strange i happening, its just executes the order right way and doesn’t wait for the current ask to go higher than the previous bar high. Attached is the screen capture. Thanks. Marked as spam
|
Please log in to post questions.
Typically we do not permit “new answers” to be posted unless the user is providing a new or improved solution to the posted question. But in this case your screenshots provide a very crucial piece of evidence so we will permit it. In the future, please do not use the “Post your Answer” box at the bottom of the thread, instead, use the comment link as I have done here.
Now on to your issue. I notice your chart is set to one minute. I suppose that you are expecting this to somehow impact the time frame applied to your conditional order. It does not. Totally not connected in any way shape or form.
The time frame applied to your conditional order is set in the window in which you build your code. It’s at the very top left corner. Easy enough to miss. Yours is set to Daily. How do I now that? It is revealed within the text of the notification in your first screenshot:
“FILLED BUY +100 MSFT MRKT WHEN MSFT STUDY ‘ask is greater than high from 1 bar ago;D’ IS TRUE [TO OPEN]”
You see the D? That means the time frame for this conditional order was set to Daily. This is why your order executed immediately.
Details, details, details….. must learn to look everywhere for those pesky details.
Great, Its works now,
Thanks.!!