Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 22:29:46 +0000



Bid and Ask at OHLC

View Count: 219

[2024-02-01 15:19:55]
User411875 - Posts: 1
Is there a way get the bid and ask values at the open, high, low or close of each bar for use of the individual values as a part of a larger custom script? I am coming from thinkorswim and these values were available, am wondering they are also available with sierra. I have gone through the source code Studies5.cpp as well as other custom scripts including the bid-ask indicators but was unable to find a way to get those values at defined/constant intrabar levels. Thank you

The thinkscript code I use looks like this if it helps clarify what data I am looking to see if available.

def askopen = (open(pricetype = pricetype.ask));
def bidopen = (open(pricetype = pricetype.bid));

calls the ask or bid price at the open(or close, high, low, hl2 etc) instead of only recording either at the last traded price or returning the value as it was at the close of the candle.
[2024-02-01 16:10:18]
John - SC Support - Posts: 36284
Refer to the following for how to get this for an Alert:
Study/Chart Alerts And Scanning: Special Functions

Refer to the following for how to access this information using a custom study:
ACSIL Programming Concepts: Accessing Volume at Price Data Per Bar
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account