first tick of bar - EasyLanguage Programming | futures io social day trading
futures io futures trading


first tick of bar
Updated: Views / Replies:2,693 / 7
Created: by cbritton Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

first tick of bar

  #1 (permalink)
Elite Member
Atlanta, Georgia
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: DDT
Favorite Futures: ZN, ZB
 
cbritton's Avatar
 
Posts: 224 since Mar 2010
Thanks: 152 given, 237 received

first tick of bar

Does easy language, more specifically, TradeStation, have a "first tick of bar" type of construct like NT? I'm trying to find a way to initialize a value in an indicator when a new bar is opened, but, obviously, not update that value again on intra bar updates.

Thanks,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
 
  #2 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received


cbritton View Post
Does easy language, more specifically, TradeStation, have a "first tick of bar" type of construct like NT? I'm trying to find a way to initialize a value in an indicator when a new bar is opened, but, obviously, not update that value again on intra bar updates.

Thanks,
-C

Something like this?

 
Code
                            
[IntrabarOrderGeneration True]


Var: 
IntrabarPersist Mp(0), IntrabarPersist MP_prev(0),IntrabarPersist TradesThisBar(0),IntrabarPersist FirstTickOfBar(False); 

MP MarketPosition;  

If 
MP <> MP_prev  then TradesThisBar TradesThisBar 1
If 
FirstTickOfBar then TradesThisBar 0

if 
BarStatus(1)=2 then Value1=Random(10);

if 
TradesThisBar and Mp<>and Value1 5 then Buy next bar Open;//Market;
if TradesThisBar and Mp<>-and Value1 5 then SellShort next bar Open;//Market;

if TradesThisBar and  Mp=and BarsSinceEntry 1 then Sell next bar at Market;
if 
TradesThisBar and  Mp=-and BarsSinceEntry 1 then BuyToCover next bar at Market;

FirstTickOfBar BarStatus(1) = 2

MP_prev MP
Untested code, found on MultiCharts forum.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received


 
Thread Moved


Moved to TradeStation Programming



When creating a new thread, note which subforum you are in. Here is a short list of suggestions:

- Topic: Anything to do with an Elite indicator -> Subforum: The Elite Circle
- Topic: Looking for an existing indicator, or how-to use an indicator -> Subforum: (the platform)
- Topic: Programmer needing help with non-Elite indicator -> Subforum: (the platform) - Programming
- Topic: Want an indicator created/modified -> Reply to "Want indicator created free" in Elite Circle
- Topic: Vendors (trading rooms, commercial indicators) -> Subforum: Vendors/Product Reviews
- Topic: Discussion of Forex or Currency trading -> Subforum: Forex and Currency Trading
- Topic: Journals of your trading -> Subforum: Trading Journals or Elite Trading Journals
- Topic: General trading related discussions -> Subforum: Traders Hideout
- Topic: Discussion of a trading method -> Subforum: Traders Hideout
- Topic: Automated Trading -> Subforum: Elite Automated Trading

Last, any Elite Member may create more or less any of these topics in The Elite Circle at your own discretion (your support is appreciated).

This is just a short general list and doesn't cover everything. If you are unsure where to create your new thread, just create it in Traders Hideout and a moderator will move it if necessary.

-- Big Mike Trading



Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #4 (permalink)
Elite Member
Atlanta, Georgia
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: DDT
Favorite Futures: ZN, ZB
 
cbritton's Avatar
 
Posts: 224 since Mar 2010
Thanks: 152 given, 237 received


Big Mike View Post
Something like this?

 
Code
                            
[IntrabarOrderGeneration True]

Var: 
IntrabarPersist Mp(0), IntrabarPersist MP_prev(0),IntrabarPersist TradesThisBar(0),IntrabarPersist FirstTickOfBar(False); 

MP MarketPosition;  

If 
MP <> MP_prev  then TradesThisBar TradesThisBar 1
If 
FirstTickOfBar then TradesThisBar 0

if 
BarStatus(1)=2 then Value1=Random(10);

if 
TradesThisBar and Mp<>and Value1 5 then Buy next bar Open;//Market;
if TradesThisBar and Mp<>-and Value1 5 then SellShort next bar Open;//Market;

if TradesThisBar and  Mp=and BarsSinceEntry 1 then Sell next bar at Market;
if 
TradesThisBar and  Mp=-and BarsSinceEntry 1 then BuyToCover next bar at Market;

FirstTickOfBar BarStatus(1) = 2

MP_prev MP
Untested code, found on MultiCharts forum.

Mike

I should be able to work with this. Thanks!

-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
 
  #5 (permalink)
Elite Member
new york United states
 
Futures Experience: Intermediate
Platform: Ninja Trader
Favorite Futures: Emini Es
 
Posts: 70 since Aug 2016
Thanks: 5 given, 3 received


Big Mike View Post
Something like this?

 
Code
                            
[IntrabarOrderGeneration True]


Var: 
IntrabarPersist Mp(0), IntrabarPersist MP_prev(0),IntrabarPersist TradesThisBar(0),IntrabarPersist FirstTickOfBar(False); 

MP MarketPosition;  

If 
MP <> MP_prev  then TradesThisBar TradesThisBar 1
If 
FirstTickOfBar then TradesThisBar 0

if 
BarStatus(1)=2 then Value1=Random(10);

if 
TradesThisBar and Mp<>and Value1 5 then Buy next bar Open;//Market;
if TradesThisBar and Mp<>-and Value1 5 then SellShort next bar Open;//Market;

if TradesThisBar and  Mp=and BarsSinceEntry 1 then Sell next bar at Market;
if 
TradesThisBar and  Mp=-and BarsSinceEntry 1 then BuyToCover next bar at Market;

FirstTickOfBar BarStatus(1) = 2

MP_prev MP
Untested code, found on MultiCharts forum.

Mike

Hi Mike, how to i do this first tick of bar on ninjatrader? i am trying to make an indicator trigger a trade on the first tick of that bar.
Thanks

Reply With Quote
 
  #6 (permalink)
Trading Apprentice
Newark NJ
 
Futures Experience: Advanced
Platform: NT, Sierra, Tradestation
Favorite Futures: CL, NQ, ES, RTY, YM
 
Posts: 13 since Dec 2017
Thanks: 0 given, 2 received

I can confirm that the following code works, since I have used it myself in the TradeStation Easy Language

// Make global variable
Variable: IntrabarPersist FirstTickOfBar(False)

if FirstTickOfBar then begin
// Put code here you want processed on first tick of a bar
end;

//Place at very end of code
FirstTickOfBar = BarStatus(1) = 2;

Reply With Quote
 
  #7 (permalink)
Trading Apprentice
Newark NJ
 
Futures Experience: Advanced
Platform: NT, Sierra, Tradestation
Favorite Futures: CL, NQ, ES, RTY, YM
 
Posts: 13 since Dec 2017
Thanks: 0 given, 2 received


odmassion View Post
Hi Mike, how to i do this first tick of bar on ninjatrader? i am trying to make an indicator trigger a trade on the first tick of that bar.
Thanks

The answer for NinjaTrader can be found on this page https://ninjatrader.com/support/helpGuides/nt8/en-us/?isfirsttickofbar.htm

Reply With Quote
 
  #8 (permalink)
Elite Member
new york United states
 
Futures Experience: Intermediate
Platform: Ninja Trader
Favorite Futures: Emini Es
 
Posts: 70 since Aug 2016
Thanks: 5 given, 3 received

Hello...thanks



Thanks,

but is this a strategy? if yes, how do i incorporate it into my NT7?

thanks in advance.

Reply With Quote

Reply



futures io > > > > > first tick of bar

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Range Counter / Tick Counter / Bar Timer zeller4 NinjaTrader 20 August 10th, 2015 04:01 PM
Tick Bar Duration jitasb EasyLanguage Programming 7 March 15th, 2012 03:34 PM
trying to make a chartinig program that goes through data tick by tick acdrew0 Platforms and Indicators 11 January 27th, 2011 01:55 PM
Tick Bar Timer lawtan NinjaTrader 2 December 7th, 2010 07:51 AM
Wondering if there is a "Range " bar without the 1 tick gap Breakout Traders Hideout 7 July 15th, 2010 02:47 AM


All times are GMT -4. The time now is 08:08 AM.

Copyright © 2017 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
Page generated 2017-12-17 in 0.08 seconds with 18 queries on phoenix via your IP 54.145.16.43