Support Board
Date/Time: Wed, 22 Jan 2025 16:59:40 +0000
SC 1814: getting compile errors on s_ACSTrade and s_SCOrderFillData
View Count: 839
[2018-10-01 22:08:48] |
bjohnson777 (Brett Johnson) - Posts: 284 |
Looks like something with the s_ACSTrade and s_SCOrderFillData structs changed over the weekend. I'm getting a lot of compile errors. Are there new docs yet? Source code for testing is in post 1: Offering To The Community: Brett's Multi-Function Trailing Stop Thanks -- Starting remote build of Custom Studies Source files: Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp. 64-bit -- 17:02:21 Allow time for the server to compile the files and build the DLL. The remote build did not succeed. Result: Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp: In function 'int debug_PrintOrders(SCStudyInterfaceRef)': Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:436:54: error: 'struct s_ACSTrade' has no member named 'MaximumRunup' fprintf(FileOut, " MaximumRunup: %f\n", ACSTrade.MaximumRunup); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:437:57: error: 'struct s_ACSTrade' has no member named 'MaximumDrawdown' fprintf(FileOut, " MaximumDrawdown: %f\n", ACSTrade.MaximumDrawdown); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:453:63: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' fprintf(FileOut, " AverageFillPrice: %f\n", OrderFillData.AverageFillPrice); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp: In function 'void scsf_BrettJohnsonsMultiFunctionTrailingStop(SCStudyInterfaceRef)': Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:1939:252: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' LogText.Format("%s %s Replay Exit: Exit Trend Line Hit (RC=%d): Trend Line: %f, Price Current: %f, Slippage: %f", PositionData.Symbol.GetChars(), (pTradeDirection==TD_Long?"Long":"Short"), RC, PriceTemp, PriceCurrent, (PriceCurrent - OrderFillData.AverageFillPrice)); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:1949:245: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' LogText.Format("%s %s Exit: Exit Trend Line Hit (RC=%d): Trend Line: %f, Price Current: %f, Slippage: %f", PositionData.Symbol.GetChars(), (pTradeDirection==TD_Long?"Long":"Short"), RC, PriceTemp, PriceCurrent, (PriceCurrent - OrderFillData.AverageFillPrice)); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:1983:288: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' LogText.Format("%s %s Replay Exit: Multi-Function MA Trailing Stop Hit (RC=%d): MA Trailing Stop: %f, Price Current: %f, Slippage: %f", PositionData.Symbol.GetChars(), (pTradeDirection==TD_Long?"Long":"Short"), RC, Graph_MATrailingStop[i], PriceCurrent, (PriceCurrent - OrderFillData.AverageFillPrice)); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:1994:281: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' LogText.Format("%s %s Exit: Multi-Function MA Trailing Stop Hit (RC=%d): MA Trailing Stop: %f, Price Current: %f, Slippage: %f", PositionData.Symbol.GetChars(), (pTradeDirection==TD_Long?"Long":"Short"), RC, Graph_MATrailingStop[i], PriceCurrent, (PriceCurrent - OrderFillData.AverageFillPrice)); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:2028:262: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' LogText.Format("%s %s Replay Exit: Stealth Price Target Hit (RC=%d): Price Target: %f, Price Current: %f, Slippage: %f", PositionData.Symbol.GetChars(), (pTradeDirection==TD_Long?"Long":"Short"), RC, pPriceTarget, PriceCurrent, (PriceCurrent - OrderFillData.AverageFillPrice)); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:2039:255: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' LogText.Format("%s %s Exit: Stealth Price Target Hit (RC=%d): Price Target: %f, Price Current: %f, Slippage: %f", PositionData.Symbol.GetChars(), (pTradeDirection==TD_Long?"Long":"Short"), RC, pPriceTarget, PriceCurrent, (PriceCurrent - OrderFillData.AverageFillPrice)); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:2071:271: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' LogText.Format("%s %s Replay Exit: Exit Time Hit %d:%02d (RC=%d): Price Current: %f, Slippage: %f", PositionData.Symbol.GetChars(), (pTradeDirection==TD_Long?"Long":"Short"), pTimeExit.GetHour(), pTimeExit.GetMinute(), RC, PriceCurrent, (PriceCurrent - OrderFillData.AverageFillPrice)); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:2082:264: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' LogText.Format("%s %s Exit: Exit Time Hit %d:%02d (RC=%d): Price Current: %f, Slippage: %f", PositionData.Symbol.GetChars(), (pTradeDirection==TD_Long?"Long":"Short"), pTimeExit.GetHour(), pTimeExit.GetMinute(), RC, PriceCurrent, (PriceCurrent - OrderFillData.AverageFillPrice)); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:2115:318: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' LogText.Format("%s %s Replay Exit: Weekend Exit Time Hit %d:%02d.%02d D: %s (RC=%d): Price Current: %f, Slippage: %f", PositionData.Symbol.GetChars(), (pTradeDirection==TD_Long?"Long":"Short"), Hour, Minute, Second, DayOfWeekToString(pWeekendExitDay, TempStr, 100), RC, PriceCurrent, (PriceCurrent - OrderFillData.AverageFillPrice)); ^ Trading_BrettJohnsonsMultiFunctionTrailingStop.cpp:2126:311: error: 'struct s_SCOrderFillData' has no member named 'AverageFillPrice' LogText.Format("%s %s Exit: Weekend Exit Time Hit %d:%02d.%02d D: %s (RC=%d): Price Current: %f, Slippage: %f", PositionData.Symbol.GetChars(), (pTradeDirection==TD_Long?"Long":"Short"), Hour, Minute, Second, DayOfWeekToString(pWeekendExitDay, TempStr, 100), RC, PriceCurrent, (PriceCurrent - OrderFillData.AverageFillPrice)); ^ -- End of Build -- 17:02:24 |
[2018-10-02 09:31:15] |
User553714 - Posts: 184 |
Hi, The two members MaximumRunup & MaximumDrawdown have been deleted from s_ACSTrade structure found in the scstructures.h file incl in sc V1814; presumably since these two members would be the same as MaximumOpenPositionLoss & MaximumOpenPositionProfit for individual trades; I don't use s_SCOrderFillData but check the header file for changes? Hope this helps. Regards |
[2018-10-02 09:38:22] |
Sierra Chart Engineering - Posts: 104368 |
In the ACSIL s_ACSTrade data structure the following members have been renamed: MaximumRunup >> FlatToFlatMaximumOpenPositionProfit, MaximumDrawdown >> FlatToFlatMaximumOpenPositionLoss. In the s_SCOrderFillData data structure the following member has been renamed: AverageFillPrice >> FillPrice.
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: 2018-10-10 22:24:25
|
[2018-10-02 20:04:10] |
bjohnson777 (Brett Johnson) - Posts: 284 |
Got it. The docs still need a quick update: Automated Trading From an Advanced Custom Study: sc.GetTradeListEntry() and Automated Trading From an Advanced Custom Study: sc.GetOrderFillEntry() Thanks |
[2018-10-03 21:23:13] |
Sierra Chart Engineering - Posts: 104368 |
Okay we will get that documentation updated.
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: