Hi @halcyonguy I hope you are doing well and thank you again for all of your help. In the think script below, it works very well for identifying a 5% price gain from the market open, thank you very much for your help with this. If I wanted to alter the think script so that it sold when the price increased by $0.01 from the market open price, instead of on a percentage basis, may you please help me with this? Thank you again for your time and your help @halcyonguy.
Code:
input sell_percent_gain = 5.0;
input price1 = high;
input start = 0930;
def daystart = secondstillTime(start) == 0;
def dayopen = if daystart then open else dayopen[1];
def daydiff = round(price1 - dayopen,2);
def pergain = round(100*daydiff/dayopen,1);
input trigger_on_all_prices_below_stop = yes;
def sell1 = if (daystart or trigger_on_all_prices_below_stop) and pergain >= sell_percent_gain then 1 else if pergain crosses above sell_percent_gain then 1 else 0;
plot z1 = sell1;