Login Page - Create Account

Support Board


Date/Time: Fri, 27 Dec 2024 18:44:49 +0000



[Programming Help] - Get index of trade entry bar

View Count: 860

[2016-02-26 02:15:04]
rhovega - Posts: 279
I'm trying to set the stop of a new order at the low of the entry bar (for a long), via ACSIL.
In other words, want this: NewOrder.StopAllPrice = sc.Low[index@bar_of_neworder_creation].

Thought to use sc.GetNearestMatchForSCDateTime to get the index of PositionData.LastEntryDateTime. Unfortunately, that provides the index for the LastEntryDateTime prior to creating the new order, and not the index for the EntryDateTime of the newly created order.

Is there a way to get the index of the bar where a new order is created at the time it is created?

I do not want to modify the order after creation.

Thanks
[2016-02-26 03:12:25]
Sierra Chart Engineering - Posts: 104368
That is the most simple and straightforward way to do it as you are. Just make sure your computer's clock is set accurately because it is dependent on that. The documentation now explains that.

Otherwise, this becomes a matter of troubleshooting what the issue is which is not within the scope of our support.
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

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

Login

Login Page - Create Account