Anyone with experience translating Thinkorswim's thinkscript into a Python script? I'm mostly through the phase of matching up equivalent functions in Python and noting syntax quirks, but there's still some 'glue' of the coding which I'm unsure of.
Examples from thinkscript:
1) CompoundValue(int length, IDataHolder visible data, IDataHolder historical data) functions in Thinkscript are calculated per ToS reference "according to the following rule: if a bar number is greater than length then the visible data value is returned, otherwise the historical data value is returned. This function is used to initialize studies with recursion."
-> I can substitute this with if-else (nested) conditionals, I think...
2) Switch-case statements don't exist in Python. Googling "switch case python" yields several links that go into a workaround for Python
So, just looking for anyone to share ideas for translating this correctly.