IntrabarOrderGeneration and current OHLC? - futures io
futures io futures trading



IntrabarOrderGeneration and current OHLC?


Discussion in EasyLanguage Programming

Updated by Form9
    1. trending_up 724 views
    2. thumb_up 5 thanks given
    3. group 1 followers
    1. forum 9 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

IntrabarOrderGeneration and current OHLC?

(login for full post details)
  #1 (permalink)
PHOENIX AZ
 
 
Posts: 5 since Nov 2018
Thanks: 3 given, 1 received

Noobie question regarding backtesting, but my research for finding an answer has come up short.

Under Format > Calculation I've checked Enable intrabar order generation and calculation

Then in my Strategy, if I try to print a previous candle's OHLC such as: Print(Open[1], " ", High[1], " ", Low[1], " ", Close[1]); it works fine.

But if I try to print the current candle's OHLC such as: Print(Open[0], " ", High[0], " ", Low[0], " ", Close[0]); it doesn't work; it prints the Open and the High correctly, but the Low and Close are both printed as the Low.

This problem carries over to my conditionals:
If Close < Low[10]
is being computed identically to
If Low < Low[10]

Earlier, the Open and High were both printing as the High as well, but that magically seems to have fixed itself.

I just need a way to either fix this problem, or ditch intrabar while backtesting altogether.
I'm only using it because it's the only way I've been able to get two targets working when my orders look like Sell Short ( !( "Shorting" ) ) 2 contracts next bar at Market;

Reply With Quote

Can you help answer these questions
from other members on futures io?
Implications of Alex Kearns' suicide
Traders Hideout
Two Data Series in Ninjatrader 7 for Order confirmation
NinjaTrader
Execute NT8-Optimizer by script
NinjaTrader
TOS script
ThinkOrSwim
Think or swim earnings move calculation
Brokers
 
 
(login for full post details)
  #3 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,185 since Apr 2013
Thanks: 384 given, 1,421 received


Hi Form9,

welcome to futures.io. What resolution do you use for the look inside bar backtesting?

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #4 (permalink)
PHOENIX AZ
 
 
Posts: 5 since Nov 2018
Thanks: 3 given, 1 received


ABCTG View Post
Hi Form9,

welcome to futures.io. What resolution do you use for the look inside bar backtesting?

Regards,

ABCTG

OK this is really embarassing, my EL Ref Guide talks about the resolution, and where to find it. But the book is so old, that window isn't where it says it should be. I have Enable Intra-bar Order Generation Optimization with Look-Inside-Bar Back-Testing checked, but can't find anything on resolution.

Edit: Nevermind I found it. Let's see if this works.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,185 since Apr 2013
Thanks: 384 given, 1,421 received

Form9,

the information in this link might be helpful in understanding why you are seeing a certain outcome, especially the second paragraph:
About Intrabar Order Generation

Regards,

ABCTG


Form9 View Post
OK this is really embarassing, my EL Ref Guide talks about the resolution, and where to find it. But the book is so old, that window isn't where it says it should be. I have Enable Intra-bar Order Generation Optimization with Look-Inside-Bar Back-Testing checked, but can't find anything on resolution.

Edit: Nevermind I found it. Let's see if this works.


Follow me on Twitter Visit my Facebook Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #6 (permalink)
PHOENIX AZ
 
 
Posts: 5 since Nov 2018
Thanks: 3 given, 1 received

OK it's still showing the Low and Close as the Low.

I'm on a 15 minute chart backtesting 10 years. My resolution is 1 Minute and Maximum number of bars study will reference: 200.

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,185 since Apr 2013
Thanks: 384 given, 1,421 received

Form9,

I can take a look at what results, but I would need a working code example that shows the behavior on your end. I would also suggest checking if you are seeing this behavior on all bars or just some.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
The following 2 users say Thank You to ABCTG for this post:
 
(login for full post details)
  #8 (permalink)
PHOENIX AZ
 
 
Posts: 5 since Nov 2018
Thanks: 3 given, 1 received


ABCTG View Post
Form9,

I can take a look at what results, but I would need a working code example that shows the behavior on your end. I would also suggest checking if you are seeing this behavior on all bars or just some.

Regards,

ABCTG

OK hold on, now TS won't stop crashing.

Edit: My entire TS is corrupted, I'll have to re-install when I get the time. Thanks for all your help!

Reply With Quote
The following user says Thank You to Form9 for this post:
 
(login for full post details)
  #9 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,185 since Apr 2013
Thanks: 384 given, 1,421 received

Form9,

you are welcome and thank you for letting me know.

In general using intrabar order generation and the look inside bar backtesting it is possible to get different values for the Open, High, Low and Close of a bar.

Just printing the values for the 300 am EST bar on a 15 minute chart within an intrabar order generation strategy without using the look inside bar backtesting (LIBB) already provides different values:
11/19/2018 3:00:00 AM; Open = 2737.00; High = 2737.00; Low = 2737.00; Close = 2737.00
11/19/2018 3:00:00 AM; Open = 2737.00; High = 2737.00; Low = 2736.75; Close = 2736.75
11/19/2018 3:00:00 AM; Open = 2737.00; High = 2739.00; Low = 2736.75; Close = 2739.00
11/19/2018 3:00:00 AM; Open = 2737.00; High = 2739.00; Low = 2736.75; Close = 2738.50

The code however is only computed at the four price points (without LIBB) and that's why the value for Close will reflect the value of the price point that is currently used in the computation (High or Low for example).

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
(login for full post details)
  #10 (permalink)
PHOENIX AZ
 
 
Posts: 5 since Nov 2018
Thanks: 3 given, 1 received


Just wanted to give an update here for any future travelers.

While I was tinkering around trying to fix the problem, my v9.x TS crashed and got corrupted, and I couldn't load any strategies.

Instead of reinstalling x9.x or calling support, I opted to upgrade to v10.x. I was able to carry over all my indicators and strategies. And like magic, no more corruption AND my problem appears to be gone!

All I have checked is Enable Intra-bar Order Generation Optimization with Look-Inside-Bar Back-testing.

I'll edit and update this post if it is, in fact, still broken or breaks again.

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > IntrabarOrderGeneration and current OHLC?


November 19, 2018


Upcoming Webinars and Events
 

Free BloodHound Licenses for everyone!

June
 

Every journal equals ten meals for the hungry

June
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts