end of day close - MultiCharts | futures io social day trading
futures io futures trading


end of day close
Updated: Views / Replies:3,047 / 11
Created: by shanemcdonald28 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
 

end of day close

  #1 (permalink)
Trading for Profit
new york
 
Futures Experience: Intermediate
Platform: X Trader, Sierra Charts, Multicharts
Broker/Data: AMP/TT, Vision/Rithmic, AMP/CQG
Favorite Futures: CL, NG, gold
 
Posts: 355 since Mar 2012
Thanks: 665 given, 569 received

end of day close

In regular version of multicharts, what is proper code for close at end of day ?
Will it be based on session time ?

And where are some good study material for multicharts coding ?

thanks


shane

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

Shane,

what exactly are you looking for? Code for a signal that closes a trade at the end of the session?

In backtesting you can use "SetExitOnClose". However you need to be aware of it's limitations as it will use the closing price of the session that is market as session end in Quotemanager. In realtime this obviously can't work and it even might skew your backtesting as it will not represent an accurate test (as how often would you get filled at the exact closing tick).

Regards,

ABCTG

Reply With Quote
 
  #3 (permalink)
Trading for Profit
new york
 
Futures Experience: Intermediate
Platform: X Trader, Sierra Charts, Multicharts
Broker/Data: AMP/TT, Vision/Rithmic, AMP/CQG
Favorite Futures: CL, NG, gold
 
Posts: 355 since Mar 2012
Thanks: 665 given, 569 received


Hi

I have not had luck with that code for the reason you stated.

Henry at Multicharts posted the code below at the Multicharts.net forum to overcome the problem and to allow you to set your trading times with a time filter.

I was looking for a similar thing in easylanguage.

thanks

Shane








protected override void CalcBar()
{
double m_Avg = m_AverageFC[0];
if (PublicFunctions.DoubleGreater(Price[0], m_Avg))
{
++m_Counter.Value;
}
else
{
m_Counter.Value = 0;
}
TimeSpan _tStart = new TimeSpan(9, 30, 0);
TimeSpan _tEnd = new TimeSpan(12, 0, 0);

bool _Condition = DateTime.Now.TimeOfDay >= _tStart && DateTime.Now.TimeOfDay <= _tEnd;
if (PublicFunctions.DoubleGreater(Bars.CurrentBar, ConfirmBars)
&& m_Counter.Value == ConfirmBars && _Condition)
{
m_MACrossLE.Send();
}
}



The example above has been provided for Realtime trading:
Code:
bool _Condition = DateTime.Now.TimeOfDay >= _tStart && DateTime.Now.TimeOfDay <= _tEnd;

For Backtesting please use the following code:
Code:
bool _Condition = Bars.TimeValue.TimeOfDay >= _tStart && Bars.TimeValue.TimeOfDay <= _tEnd;

Reply With Quote
 
  #4 (permalink)
Trading for Profit
new york
 
Futures Experience: Intermediate
Platform: X Trader, Sierra Charts, Multicharts
Broker/Data: AMP/TT, Vision/Rithmic, AMP/CQG
Favorite Futures: CL, NG, gold
 
Posts: 355 since Mar 2012
Thanks: 665 given, 569 received

Hi

Nice !
And that has worked for you on both live and backtesting ?

Excellent. Thank you.

That will work on most.

On one of my strategies, I use an indicator for entries into the market. One problem I ran into is that the indicator can get changed with custom session times.
That is why I was hoping to code trading times into the strategy. That way, I can leave the chart on full globex session times so as not to change the indicator.

thanks

shane

Reply With Quote
 
  #5 (permalink)
Elite Member
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,386 since Jul 2012
Thanks: 1,138 given, 4,384 received


shanemcdonald28 View Post
Hi

Nice !
And that has worked for you on both live and backtesting ?

Excellent. Thank you.

That will work on most.

On one of my strategies, I use an indicator for entries into the market. One problem I ran into is that the indicator can get changed with custom session times.
That is why I was hoping to code trading times into the strategy. That way, I can leave the chart on full globex session times so as not to change the indicator.

thanks

shane


Sorry I deleted previous msg, I thought it was off topic...

But setexitonclose, with custom sessions times set to end one minute before actual close, does work in backtest and live.

You are right, having a non-standard session will change your indicators. No easy workaround for that.

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
  #6 (permalink)
Trading for Profit
new york
 
Futures Experience: Intermediate
Platform: X Trader, Sierra Charts, Multicharts
Broker/Data: AMP/TT, Vision/Rithmic, AMP/CQG
Favorite Futures: CL, NG, gold
 
Posts: 355 since Mar 2012
Thanks: 665 given, 569 received

I pasted together some code I found over at Traders Exchange.
Can you guys look it over and see if you see any flaws that may be a problem ?

It seems to work in backtesting, but I hope to get some opinions on it.




inputs: price(Close), jthmaLength( 21), jthmaLength2(84),
startTime(0500), endTime(1600), EnterTradeEndTime(1600),StopTime ( 1500 );
variables: Avg( 0 ), Avg2( 0 ), Avg2Up( false ),
Avg2Dn( false ),MP( 0 ),AvgUp( false ), AvgDn( false );

MP = MarketPosition;
Avg = jthma( price, jthmaLength ) ;
Avg2 = jthma( price, jthmaLength2 );
Avg2Up = Avg2 > Avg2[1];
Avg2Dn = Avg2 < Avg2[1];
AvgUp = Avg[2]> Avg[1] and Avg > Avg[1];
AvgDn = Avg[2]< Avg[1] and Avg < Avg[1];




If Time > startTime and Time < EnterTradeEndTime then begin

if AvgUp and Avg2Up then
Buy ( "jup" ) next bar at market ;

if AvgDn and Avg2Dn then
sell short ( "jdn" ) next bar at market ;
end;


If MP = 1 and AvgDn then sell next bar at market;
If MP = -1 and AvgUp then buy to cover next bar at market;

if time = endtime and MP > 0 then sell this bar on close;
if time = endtime and MP < 0 then buy to cover this bar on close;

If Time > StopTime
Then Sell All Contracts Next Bar At Market

Reply With Quote
 
  #7 (permalink)
Elite Member
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,386 since Jul 2012
Thanks: 1,138 given, 4,384 received


shanemcdonald28 View Post
I pasted together some code I found over at Traders Exchange.
Can you guys look it over and see if you see any flaws that may be a problem ?

It seems to work in backtesting, but I hope to get some opinions on it.




inputs: price(Close), jthmaLength( 21), jthmaLength2(84),
startTime(0500), endTime(1600), EnterTradeEndTime(1600),StopTime ( 1500 );
variables: Avg( 0 ), Avg2( 0 ), Avg2Up( false ),
Avg2Dn( false ),MP( 0 ),AvgUp( false ), AvgDn( false );

MP = MarketPosition;
Avg = jthma( price, jthmaLength ) ;
Avg2 = jthma( price, jthmaLength2 );
Avg2Up = Avg2 > Avg2[1];
Avg2Dn = Avg2 < Avg2[1];
AvgUp = Avg[2]> Avg[1] and Avg > Avg[1];
AvgDn = Avg[2]< Avg[1] and Avg < Avg[1];




If Time > startTime and Time < EnterTradeEndTime then begin

if AvgUp and Avg2Up then
Buy ( "jup" ) next bar at market ;

if AvgDn and Avg2Dn then
sell short ( "jdn" ) next bar at market ;
end;


If MP = 1 and AvgDn then sell next bar at market;
If MP = -1 and AvgUp then buy to cover next bar at market;

if time = endtime and MP > 0 then sell this bar on close;
if time = endtime and MP < 0 then buy to cover this bar on close;

If Time > StopTime
Then Sell All Contracts Next Bar At Market

What instrument, and what size bar are you using?

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
 
  #8 (permalink)
Trading for Profit
new york
 
Futures Experience: Intermediate
Platform: X Trader, Sierra Charts, Multicharts
Broker/Data: AMP/TT, Vision/Rithmic, AMP/CQG
Favorite Futures: CL, NG, gold
 
Posts: 355 since Mar 2012
Thanks: 665 given, 569 received

RB,DAX,TF are the ones it is working good on.
moderate success on GC, CL , NQ , ZB

5, 15, 30 min

as well as .04 % .06 % and .08 % renko bars on 1 min setting

fair success on 10, 15 and 21 point settings

various percent trailing , stop loss, session settings

Reply With Quote
 
  #9 (permalink)
Elite Member
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,386 since Jul 2012
Thanks: 1,138 given, 4,384 received


shanemcdonald28 View Post
RB,DAX,TF are the ones it is working good on.
moderate success on GC, CL , NQ , ZB

5, 15, 30 min

as well as .04 % .06 % and .08 % renko bars on 1 min setting

fair success on 10, 15 and 21 point settings

various percent trailing , stop loss, session settings

The reason I asked: Just be careful that there actually is trading going on after endtime and stoptime. For instance, if last bar of the day is at 1600, then the statement
if time = endtime and MP > 0 then sell this bar on close;

won't work in real time (market will be closed by the time order is sent)...

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
 
  #10 (permalink)
Trading for Profit
new york
 
Futures Experience: Intermediate
Platform: X Trader, Sierra Charts, Multicharts
Broker/Data: AMP/TT, Vision/Rithmic, AMP/CQG
Favorite Futures: CL, NG, gold
 
Posts: 355 since Mar 2012
Thanks: 665 given, 569 received


Hi

Thanks

I see what you mean.

It does not seem to work on point, range or renko type charts.

I will be using this on futures and want to set close for around 3 pm EST.

For the indexes, I will close around 1 hour before Stock exchange closes , with futures market closing at 5 15 pm for those indexes.

I hope this will get around the problem of closing at session end, which I would like to set separately.

thanks

shane


Last edited by shanemcdonald28; August 31st, 2014 at 03:52 PM.
Reply With Quote

Reply



futures io > > > > end of day close

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
The End of Day Trading KosherTrader Traders Hideout 76 October 24th, 2013 08:50 AM
difference between prevclose and close of 1 day ago?? adam081527 EasyLanguage Programming 3 June 30th, 2012 01:52 PM
OHLC based on previous day's close asf008005 NinjaTrader Programming 9 May 29th, 2012 05:18 AM
Close position based on day of week guppy EasyLanguage Programming 3 October 21st, 2011 04:31 PM
Calculate GAP (Close of Prior Day, Open of Current Day) bluemele NinjaTrader Programming 16 January 19th, 2011 10:19 PM


All times are GMT -4. The time now is 01:25 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-11 in 0.14 seconds with 19 queries on phoenix via your IP 54.145.16.43