Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

tradelink

Members
  • Content Count

    12
  • Joined

  • Last visited

Personal Information

  • First Name
    TradersLaboratory.com
  • Last Name
    User
  • City
    miami beach
  • Country
    United States
  • Gender
    Male
  • Biography
    http://tradelink.googlecode.com

Trading Information

  • Vendor
    No
  • Favorite Markets
    equities, forex, futures
  • Trading Years
    5
  • Trading Platform
    http://tradelink.googlecode.com
  • Broker
    ALL
  1. Sure, didn't realize that feature existed. Should be done now, you're right it's much easier.
  2. There are lots of successful tradestation traders who outgrow the simplicity of tradestation. We have a seperate product called Bridge that lets you run your strategy in tradestation but with enhanced execution control. bridge - www To the users points : "On placing a trade Store number of shares traded in GVs, then keep checking for fills. " In bridge, you have both fine and course level order control. FINE GRAIN is accomplished like : // send some order (eg stop order) myorderid = TSL_NEXTORDERIDSMALL(); TSL_SENDORDER(mysymbol,mysize,myside,myorderid,mydestinationexchange,myaccount); // order level fill checking filled = TSL_ISFILLED(myorderid); // you can check for partial fills if you need to if (filled=0) then begin partialfill = TSL_FILLEDSIZE(myorderid); if (partialfill <> 0) then begin // do something TSL_SENDDEBUG("Partial fill detected"); end; end; COARSE GRAIN // keep track of your sent orders expectedsize = 0; for i = 0; i<myorderids.Length; i++ begin expectedsize = expectedsize + TSL_SENTSIZE(myorderids[i]); end; everythingfilled = expectedsize = TSL_POSSIZE(mysymbol); "As you get filled, place stop loss orders at the appropriate levels as well as storing the average price." In bridge there is a single command to accomplish placing additive stop orders at a given distance from your existing average position price. You'd call this once at startegy startup. distanceincents = .1; rangestopineffect = distanceincents*2; percentofpositionsizetoadd = .5; // 1 = 100% TSL_SETSLO(mysymbol,distanceincents,rangestopineffect,percentofpositionsizetoadd); Then bridge will maintain this rule to ensure additive stop orders existing anytime you have a position (or you change or disable the SLO rule). "On scaling out Cancel your stop loss order Place a sell order for 75% of your position Put back the stop loss on the remaining 25%" In Bridge, there is a single command to manage profits and stops. // determine where to place stop mystopdistance = TSL_LASTTRADE(mysymbol)*.01; // we'll use 25% of position like user above mystopsize = .25 // determine where and how much to place limits (we'll disable them since user doesn't mention) myprofitdist = 0; myprofitsize = 0; TSL_SETOFFSET(mysymbol,mystopdistance,mystopsize,myprofitdist,myprofitsize); This will now be in effect anytime you have a position. You could close out your other 75% at any time using eg TSL_SENDORDER(mysymbol,TSL_POSSIZE(mysymbol)*.75,TSL_POSSIZE(mysymbol)>0,TSL_NEXTORDERID(),"ARCA","ACCOUNT1") You could also do this with a queue of OCO orders using TSL_SENDOCO. Besides giving you more granular control in addition to coarse control offered in tradestation, bridge also works with many brokers giving you access to better costs, more buying power, and more competitive commissions. bridge - www
  3. well the reason to use a T-test is when your sample size is very small... so it's an appropriate example. yeah the T-test = (actual value - estimated value) / standard error the estimated value is usually taken from a normal distribution. I don't remember how many trades occured in your example... I think it was 100... so say if you picked many people at random and then randomly picked 100 trades from the same opportunity space your example used... once you normalize the results of these trades, the returns will look like a bell curve. so what it's really saying is what is the likelyhood a random person could pick close to the same trades that your system did... say if there were 500 trading opportunities, and the average price of these opportunities was a certain price, and you were picking close to the average with your 100 choices then your results will be close to the average and your system might as well be random. not sure if this is making sense or if I'm going too simple on the explanation side. for curve fitting... at first glance it seems curve fitting is the other side of the t-test... obviously if your results are not obtained by random selection, they could be curve fit. but this is not necessarily true.... my understanding is that the t test cannot really tell you if you are curve fitting. it can only suggest whether your results are close enough to be called random, or maybe be something other than random. but it would be incorrect to say that just because a system is not random means it is curve fit. curve fitting in the context of system development refers to more of something you *dont* want to do.... but yet you still need to acheive results that are not consistent with picking trades at random. this means that curve fitting in trading is more of an art form than a science.... there is no way to detect curve fitting per say... you can use out of sample testing to indicate that curve fitting was occuring, but just because you get different results occurring out of sample does not mean your results were curve fit. They could have been random (a t test could tell you this), or it could have been that the distribution you are studying is not normal (you get a lot of fat tail distributions in finance). hope that helps. for further reading, checkout the wikipedia article on statistical hypothesis testing.... http://en.wikipedia.org/wiki/Statistical_hypothesis_testing here is their example which is good : "As an example, consider determining whether a suitcase contains some radioactive material. Placed under a Geiger counter, it produces 10 counts per minute. The null hypothesis is that no radioactive material is in the suitcase and that all measured counts are due to ambient radioactivity typical of the surrounding air and harmless objects. We can then calculate how likely it is that the null hypothesis produces 10 counts per minute. If the null hypothesis predicts (say) on average 9 counts per minute and a standard deviation of 1 count per minute, then we say that the suitcase is compatible with the null hypothesis. (This does not guarantee that there is no radioactive material, just that we have no reason to believe it); on the other hand, if the null hypothesis predicts 3 counts per minute and a standard deviation of 1 count per minute, then the suitcase is not compatible with the null hypothesis, and there are likely other factors responsible to produce the measurements."
  4. bigdavie.... the last time I looked at think or swim, they didn't have an API as part of their standard products.... it looked like they had some stuff in the works, but it was mostly FIX related for institutions and had seperate charges.... am I missing something? -josh
  5. tradelink will also handle the backfill "thing", and allow you to use the same strategy in backtesting as in live trading... it's free and open source, and it supports multiple brokers including IB.
  6. you can also checkout the free projects : TWSLink (google it) http://tradelink.googlecode.com 2nd is open source and provides example of working with bars, etc. also strategies can be ported to other brokers. first is free but they ask you to pay if you are using it professionally.
  7. tradestation doesn't have a market on open or opening limit order type (opg), I don't believe.... although since you want to trade the gaps I'm guessing you mean after the open. there is a 'buy this bar at close' there is no 'buy this bar at market', only 'buy next bar at market'. I believe this is just terminology that fits with the easylanguage 'bar' programming concepts. My understanding is if you place a buy this bar at close, it will get filled anywhere between the time you place it and the close. if you are trading the first bar of the market, you might also need to set MaxBarsBack to zero.
  8. I believe you need to enable contract 'Pyramiding' in your strategy options. this allows you to send multiple orders in the same EL pass.
  9. Ok well the reason it's only executing one profit target per contract is that those EasyLanguage statements are per strategy, not per signal. So you can only have one of those commands per strategy (this is for stop and profit targets). As to why it's only sending one buy order... this seems strange to me. Although in theory since your buy signals are all being sent under the same condition, there is no reason they should be seperate. So you might try : Buy 3 contracts at next bar at market instead of 3 'buy 1 contracts' statements. in terms of having multiple profit targets, you should be able to do that still... you just wouldn't want to use easylanguage functions. you'd want to check your openpl yourself, and then close the desired amount of trade. eg, something like : if ((GetPositionOpenPL / GetPositionQuanity > profittarget3 ) && (profittarget3HIT==0)) then begin Sell 1 contract at next bar at market profittarget3HIT = 1 end and so on for each target. vicea verca if you wanted to 'tier' stops/exits in the same way. Sorry my easylanguage is a little rough, but the function names and general syntax should be right. You'd also have to make sure that GetPositionQuantity was not zero in the above example. Hopefully you get the idea, and you found this helpful.
  10. No, you would not have to wait for stop to cancel. I am not sure why they would prevent you from having two outstanding orders on the same side at the same time, that is sort of a silly restriction tradestation must has, if you switched to use assent/IB or sterling (echo, etc), you would not have that restriction. Just fyi, if you have a brokerage account with any of these 3 brokers... you can do this for free because tradelink is 100% open-source. just use the code above and you're set. there's a mailling list if you have questions too. cheers.
  11. Pete, I don't know anything about TS2Ki (sp?). Both of my customers who used tradestation + tradelink were Assent traders. You're right you would have to pay for a broker in addition to tradestation this way. Although I thought that radar was just a flat monthly fee and you only paid for executions beyond that. The brokerage houses will charge you a flat fee for data and only for executions, so it should be fairly minimal. It seems like your system is possibly hours at least in trading duration so I imagine you have decent returns. Doing notifications back to TS is a bit harder. I'm only familiar withthe DLL import feature of TS, although perhaps they have an ActiveX interface I'm not familiar with.... if you use TradeLink with tradestation it uses the dll import, when you send the order you give the order an id so you can later cancel it. When the order is sent you get back a return code that indicates whether it was accepted. The tradelink api also provides Acknolwedgements of order and cancels back to clients, although with TradeSTation there's not an easy way to make this available. I suppose we could build something custom for you where we saved this information in a local file, and then we had another dll that read the file... this would avoid you having to depend on a global server with that other solution, where it sounds like you don't like that. Here's an example of the current usage of the tradelink interface in tradestation, it would be the same regardless of which broker (ib, assent, sterling) you're using : // tradestation SendOrder examples // int error = SendOrder("IBM",true,200,70,0,1); // buy limit 200 shares at $70, id is 1 // error = SendOrder("IBM",false, 100,0,0,2); // sell market 100 shares, order id is 2 // eror = SendOrder("LVS",true,500,0,200,3); // buy stop for 500 shares, order id is 3 (order id must be unique) external: "c:\program files\tradelink\brokerserver\TradeLibFast.dll", int, "SendOrder",string,bool,int,double,double,int; // tradestation SendCancel examples // SendCancel(1); // cancel the buy limit order from above // SendCancel(3); // cancel the buy stop above external: "c:\program files\tradelink\brokerserver\TradeLibFast.dll", int, "SendCancel", int;
  12. I have customers who use tradestation radar to get entry and exit signals, but then post orders to other brokers who have better order management than TS. doesn't solve everything you mention but it can provide more control, which seems to be mainly what you're looking for. here is the software they use http://tradelink.googlecode.com it's open source and it works with Assent, IB and Sterling providers (echo, cybertrader, etc).
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.