Specify a BUY or SELL x number of minutes into a candle

mass

New member
VIP
Hello, is it possible to specify a BUY or SELL x number of minutes into a candle? For example if candles are set to 5 minutes and the price at 3.5 minutes into current candle is $0.50 > close[1] of last candle, then place order. I tried to use AggregationPeriod.THREE_MIN; but I must be doing something wrong. Thanks.
 
For what purpose; Conditional order, Strategy? Do you specifically need 3.5 minutes as a requirement, or are you just using that as an example, perhaps to avoid how strategy entries default to the opening price of the next bar?
 
For what purpose; Conditional order, Strategy? Do you specifically need 3.5 minutes as a requirement, or are you just using that as an example, perhaps to avoid how strategy entries default to the opening price of the next bar?
Thank you @Joshua for your reply. Yes, the ultimate purpose is for live conditional orders but would be nice to use for back testing via Strategy as well. 3.5 minutes was just an example. Yes, trying to avoid how strategy entries default to the opening price of the next bar. Trying to see if it can be set to execute a conditional order x number of minutes into a 5 minute candle. Appreciate any help. Thank you!
 
With strategies, the open of the next candle is just a default placeholder. You can put whatever price you want based on how the strategy works. I think this is a little bit off topic though, we're talking about too many things at once.

I am still not really sure if you're trying to deliberately delay action for x number of minutes on purpose, or if you're attempting to avoid a perceived delay.

Deliberately, no time frame can see lower than itself, but you could work from a one minute chart, and extrapolate the five minute signals from every 5th bar. This way you could tell how many minutes have elapsed within a five minute period. That's the simple explanation anyway. I am probably making it sound much easier than it actually is.

If you're concerned that conditional orders will only trigger on the open of the next bar, like you might have assumed that strategies do, then you don't have to worry about that. They'll trigger immediately once the condition is true, aside from any latency of course. There's no delay until the next bar, or anything like that, unless it is specifically directed to do so.
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
403 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top