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)
So this question has been racking my mind since I started coding in Easylanguage.
It clearly states here on Tradestation's "about reserved words page" that "Close" = "The last available price for the bar."
BUT
If you read further down just below the Price Data box it clearly states "For example, the reserved data word Close refers to the closing price of the bar currently being evaluated by the EasyLanguage procedure. " WHAT GIVES?
How I'm calculating my strategy greatly depends on the current price of the current bar, not the closing price. The closing prices gives me a lagged entrance / exit on my position.
I would love to hear some thoughts on this. Anything at all would be greatly appreciated!
Thanks,
Brandon
Can you help answer these questions from other members on NexusFi?
You probably want to look at Intrabar Order Generation, but just a warning: that is a tricky topic to get into (I never use it). It will also make accurate backtesting impossible.
You could possibly change your bar size, maybe that will solve your problem.
Thanks, Kevin. Yea I just started playing around with Intrabar Order Generation last month. Testing so far for me has to be "live" instead of backtesting.
`Close` returns the last price of a bar, and what this price is depends on when the script is evaluated:
* When the script is evaluated on bar close (like indicators are on historical data), then `Close` returns the closing price of the bar.
* When the script is calculated on every tick (like real-time indicators and strategies, or a strategy backtested with intra-bar order generation), then `Close` refers to the current price of the bar. That can be the opening tick, closing tick, or any price in between.
This latter makes sense: since we don't know which real-time tick is the last tick of a price bar (there may or may not be more trades coming), `Close` returns the current price of the bar because, if no new ticks come in, then the current price of the bar is indeed the closing price. Hopefully that makes sense.