Hi all! I'm a beginner and I'm asking for help which sooner or later other beginners will need. I have programmed a Python algorithm based on Thomas Demark's high breakout using pandas DataFrame and have been trying to adapt it for QuantConnect. I simplify the code as much as possible so as not to overload my question. 

def td_high(i): # this is a Thomas Demark's high
    if (df.high[i - 1] < df.high[i] > df.high[i + 1]
    return i

How to code a buy on the breakout of the last td_high? Any type of order (lmt, stp lmt or mrt). I didn't find any tutorials on this topic

Author