0

我目前正在将 ThinkScript 指标转换为 python,但是,我遇到了这段代码,我对它的工作原理有点困惑:

input rollingPeriodMinutes = 60;


def factor = (SecondsFromTime(Market_Open_Time) / (60 * rollingPeriodMinutes) / 100);
def rolloverTime = if factor == Round(factor) then 1 else 0;


rec H1 = compoundValue(1, if !rolloverTime then if high > H1[1] then high else H1[1] else high, high);
rec H = compoundValue(1, if rolloverTime then H1[1] else H[1], high);

我无法真正理解变量“H”中最后存储的内容。你能帮我理解吗?任何帮助真的很感激!谢谢

4

0 回答 0