NexusFi: Find Your Edge


Home Menu

 





Does Close REALLY mean Current Price or what?!


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one kevinkdog with 2 posts (0 thanks)
    2. looks_two djvie11 with 2 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Jura with 1 posts (2 thanks)
    1. trending_up 6,344 views
    2. thumb_up 2 thanks given
    3. group 1 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

Does Close REALLY mean Current Price or what?!

  #1 (permalink)
djvie11
Chicago, IL
 
Posts: 52 since Jul 2013
Thanks Given: 29
Thanks Received: 1

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

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Deepmoney LLM
Elite Quantitative GenAI/LLM
Are there any eval firms that allow you to sink to your …
Traders Hideout
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Futures True Range Report
The Elite Circle
 
  #3 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,646 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338



djvie11 View Post
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

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.

Follow me on Twitter Reply With Quote
  #4 (permalink)
djvie11
Chicago, IL
 
Posts: 52 since Jul 2013
Thanks Given: 29
Thanks Received: 1


kevinkdog View Post
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.

Reply With Quote
  #5 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,646 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


djvie11 View Post
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.

Sounds good, although I would not recommend either approach (1. using intrabar, 2. doing "live" test instead of backtest).

Good Luck, I hope you find success!

Kevin

Follow me on Twitter Reply With Quote
  #6 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690


djvie11 View Post
(...) "Close" = "The last available price for the bar."

(...) Close refers to the closing price of the bar currently being evaluated by the EasyLanguage procedure. "

`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.

Reply With Quote
Thanked by:




Last Updated on August 9, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts