Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Hi,
I'm new to writing strategies and have a couple of questions.
1) Let's say I need to access the range of the previous day to set my targets. So I want to enter the order based on some condition intraday with my target set based on previous day's range. So how do I access the previous day's information for my intraday strategy ?
2) Let's say I entered a position today, didn't reach my target and didn't get stopped out. So the next day - do I have to enable the strategy again on the same chart and will it continue from where it left off ? I assume so, but wanted to confirm.
Thanks
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
1.) You could use HighD(1) and LowD(1) for example. Or track the extremes yourself with a variable that you reset on the new day.
2.) If you leave the strategy running, this is not a problem at all. Otherwise it should be able to pick up where it left.
Thanks for the reply. I tried that. but here is my problem - I need to access the daily ATR on an intraday chart. So I have a 2 day 1 min chart and if I need to use 10 day daily ATR, I would need to have 10 days worth of 1 min data on there so that I can use HighD, LowD and compute the ATR. Is that correct ? Or some other easier way to do it ?
Using 10 days of 1 min data and HighD, LowD is an easy way. You will have to deal with the ATR calculation, as you need to make sure it uses the correct values for every day. This will need an array or a loop for sure.
Another approach could be to use a second data stream of daily bars on your chart. Then you can calculate the ATR on Data2. This might even be a little easier.