Hi everyone,
new to Optuma; I would like to import a python code to perform a backtest.
After having right-clicked, and having named the new file, I would like to understand how I can get the closing data using the below code. Are thay stored in an array so that I can use them as a time series?
“””
import Tool
#Init function gets called once when tool is applied/loaded
def Init():
Tool.Props.Name = "ABCD.2 "
#Process function gets called when applied/loaded or when new data is received
#start, end are the start and end+1 indexes of the source data list.
def Process(start, end):
for i in range(start, end):
Tool.DataOut.Row(i).Close = Tool.Source.Row(i).close
“””
Besides, Trying to run the script above, we get the following error, as the Tool module has not been found.
Traceback (most recent call last):
File [\mydoc.intranet.servizi \Optuma\Local\Python Scripts\ABCD.2 .py](file://mydoc.intranet.servizi%20/Optuma/Local/Python%20Scripts/ABCD.2%20.py), line 1, in
import Tool
ModuleNotFoundError: No module named ‘Tool’
Thanks in advance