question regarding order generation and onbarclose - futures io
futures io futures trading



question regarding order generation and onbarclose


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,285 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,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
 

question regarding order generation and onbarclose

(login for full post details)
  #1 (permalink)
San Jose
 
Experience: Intermediate
Platform: NinjaTrader, Esignal
Trading: Stocks
 
Posts: 107 since Jan 2012
Thanks: 40 given, 21 received

My strategy requires a qualification bar, which can be qualified intrabar, but it MUST be qualified on bar close for an order to be submitted on the next bar.

My approach was to use if barstatus(1)=2 on the qualification bar, and then issue a buy order to go Long.

Her is some pseudocode:

 
Code
if barstatus(1)=2 and (qualification logic) = true then setbuyflag = true;

if setbuyflag=true then Buy ("Long") 2 Contracts next Bar at 
    vTrade_TriggerEntryPrice stop (vTrade_TriggerEntryPrice +3 * vTickSize)  limit;
The problem is that the "next bar" makes it skip a bar. So if setupbar is bar number 1, then I want to be able to enter the market if price reaches a certain point in bar number 2. However, the order only seems to be firing 2 bars after the setup bar, not the next bar.

So what do I do to make this work? Any ideas?

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Second Entry Indicator (Looking for testers/feedback)
NinjaTrader
What blockvolume is visible? - order processing
NinjaTrader
ZigZag with Depth and Backstep
EasyLanguage Programming
COTbase for quant trading?
Elite Algorithmic NinjaTrader Trading
Automatic pattern research with NT
Elite Algorithmic NinjaTrader Trading
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Selling Options on Futures?
109 thanks
Battlestations: Show us your trading desks!
108 thanks
Rank your Futures vs Stocks trading priority
55 thanks
Want your NinjaTrader indicator created, free?
27 thanks
Whats this confusion with margins?
21 thanks
 
(login for full post details)
  #3 (permalink)
London
 
 
Posts: 118 since Mar 2010
Thanks: 42 given, 58 received



KhaosTrader View Post
My strategy requires a qualification bar, which can be qualified intrabar, but it MUST be qualified on bar close for an order to be submitted on the next bar.

My approach was to use if barstatus(1)=2 on the qualification bar, and then issue a buy order to go Long.

Her is some pseudocode:

 
Code
if barstatus(1)=2 and (qualification logic) = true then setbuyflag = true;

if setbuyflag=true then Buy ("Long") 2 Contracts next Bar at 
    vTrade_TriggerEntryPrice stop (vTrade_TriggerEntryPrice +3 * vTickSize)  limit;
The problem is that the "next bar" makes it skip a bar. So if setupbar is bar number 1, then I want to be able to enter the market if price reaches a certain point in bar number 2. However, the order only seems to be firing 2 bars after the setup bar, not the next bar.

So what do I do to make this work? Any ideas?

You are complicating things.
Keep your logic simple. Do only things that are tried and proven. The more tricks you try to pull, the more trouble you will get into down the road. It is the things that you don't know that can hurt you. I might sound negative and discouraging, but I am talking reality: I have seen enough naive people wasting years of their lives trying to do something that they could have do without.

Reply With Quote
 
(login for full post details)
  #4 (permalink)
San Jose
 
Experience: Intermediate
Platform: NinjaTrader, Esignal
Trading: Stocks
 
Posts: 107 since Jan 2012
Thanks: 40 given, 21 received

logic is rather simple.

Once a qualified setup bar is found (determined on close), i then use some of the information from the closed bar to determine entry price for next bar.

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > question regarding order generation and onbarclose


Last Updated on October 27, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 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