Support Board
Date/Time: Mon, 23 Dec 2024 14:31:42 +0000
ACSIL trading: checking "last" price and sending order ahead of time
View Count: 16045
[2015-09-23 21:19:59] |
User44052 - Posts: 34 |
Hello. I'm a former user of TradeStation and trying to find my way around SierraChart. 1) In TradeStation's EasyLanguage, if I wanted to check if the price has touched, for example, a Moving average, I would use "Close" (e.g: if Close >= MA do something). This would work intrabar, and does NOT wait for the actual closing price of a bar. So, while a bar is building, the last traded price is always referred to as Close, even before the bar has actually closed. What is the equivalent in SierraChart? My attempts to use sc.Close seem to wait for the bar to finish and the closing price of that bar is referred to. How do I check a price level has been reached DURING the building of a bar? 2) Also in Tradestation EasyLanguage, there was a command to send an order on the NEXT bar. So, let's say, if the price touches the Moving Average, I'll send an order that will become active AFTER the current bar has completed. Is there an equivalent in SierraChart? Thanks in advance. Date Time Of Last Edit: 2015-09-23 21:20:45
|
[2015-09-24 02:48:15] |
Sierra Chart Engineering - Posts: 104368 |
1. sc.Close[] for the last bar in the chart definitely contains the latest price as the bar is being built. There is no other possibility unless the Session Times are filtering out the data: http://www.sierrachart.com/index.php?page=doc/doc_SessionTimes.php 2. This is not supported. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2015-09-24 07:49:50
|
[2015-09-24 07:42:15] |
User44052 - Posts: 34 |
Thanks. Can I assume that the same applies to sc.High and sc.Low? Do they, too, change while the bar is building? |
[2015-09-24 07:49:35] |
Sierra Chart Engineering - Posts: 104368 |
Yes.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2015-09-24 17:49:16] |
ejtrader - Posts: 688 |
For 2 - If you have this in your code(check for end of bar condition) - the behavior should be same as tradestation. // sc defaults section // This is similar to tradestation code -- if barstatus(1) != 2 return; if(sc.GetBarHasClosedStatus(sc.Index) == BHCS_BAR_HAS_NOT_CLOSED) return; // Generate Trade Signals - These signals would be generated at the end bar - if you plot any signals - they would be marked for current bar // However the trade itself would be valid/sent for the next bar Date Time Of Last Edit: 2015-09-24 17:57:37
|
[2015-10-06 19:32:39] |
User44052 - Posts: 34 |
Thanks ejtrader - very helpful.
|
To post a message in this thread, you need to log in with your Sierra Chart account: