Enter on CalOnBarClose=True, but Exit Immediately on X Ticks - Traders Hideout | futures io social trading
futures io futures trading


Enter on CalOnBarClose=True, but Exit Immediately on X Ticks
Updated: Views / Replies:1,052 / 22
Created: by albertjay 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
 

Enter on CalOnBarClose=True, but Exit Immediately on X Ticks

  #21 (permalink)
Trading Apprentice
Denver CO USA
 
Futures Experience: None
Platform: NT, JForex, Mql4 & 5
Broker/Data: FXCM
Favorite Futures: Forex
 
Posts: 32 since Sep 2016
Thanks: 0 given, 13 received

SpinnyBobos suggestion of using OnMarketData seems to be the way to go, unless you need to backtest.

Just curious why do you not want to use CalcOnBarClose = false ?

Thanks.

Reply With Quote
 
  #22 (permalink)
Elite Member
Crete, IL/USA
 
Futures Experience: Intermediate
Platform: NinjaTrader, Mt4
Broker/Data: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Favorite Futures: ES, CL, EUR/USD, TF
 
spinnybobo's Avatar
 
Posts: 171 since Aug 2009
Thanks: 99 given, 47 received


maryfromcolorado View Post
SpinnyBobos suggestion of using OnMarketData seems to be the way to go, unless you need to backtest.

Just curious why do you not want to use CalcOnBarClose = false ?

Thanks.

for me, using OnBarClose = false becomes problematic when you need values for each bar from things.

I don't know how it is with using indicators like SMA or stochastics and stuff, but if you use

 
Code
protected override void Initialize()
{
      CalculateOnBarClose = false;
}
protected override void OnBarUpdate()
{
    if (FirstTickOfBar)
    {
         if (Close[0] > someValue)
           // do something
    }
}
Unless there is a different way that I don't know about, I am thinking this is how you would normally get around using OnBarClose = false through using FirstTickOfBar

When you compare using the same exact logic with

 
Code
protected override void Initialize()
{
      CalculateOnBarClose = true;
}
protected override void OnBarUpdate()
{
     if (Close[0] > someValue)
        // do something
}
they don't always give the same values. Therefore if your strategy is heavily reliant on things being exact with data values, then it makes sense to use OnBarClose = true

If you have to backtest something, just

Add(PeriodType.Tick, 1); // to Initialize()

just make sure you download the data first before you load the chart so it does not take forever to load.

Reply With Quote
 
  #23 (permalink)
Trading Apprentice
Denver CO USA
 
Futures Experience: None
Platform: NT, JForex, Mql4 & 5
Broker/Data: FXCM
Favorite Futures: Forex
 
Posts: 32 since Sep 2016
Thanks: 0 given, 13 received


Yes, definitely looks timing related (FirstTickOfBar vs OnBarClose), as Close[0] changes with every tick. I will keep that in mind, but for now I have given up on NT, as support couldn't answer my questions on unmanaged strategies. The big issue is they have no Order.Close function like every other trading language I''ve used. And the only strategy they could point me to as an example is CamarillaPointsUnmanaged. One, when ran in real mode it bombs with an order reject. And two, it stops out or hits profit target. That's the only way to get out of the order.

If I missed something, I would love to know how to close an order. I entered a reverse BuyToCover or Sell to get out and sometimes it works, and sometimes it opens up new positions.

Thanks.

Reply With Quote

Reply



futures io > > > Enter on CalOnBarClose=True, but Exit Immediately on X Ticks

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

July Journal Challenge w/$1100 in prizes from TopstepTrader

July

John @ No BS Day Trading (TBA)

Elite only

An Afternoon with FIO member Softsoap (being rescheduled)

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Enter and Exit market using different chart resolution vhanded MultiCharts 0 May 1st, 2015 05:37 AM
Enter and exit positions within the same bar mandelmus EasyLanguage Programming 2 March 12th, 2015 09:41 AM
How to enter long buy on a bar immediately before it closes. bmtfken EasyLanguage Programming 19 July 27th, 2014 07:01 PM
Best Price Enter/Exit? NJAMC Elite Automated NinjaTrader Trading 3 July 8th, 2011 05:00 PM
Viper has a "order entry strategy" that you can use to enter and exit. rcr3908 NinjaTrader 2 April 30th, 2011 05:20 PM


All times are GMT -4. The time now is 03:07 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-06-24 in 0.08 seconds with 25 queries on phoenix via your IP 107.22.63.172