Sacramento, CA
Posts: 2 since Feb 2021
Thanks Given: 0
Thanks Received: 0
|
Hello
I have a question on Dailyopen() study, when I included that in a conditional order it shows where the entries are (on the lower part of chart in the conditional order builder), but when I included that in an order, it doesn’t get executed.
Attached is the chart showing order (Its just following the price and not getting executed).
Is there is any way to buy the stock when it goes above the today’s open price of day, on 1 minute time period.
Here is the code for dailyopen() (which come with TOS study ) can this be modified or I’m just looking for a way to buy the stock when it crosses above the daily open.
input aggregationPeriod = AggregationPeriod.DAY;
input showOnlyLastPeriod = yes;
def prevPrice = open(period = aggregationPeriod)[-1];
def price = open(period = aggregationPeriod);
plot DailyOpen = if showOnlyLastPeriod and !IsNaN(prevPrice) then Double.NaN else price;
DailyOpen.SetDefaultColor(GetColor(2));
DailyOpen.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Thanks.
|