How can I capture the market price at a specific time?


Category:
0
0

How can I capture the market price at a specific time?   For example, I have a TOS study that will submit a market order when a certain condition is met.  How can I record the market price at that time so that I can use it in a trading stop?

Marked as spam
Posted by (Questions: 5, Answers: 3)
Asked on August 13, 2017 6:56 pm
108 views
0
Private answer

You may be trying to solve this using code when it is actually handled by the bracket order you place when creating the conditional order that gets you into the trade in first place.

Assuming you are using a conditional order to enter the trade. There is no way for that code to capture the time of execution, nor the price of execution.

An OCO bracket order is the only way to create a stop loss and/or a profit target that is relative to the entry price. And yes, you can create an OCO bracket, then apply the conditional order statement to it.

Let me know if this clears things up.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on August 13, 2017 9:13 pm