Close a position in Range Bar at specific time - EasyLanguage Programming | futures io social day trading
futures io futures trading


Close a position in Range Bar at specific time
Updated: Views / Replies:779 / 5
Created: by ewind 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
 

Close a position in Range Bar at specific time

  #1 (permalink)
Trading Apprentice
Hong Kong
 
Futures Experience: Beginner
Platform: Multicharts, MT4
Favorite Futures: Hang Seng Index futures
 
Posts: 4 since Aug 2015
Thanks: 0 given, 0 received

Close a position in Range Bar at specific time

My strategy is based on range bar chart. How can I close a position at a specific time, such as 10 minutes before market close, in which the range bar may not completed at that specific time? I have tried turning on the intrabarordergeneration and added a time chart as subchart as data 2, but still no luck.

Appreciate with your help.

Thanks

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,527 since Apr 2013
Thanks: 229 given, 853 received
Forum Reputation: Legendary


ewind,

you don't need a second datastream, but it does require intrabar order generation. For historical exits you can use the bar tick by tick timestamp that you can access, but for realtime exits you'll have to use your computer clock.

Regards,
ABCTG


ewind View Post
My strategy is based on range bar chart. How can I close a position at a specific time, such as 10 minutes before market close, in which the range bar may not completed at that specific time? I have tried turning on the intrabarordergeneration and added a time chart as subchart as data 2, but still no luck.

Appreciate with your help.

Thanks


Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Hong Kong
 
Futures Experience: Beginner
Platform: Multicharts, MT4
Favorite Futures: Hang Seng Index futures
 
Posts: 4 since Aug 2015
Thanks: 0 given, 0 received

Dear ABCTG,

I am new to easy language therefore I hope you don't mind my stupid questions.

Historical Exits: -> Would you elaborate how to access the tick timestamp?
Realtime Exits: -> I guess I can use currentTime instead of time in my coding. However, is that mean I have to switch currentTime/Time between backtest/SA?

Here is how the code look like for single datastream:

condition1 = Time >= CalcTime(SessionEndTime, MinBeforeClose ) and Time < SessionEndTime;

if condition1 then
if marketposition(0) = -1 then
buytocover next bar at market
else if marketposition(0) = 1 then
sell next bar at market;


Thank you very much.

Reply With Quote
 
  #5 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,527 since Apr 2013
Thanks: 229 given, 853 received
Forum Reputation: Legendary

ewind,

check out this link:
https://www.multicharts.com/trading-software/index.php/Bar_Magnifier

You can let the code detect if it's currently historical data or realtime data. Check out LastbarOnchart and airealtimecalc for example to accomplish this.

Regards,

ABCTG

Reply With Quote
 
  #6 (permalink)
Trading Apprentice
Hong Kong
 
Futures Experience: Beginner
Platform: Multicharts, MT4
Favorite Futures: Hang Seng Index futures
 
Posts: 4 since Aug 2015
Thanks: 0 given, 0 received

Thanks ABCTG. After further study, I find that my original code works for real time exit, but the actually exit time is different from what it shown in performance report.

For historical exit, I turned on the "Enable access to intra-bar time...", it seems returning what I expected (sometime still close session in next day, very strange), although it take much much longer to complete the back-test.

Thank you very much

Reply With Quote

Reply



futures io > > > > > Close a position in Range Bar at specific time

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multicharts Point(Range) Bar at Session close Controllpip EasyLanguage Programming 3 October 22nd, 2015 12:28 PM
Assign value to the close price at a specific time sunsun AmiBroker 2 March 3rd, 2015 03:15 PM
automated buy order on specific size bar close ncsutrader Elite Automated NinjaTrader Trading 3 May 27th, 2013 11:24 AM
Range Bar Time zeller4 NinjaTrader Programming 19 July 17th, 2012 10:20 AM
[MC] indicator - Range Charts - position of the next close and the next open Nicolas11 The Elite Circle 2 June 12th, 2012 09:15 AM


All times are GMT -4. The time now is 10:26 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-12 in 0.09 seconds with 19 queries on phoenix via your IP 54.90.92.204