Support Board
Date/Time: Sun, 16 Mar 2025 15:20:26 +0000
[User Discussion] - New kiwi's stuff for 2020+ 🇳🇿 🎆 🎇 🎆 🇦🇺
View Count: 1484
[2020-10-02 00:11:13] |
Kiwi - Posts: 375 |
From a post on the main board. Here's a better version ... and the start of a new kiwi's stuff, kiwi_20. This one permits you to select 3 times (just duplicate a time or use an untraded time if you don't need 3). Modifying it should be easy if needed 🙂 SCSFExport scsf_RecalcChartAtTimes(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { sc.GraphName = "RecalcAtTimes"; sc.StudyDescription = "Recalc At Specified Times"; sc.GraphRegion = 0; sc.Subgraph[0].Name = "Strobe"; sc.Subgraph[1].Name = "dbg 0"; sc.Subgraph[0].DrawStyle = DRAWSTYLE_IGNORE; sc.Subgraph[1].DrawStyle = DRAWSTYLE_IGNORE; sc.Input[1].Name="Also reload chart data"; sc.Input[1].SetYesNo(0); sc.Input[2].Name = "Time to Recalc"; sc.Input[2].ValueType = TIME_VALUE; sc.Input[3].Name = "Time to Recalc"; sc.Input[3].ValueType = TIME_VALUE; sc.Input[4].Name = "Time to Recalc"; sc.Input[4].ValueType = TIME_VALUE; return; } int& bar_is_tested = sc.GetPersistentIntFast(0); // This will test if this bar has been checked and if not // it will test if the bar includes one of the times // and if it does: recalculate and reload if chosen if (sc.ArraySize != bar_is_tested) { bar_is_tested = sc.ArraySize; int this_ = sc.BaseDateTimeIn[sc.ArraySize-1].GetTime(); int next_ = sc.BaseDateTimeIn[sc.ArraySize-1].GetTime() + sc.SecondsPerBar; if ((sc.Input[2].GetTime() >= this_ && sc.Input[2].GetTime() < next_) || (sc.Input[3].GetTime() >= this_ && sc.Input[3].GetTime() < next_) || (sc.Input[4].GetTime() >= this_ && sc.Input[4].GetTime() < next_)) { sc.Subgraph[0][sc.ArraySize-1] = this_; sc.FlagFullRecalculate = 1; if (sc.Input[1].GetYesNo()) sc.FlagToReloadChartData = 1; } } } compiled for SC 2175 Date Time Of Last Edit: 2020-10-02 00:17:44
|
![]() ![]() |
[2020-11-06 01:17:14] |
Kiwi - Posts: 375 |
Just been asked about a script I posted to convert scid to csv (User681150, can you post a link to the original post) which had stopped working. I just tried this version with Python 3.8 and it worked when I inserted a filename at line 91. So hopefully its good in your environment. If not, ask. |
![]() |
[2020-12-18 01:00:10] |
User681150 - Posts: 62 |
hello, i am getting an error, saying i need a buffer of 40 bytes... any idea? Traceback (most recent call last):
File "C:/Users/MTS/Downloads/SCID_to_CSV.py", line 107, in <module> convertRecords(filename, filename[:-4] + 'csv', tzvar, 1) File "C:/Users/MTS/Downloads/SCID_to_CSV.py", line 75, in convertRecords dataRow = struct.unpack('d4f4I', data) struct.error: unpack requires a buffer of 40 bytes |
[2022-08-12 18:19:20] |
RMF2 - Posts: 43 |
Hello I'm getting an error on the code. Could you please give some tips on where to look for the string error? : ValueError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_16260/2227147715.py in <module> 99 print(tzvar, type(tzvar)) 100 else: --> 101 tzvar = float(sys.argv[2]) 102 print(tzvar, type(tzvar)) 103 # filename = 'all' ############## remove ########################## ValueError: could not convert string to float: |
To post a message in this thread, you need to log in with your Sierra Chart account: