I have recently placed an order to sell a stock when 1 of 2 conditional orders were met, and this worked. The first conditional order was to sell the stock if the price increased at least 10% from the market open price. The second conditional order was to sell the stock if the price decreased at least 20% from the market open price. The stock price increased 10% from the market open, and it triggered, which is great.
I then tried inserting a third conditional order to sell the stock at the time, 15:55:00. I put this conditional order in place in the instance that neither of the original conditional orders filled. However, when I included this third conditional order, none of the conditional orders worked, even though this stock increased more than 10% from the market open.
I have tested the thinkScript for the third conditional order on its own, and it did trigger at approximately 15:55:00. However, when included as the third conditional order, the other two conditional orders did not trigger. Below I have included the code for the third conditional order, as well as a screenshot of what my conditional order entries look like. The code is revised from an original code I learned about through a post by @halcyonguy, thank you. May someone please provide me with some guidance so that all three conditions will work? Thank you very much for your time and your help.
I then tried inserting a third conditional order to sell the stock at the time, 15:55:00. I put this conditional order in place in the instance that neither of the original conditional orders filled. However, when I included this third conditional order, none of the conditional orders worked, even though this stock increased more than 10% from the market open.
I have tested the thinkScript for the third conditional order on its own, and it did trigger at approximately 15:55:00. However, when included as the third conditional order, the other two conditional orders did not trigger. Below I have included the code for the third conditional order, as well as a screenshot of what my conditional order entries look like. The code is revised from an original code I learned about through a post by @halcyonguy, thank you. May someone please provide me with some guidance so that all three conditions will work? Thank you very much for your time and your help.
Code:
input time1 = 1555;
def timez = SecondsFromTime(time1) == 0;
def desiredbar = timez;
plot z1 = desiredbar;