Support Board
Date/Time: Fri, 10 Jan 2025 21:03:29 +0000
GET LOWEST OF A BAR
View Count: 727
[2016-09-29 18:13:20] |
User82615 - Posts: 106 |
HELLO I HAVE A TRADING SYSTEM THAT WORKS IN CHARTS IN HOURLY BARS, AND AT 9 IN THE MORNING IT NEEDS TO GET THE LOW BAR TO BE USED LATER IN AN STOP ORDER. SO I USE THIS FUNCTION : (ONCE THE BAR IT'S AT 9 IN THE MORNING) float TrueLow= GetTrueLow(sc.BaseDataIn); But to use this value in an stop order I have to convert the float value into a SCFLoat Array or an Subgraph extra array right? Can anybody tell me how to do this please? Thank you |
[2016-09-29 18:26:55] |
Sierra Chart Engineering - Posts: 104368 |
You need to use: float BarLow = sc.Low[sc.Index]; But to use this value in an stop order I have to convert the float value into a SCFLoat Array or an Subgraph extra array right? Here is an example: s_SCNewOrder NewOrder;
NewOrder.OrderQuantity = 1; NewOrder.OrderType = SCT_ORDERTYPE_STOP; NewOrder.TimeInForce = SCT_TIF_DAY; NewOrder.Price1 = BarLow; 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: 2016-09-29 18:30:24
|
[2016-09-29 18:59:31] |
User82615 - Posts: 106 |
MAYBE I'M ASKING TOO MUCH , AND SORRY IF THIS IS SOMETHING THAT I'M SUPPOSED TO KNOW BUT AFTER DOING EXACTLY AS YOU SAY , WHEN BULIDING THE SYSTEM IT SAYS BarLow WAS NOT DECLARED IN THIS SCOPE THANKS FOR YOUR HELP |
[2016-09-29 19:15:26] |
Sierra Chart Engineering - Posts: 104368 |
You also need to include this line in your code: float BarLow = sc.Low[sc.Index]; 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: