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)
New to EL and trying to figure the following out (mostly with a lot of trial and error).
I'm using a PSP to get the daily close price of another ticker, and working to backtest a strategy but just ran into an issue...
In simple terms, the strategy would take a ticker, and load a second ticker in a PSP, and if the PSP.Close[0] is less than the close of the price seven days ago, PSP.Close[7] then buy the first ticker.
The problem I have is I'm trying to use "Date of Next Bar" in my code (right now in a print statement to troubleshoot), and when I do this it causes the PSP to not update, only showing me the values of one set of dates.
Is there a way to use "PSP.Close" and "Date of Next Bar" together where the PSP.Close will still update?
Looking at the code below - if I remove "Date of Next Bar" it works, but ideally I need to call that data so I can see if I want to buy on tomorrow's date based on other criteria.
Can you help answer these questions from other members on NexusFi?
one thing that comes to mind is using intrabar order generation for what you have in mind instead. Is there a reason why you did not explore this further?
Good idea ABCTG - the reason I didn't explore that, is I haven't used that feature yet.
adding [IntrabarOrderGeneration = True]; and changing at next bar at open to "this bar" seems to work.
There seems to be a bug or something in my code which I'll track down, but overall, I think it's working now.