NexusFi: Find Your Edge


Home Menu

 





Looking for EasyLanguage Programmer (TS)


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one OccamsRazorTrader with 7 posts (1 thanks)
    2. looks_two Billiwon with 5 posts (0 thanks)
    3. looks_3 kevinkdog with 4 posts (8 thanks)
    4. looks_4 syswizard with 4 posts (4 thanks)
      Best Posters
    1. looks_one kevinkdog with 2 thanks per post
    2. looks_two syswizard with 1 thanks per post
    3. looks_3 Orlie33 with 1 thanks per post
    4. looks_4 OccamsRazorTrader with 0.1 thanks per post
    1. trending_up 6,051 views
    2. thumb_up 14 thanks given
    3. group 10 followers
    1. forum 25 posts
    2. attach_file 1 attachments




 
Search this Thread

Looking for EasyLanguage Programmer (TS)

  #11 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,663 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,357


Billiwon View Post
Somehow TradeStation does not allow trading more than one strategy on the same symbol at the same time. I think there are EasyLanguage techniques to get around that. IF someone can please write an EasyLanguage program for me to do this, that would be great. Let me know if there is fair charge for this. Thanks.


I thought I'd throw my 2 cents in.

First off, this IS possible, under certain conditions. @syswizard says "you cannot trade the same instrument (QQQ) with two separate trading systems in the same account." This is not entirely true. I will explain below.

Second, @OccamsRazorTrader makes the point that trading 2 strategies "could throw the program into a weird loop??" If things are set up correctly, this will not happen. If you do it incorrectly, you can indeed "throw things into loop." I once did this, and was responsible for 25% of MES volume because of it (trading with myself!).

When done correctly, you can trade 2,3 or 10 strategies with the same instrument. The equity curves will all add together. And if the strategies are uncorrelated, the combined effect is a smoother equity curve - since profits for all the strategies are additive, but the drawdowns are not.


So, how do you do it?

With stocks like QQQQ, in Tradestation you cannot automate strategy A in Chart 1, and strategy B in chart 2. I don't know if this is a Tradestation limitation or an exchange limitation.

With futures like NQ, in Tradestation you CAN automate strategy A in Chart 1, and strategy B in chart 2. This works really well in Tradestation 10.0, not as well in Tradestation 9.5 and earlier.



So, with futures it is relatively easy. I do it all the time without a hitch. With stocks though, there are at least 3 alternatives for trading QQQQ simultaneously in Tradestation :

1. You can use order tickets and order providers to trade as many strategies as you want. This is advanced Tradestation stuff (called Object Oriented Easy Language). I can put you in touch with a programmer who is really good at this, and has done work for me.

2. You can use something called "Global Variables" in Tradestation, which allows strategies to "talk" to each other. So, you'd have 3 charts: Chart 1 would trade Strategy A, chart 2 would trade strategy B and chart 3 would "take" to 1 and 2, figure out the net position and trade the net. Chart 3 would be the only chart automated. I have used this approach, and it is generally pretty good, but not 100% foolproof. It will take time and effort on your part to learn how it works, and then to actually work it and maintain it.

3. There are other possible alternatives, but to avoid self promotion I can't post the link to the article I wrote (on my website). For example, you may be able to combine the code for 2 strategies into one "master" strategy. The efficacy of this is HIGHLY dependent on the core strategies though. And there are other possible workarounds, too.

Hope this helps at least a little bit!

Follow me on Twitter Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #12 (permalink)
 
syswizard's Avatar
 syswizard 
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ / CL / RTY / YM / BTC
Posts: 344 since Jan 2019
Thanks Given: 20
Thanks Received: 146


OccamsRazorTrader View Post
I previously used two systems, fast and slow, but segregated my account, one would be for all long signals and the other for short positions. Psychologically it was better for me to trade the opposing signals rather then just going flat.

But trading both = higher fees + commish.

Reply With Quote
Thanked by:
  #13 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,663 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,357



OccamsRazorTrader View Post
The problem as I see it are opposing signals. If one system takes a long position and the other a short position the result is no position. In the end profit from a long position (or loss) is negated or offset by a loss or profit from the short position, it’s a wash, but could throw the program into a weird loop??
Just a thought ….
I previously used two systems, fast and slow, but segregated my account, one would be for all long signals and the other for short positions. Psychologically it was better for me to trade the opposing signals rather then just going flat.

There really is no need to segregate into long account and short account (although psychological benefit might help you - being long/short and flat are psychologically the same for me), and actually being long and short will eventually lead to compliance questions from your broker. They will think you are trading against yourself, which violates exchange rules. I had to explain my trading to the CFO and CCO of Tradestation to get them to allow what I was doing. But then they upgraded their software, and I did not need to do separate accounts.

Follow me on Twitter Reply With Quote
Thanked by:
  #14 (permalink)
OccamsRazorTrader
Fort Myers Florida/USA
 
Posts: 70 since May 2020
Thanks Given: 43
Thanks Received: 67


kevinkdog View Post
There really is no need to segregate into long account and short account (although psychological benefit might help you - being long/short and flat are psychologically the same for me), and actually being long and short will eventually lead to compliance questions from your broker. They will think you are trading against yourself, which violates exchange rules. I had to explain my trading to the CFO and CCO of Tradestation to get them to allow what I was doing. But then they upgraded their software, and I did not need to do separate accounts.

It was more a way to see if the fast or slow system was doing better at any given time, being flat a position while being the same portfolio wise- was different system wise.

I'd chalk that up to just another of the misgivings I have with Tradestation, starting with their crappy customer support ..... (Waited 2 weeks for a call back- and finally received an e-mail saying they tried to call me, they didn't, they just didn't have the balls to confront me with a phone call!)


Reply With Quote
  #15 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,663 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,357


OccamsRazorTrader View Post
It was more a way to see if the fast or slow system was doing better at any given time, being flat a position while being the same portfolio wise- was different system wise.

I'd chalk that up to just another of the misgivings I have with Tradestation, starting with their crappy customer support ..... (Waited 2 weeks for a call back- and finally received an e-mail saying they tried to call me, they didn't, they just didn't have the balls to confront me with a phone call!)


You should have been able to see performance of each strategy by looking at the Strategy Performance report, that is what I do.

For Tradestation support, post the question here or at the Tradestation forum. That is what I do. I haven't called a Customer Service person at TS in years, and I am doing just fine with the platform.

Follow me on Twitter Reply With Quote
Thanked by:
  #16 (permalink)
 Billiwon 
Los Angeles, California
 
Experience: Intermediate
Platform: TradeStation
Trading: Index futures, etc.
Posts: 53 since Aug 2014
Thanks Given: 93
Thanks Received: 26


kevinkdog View Post
I thought I'd throw my 2 cents in.

When done correctly, you can trade 2,3 or 10 strategies with the same instrument. The equity curves will all add together. And if the strategies are uncorrelated, the combined effect is a smoother equity curve - since profits for all the strategies are additive, but the drawdowns are not.

So, how do you do it?

With stocks like QQQQ, in Tradestation you cannot automate strategy A in Chart 1, and strategy B in chart 2. I don't know if this is a Tradestation limitation or an exchange limitation.

With futures like NQ, in Tradestation you CAN automate strategy A in Chart 1, and strategy B in chart 2. This works really well in Tradestation 10.0, not as well in Tradestation 9.5 and earlier.

So, with futures it is relatively easy. I do it all the time without a hitch. With stocks though, there are at least 3 alternatives for trading QQQQ simultaneously in Tradestation :

1. You can use order tickets and order providers to trade as many strategies as you want. This is advanced Tradestation stuff (called Object Oriented Easy Language). I can put you in touch with a programmer who is really good at this, and has done work for me.

Yes Kevin, I would like to contact the programmer for help with this. Please let me know if you can post the information here, or I have to PM you. Thank you very much.

Billi

Reply With Quote
  #17 (permalink)
OccamsRazorTrader
Fort Myers Florida/USA
 
Posts: 70 since May 2020
Thanks Given: 43
Thanks Received: 67


kevinkdog View Post
You should have been able to see performance of each strategy by looking at the Strategy Performance report, that is what I do.

For Tradestation support, post the question here or at the Tradestation forum. That is what I do. I haven't called a Customer Service person at TS in years, and I am doing just fine with the platform.

It was a trade issue that started at the trade desk but was escalated to customer service, as I laid out in the attached post. With that in mind, I feel more secure having an API programmed to trade an algorithmic strategy on IB. I have done this in the past, and while more difficult, will lead to more confidence going forward. But I appreciate your advice.

Reply With Quote
Thanked by:
  #18 (permalink)
OccamsRazorTrader
Fort Myers Florida/USA
 
Posts: 70 since May 2020
Thanks Given: 43
Thanks Received: 67


syswizard View Post
But trading both = higher fees + commish.

I had a previous post about the obsession with trading fees, dominent with older traders that were used to $120 round turn trades, placed by phone btw. In any other industry margins are low because expenses are high. In trading we're all looking for a 2 to 1 return on winning trades/ losing trades to cover the cost of commissions (+ exch fees). My system, live account, real trades, has placed over 5,000 trades this year with an average cost of ~$36 a trade (commission + fees + slippage). My profit is slightly less then the total trade cost, so we're looking at a net margin of ~48%, in the restaurant business they would kill for a 48% margin, net margin in a Dunkin Donuts franchise is ~17%.

Would I rather my system place less trades? Of course, but as long as the system is profitable, and stays that way I'm fine with it. A discussion with my son lead to the theory, that I could get my trade cost to zero- by placing NO trades and NOT trading my system. Some in the industry would scoff at these results (and my system), but it is what it is, and I'm OK with it .....

Reply With Quote
  #19 (permalink)
 
syswizard's Avatar
 syswizard 
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ / CL / RTY / YM / BTC
Posts: 344 since Jan 2019
Thanks Given: 20
Thanks Received: 146


OccamsRazorTrader View Post
Would I rather my system place less trades? Of course, but as long as the system is profitable, and stays that way I'm fine with it. A discussion with my son lead to the theory, that I could get my trade cost to zero- by placing NO trades and NOT trading my system. Some in the industry would scoff at these results (and my system), but it is what it is, and I'm OK with it .....

I track the % of commish+fees of the gross profit.
As soon as the % hits 50%, it's time to disable trading for that instrument.
You've got to do this intelligently...i.e.require a minimum # of trades, etc.

Reply With Quote
Thanked by:
  #20 (permalink)
OccamsRazorTrader
Fort Myers Florida/USA
 
Posts: 70 since May 2020
Thanks Given: 43
Thanks Received: 67



syswizard View Post
I track the % of commish+fees of the gross profit.
As soon as the % hits 50%, it's time to disable trading for that instrument.
You've got to do this intelligently...i.e.require a minimum # of trades, etc.

My system is an absolute return system. I've tried equity curve trading for each market and also for the combined portfolio, I've attempted to filter trades based on 10 or so different factors, I've tried standing on the sidelines during the beginning of a draw down .......... each time it results in less gross, yes less cost, but in the end ..... less net.
It feels like throwing the baby out with the bath water.

I've resolved to trade it as is, or develop something else. My returns are outrageous (November +13%, +81.83% ytd), and yes so are the resulting expenses .... but it is what it is!

Again comparing the margin of my daily system to any other industry it's a no brainer, but financial services seems to be a different beast. I do track the trade cost per instrument (market), and will add and ongoing trade cost as a percent of gross for each market to the spreadsheet for 2023. (Not sure what the minimum trade # would be, I'd probably have to commit to the first 3 months of trading minimum.) Commissions and fess are not the problem - slippage is the bigger number, and I'd have to use the average for 2022 until I have enough data in 2023.

Average trade costs skyrocket in drawdowns then temper in the up phase- like all systems.
But I've committed to the system and it is what it is ..........

Reply With Quote




Last Updated on January 1, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts