How to replace Marketposition? - TradeStation | futures io social day trading
futures io futures trading


How to replace Marketposition?
Updated: Views / Replies:1,138 / 11
Created: by jdtrujillo1015 Attachments:2

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
 2  
 
Thread Tools Search this Thread
 

How to replace Marketposition?

  #1 (permalink)
Trading Apprentice
Medellin Colombia
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: Oil
 
Posts: 7 since Jul 2012
Thanks: 0 given, 0 received

How to replace Marketposition?

Some easy language functions say: "This function can only be used in the evaluation of strategies." So I'm wondering how this functions can be replaced when the system start to work in a demo or in real money, specially the function marketposition.

Thanks.

Reply With Quote
 
  #2 (permalink)
Trading Apprentice
Fort Collins, CO, United States
 
Futures Experience: Advanced
Platform: Tradestation, MT4
Favorite Futures: forex
 
Posts: 2 since Oct 2012
Thanks: 0 given, 1 received

MarketPosition works on real or demo accounts, but only in strategies.

If you want the MarketPosition functionality in an indicator, use I_MarketPosition.

Reply With Quote
The following user says Thank You to garyfritz for this post:
 
  #3 (permalink)
Elite Member
San Diego, USA
 
Futures Experience: Intermediate
Platform: MC
Favorite Futures: All
 
Posts: 40 since Aug 2016
Thanks: 7 given, 8 received

marketposition is not the same live vs backtest



garyfritz View Post
MarketPosition works on real or demo accounts, but only in strategies.

If you want the MarketPosition functionality in an indicator, use I_MarketPosition.


marketposition function does not work the same in LIVE trading as in backtesting.

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


alko View Post
marketposition function does not work the same in LIVE trading as in backtesting.

alko,

would you mind showing an example of the differences you are seeing and the "marketpostion function" that you are referring to?

Regards,

ABCTG

Reply With Quote
 
  #5 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary


alko View Post
marketposition function does not work the same in LIVE trading as in backtesting.

Can you explain?

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
 
  #6 (permalink)
Elite Member
San Diego, USA
 
Futures Experience: Intermediate
Platform: MC
Favorite Futures: All
 
Posts: 40 since Aug 2016
Thanks: 7 given, 8 received

what i found is the following:
say you have a position oped today and you want to close it next day at the open (use daily bars), then in a backtest i used the following line to do so:

if marketposition <> 0 then begin
buy next bar open;
sell next bar open;
end;

In live trading for some reason, this does not work and close of the position is not executed (even order are not created). May be i am doing smth wrong, not sure.

Reply With Quote
 
  #7 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary


alko View Post
what i found is the following:
say you have a position oped today and you want to close it next day at the open (use daily bars), then in a backtest i used the following line to do so:

if marketposition <> 0 then begin
buy next bar open;
sell next bar open;
end;

In live trading for some reason, this does not work and close of the position is not executed (even order are not created). May be i am doing smth wrong, not sure.

I think what you are seeing is normal behavior for backtest. Take a look at the two examples below.

In the first one, when the code runs on July 5 at bar close, the strategy thinks marketposition=0. So, on the open of the 6th, it does not try to exit the position opened at close of the 5th. But it does close position on open of 7th. That is correct behavior.

In the second one, when the code runs on July 5 at bar close, the strategy thinks marketposition=0. It does not recognize a position until it evaluates the bar on the 6th at close, at which point it sees the open position that was opened at the open on the 6th. So it does close position on open of 7th. Again, it seems to be correct.

Live trading should fire off orders the same way as shown in backtest.



Hopefully this makes sense.

If you experience something different, please post full code and chart showing what you think is odd/wrong. One thing you can do is put print(marketposition); statements in code and see when the marketposition is actually changing.


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

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)
Elite Member
San Diego, USA
 
Futures Experience: Intermediate
Platform: MC
Favorite Futures: All
 
Posts: 40 since Aug 2016
Thanks: 7 given, 8 received

Kevin, i fully agree with the logic in your examples.
Somehow, your example 2 does not work in my case. I enter the position with the stop and then marketposition should be checked at the bar close and then it should be 1 and thus it should be closed next bar open, but it does not. I have no idea why it works in a backtest and does not work live. it might be related to order settings somehow. I will post the results when i figure this out.

Reply With Quote
 
  #9 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary


alko View Post
Kevin, i fully agree with the logic in your examples.
Somehow, your example 2 does not work in my case. I enter the position with the stop and then marketposition should be checked at the bar close and then it should be 1 and thus it should be closed next bar open, but it does not. I have no idea why it works in a backtest and does not work live. it might be related to order settings somehow. I will post the results when i figure this out.

Are you saying you run the exact code in backtest example 2, but get different results than what I show? Or are you saying it works the same as mine in backtest, but did not work live?

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)
Elite Member
San Diego, USA
 
Futures Experience: Intermediate
Platform: MC
Favorite Futures: All
 
Posts: 40 since Aug 2016
Thanks: 7 given, 8 received



kevinkdog View Post
Are you saying you run the exact code in backtest example 2, but get different results than what I show? Or are you saying it works the same as mine in backtest, but did not work live?

Yes.
and it is definitely smth wrong with the order placement rather than the startegy logic, since the strategy closes the position, but in live the order does not follow through somehow.


Last edited by alko; August 9th, 2017 at 01:10 AM.
Reply With Quote

Reply



futures io > > > > How to replace Marketposition?

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
Broker that offers Metatrader with Futures data feed (to replace Broco) dstrader Reviews of Brokers and Data Feeds 9 September 15th, 2012 05:11 AM
Replace my MACD! Upupandaway Traders Hideout 16 June 3rd, 2012 12:01 AM
Methane Hydrate Production could Replace Fracking as Next Major Concern kbit News and Current Events 0 May 7th, 2012 06:23 PM
Will full MC Demo replace MCDT installation? torroray MultiCharts 1 March 28th, 2012 04:30 PM
IOG causing my limit order to cancel and replace intrabar tradersheldon EasyLanguage Programming 10 August 2nd, 2011 10:03 AM


All times are GMT -4. The time now is 02:41 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-14 in 0.14 seconds with 21 queries on phoenix via your IP 54.221.76.68