TS inter bar order work around - EasyLanguage Programming | futures io social day trading
futures io futures trading


TS inter bar order work around
Updated: Views / Replies:6,468 / 14
Created: by workyboy 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
 

TS inter bar order work around

  #11 (permalink)
Trading Apprentice
St. Petersburg, Russia
 
Futures Experience: Advanced
Platform: Multicharts
Favorite Futures: spot fx, currency futures, GC, ES
 
Posts: 30 since Nov 2010
Thanks: 6 given, 17 received

Mike, let me make a tiny correction: you cannot trade off any data stream besides data1 (the default one) in Multicharts (or my knowledge is very limited), so you need to have regular bars as data1 and any auxiliary information as data2, data3,...

I think just a single data stream is more than enough here ó and of course no need for external DLLs and other stuff. If I'm not mistaken, the following definition of range bars is correct:

Quoting 
The range bars just look price, the bar does not close at a specific time but closes when a range is complete, then a new bar opens.

If you have a market that moves from 1 to 9, then 9 to 1, then 1 to 9 during 2 days, if you create a range bar chart of $10 you will only have a bar that goes from 1 to 9 during these 2 days and this bars is not closed. If the market moves to 10 then the bar closes and a new bar opens with open price at 10. This new bar now must have $10 range to close. Letís say the market goes back to 6 and then up to 17, the last range bar closes at 16 (making a range bar from 6 to 16) a new bar opens with open price at 16 and this bars price is now 17. This new bar has now a range of $1 (16 to 17) and will wait until a complete $10 range to close.

If the above quote is correct, then you just need a very simple code to markup your "range bars" and unwrap them on the regular time-based bars, something like this:

 
Code
input: R(100);

var: Rhigh(high), Rlow(low), isBarComplete(false);

isBarComplete = false;

Rhigh = maxList(Rhigh, high);
Rlow = minList(Rlow, low);

if Rhigh - Rlow >= R points then begin
	Rhigh = high;
	Rlow = low;
	isBarComplete = true;
end;

plot1(Rhigh);
plot2(Rlow);
Thus you can add some code which is executed when the range bar is comlete, i.e. when isBarComplete = true. Of course this code works best on tick data, but should also work on N-seconds and N-minutes, of course with some error. Whether this error is significant for you or not ó it's up to you to decide.

Reply With Quote
The following 3 users say Thank You to Doctor Leo for this post:
 
  #12 (permalink)
Just starting out...
Lakeland, FL USA
 
Futures Experience: Intermediate
Platform: Trade Station
Favorite Futures: ES
 
Posts: 7 since Dec 2010
Thanks: 1 given, 0 received

The goal is a strategy that will send orders inter bar from range type bars.
Let me see if I have this right.
Build a synthetic bar as you noted above.
Inserts code for the indicator that is driven by the code for the synthetic bar.
Take the above two statements and insert that into a strategy and code the strategy to be driven by the indicator driven by the synthetic bar.
Then place that strategy into a tick chart and and it should be able to place orders inter bar.
I think it will work and I'll let you know if I have any success.
Thank you

Reply With Quote
 
  #13 (permalink)
Trading Apprentice
Chicago, IL
 
Futures Experience: Advanced
Platform: Tradestation + Multicharts
Favorite Futures: Forex, Futures
 
Posts: 44 since Jul 2013
Thanks: 26 given, 1 received



Big Mike View Post
Only speaking from MultiCharts experience, not TradeStation, but make data1 a 1-range or 1-tick chart, and data2 the "useful" chart that you desire (kase, range, whatever) and then you can do your calculations on data 2 including predicting the closing price of the bar, and submit your orders via data1.

Mike

This solution makes sense, I just can't get it to work.

An example:
Data1 = 1 Minute
Data2 = 30 Minute
Data3 = 180 Minute

Even with data1 being one minute, all of the orders are being executed on 00 & 30 past the hour (or 01, 31). There's a stochastic trigger on data2 but I just can't get it to execute except on the data2 closes! Very frustrating.

Thing is: if you have the strategy turned off & then turn it on, it will enter into a position at any time it's triggered. It's getting out whenever it's triggered is my problem. I want it to get out regardless of the time (or close, etc).

Any possible ideas would be greatly apprecited!


Last edited by djvie11; December 16th, 2015 at 09:34 AM. Reason: further explanation
Reply With Quote
 
  #14 (permalink)
Trading Apprentice
Chicago, IL
 
Futures Experience: Advanced
Platform: Tradestation + Multicharts
Favorite Futures: Forex, Futures
 
Posts: 44 since Jul 2013
Thanks: 26 given, 1 received

bump!!

Reply With Quote
 
  #15 (permalink)
Elite Member
Russia
 
Futures Experience: Beginner
Platform: NinjaTrader MultiCharts
 
Posts: 5 since Dec 2010
Thanks: 1 given, 0 received


Big Mike View Post
Only speaking from MultiCharts experience, not TradeStation, but make data1 a 1-range or 1-tick chart, and data2 the "useful" chart that you desire (kase, range, whatever) and then you can do your calculations on data 2 including predicting the closing price of the bar, and submit your orders via data1.

Mike

Hi Mike!
May be you have some piece of code? Its very difficult for me to realize.
I have 2 charts: 1 tick range and 1 minute. And i want to sell if level broken

and no matter -10 point or -1 poin - sell began on the same price((

if condition3 and condition5 and LastDelayLow then
begin
Sell Short ( "S" ) next bar at oPivotPriceLow -10 point stop;
// Sell Short ( "S" ) next bar market;
LastDelayLow = false;
end;

or

if condition3 and condition5 and LastDelayLow then
begin
Sell Short ( "S" ) next bar at oPivotPriceLow -1 point stop;
// Sell Short ( "S" ) next bar market;
LastDelayLow = false;
end;

the same

many many thanks!

Reply With Quote

Reply



futures io > > > > > TS inter bar order work around

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
Book Discussion: Reading Price Charts Bar by Bar by Al Brooks cunparis Traders Hideout 530 October 19th, 2016 08:45 PM
Intra bar order @ pre determined time jay j EasyLanguage Programming 9 October 1st, 2013 08:40 PM
Whats the difference between Bar Magnifier & look inside bar testing? crbucks MultiCharts 1 May 4th, 2011 01:22 AM
Image:al brooks reading price charts bar by bar.jpg Big Mike Trading Wiki Images 0 July 1st, 2010 09:00 PM
3 bar high/low entry maintain active order until 3 bar high/low in opposite direction mrticks NinjaTrader Programming 8 November 13th, 2009 08:44 PM


All times are GMT -4. The time now is 04:59 PM.

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-13 in 0.10 seconds with 29 queries on phoenix via your IP 54.90.92.204