Tradestation Forex Strategy Setup - Accounting for Spread - futures io
futures io futures trading



Tradestation Forex Strategy Setup - Accounting for Spread


Discussion in TradeStation

Updated
    1. trending_up 4,195 views
    2. thumb_up 8 thanks given
    3. group 2 followers
    1. forum 9 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Tradestation Forex Strategy Setup - Accounting for Spread

(login for full post details)
  #1 (permalink)
CA/USA
 
Experience: Intermediate
Platform: Tradestation
Trading: Stocks
 
Posts: 10 since Nov 2012
Thanks: 4 given, 1 received

Hi there,

I'm looking at doing some backtesting on Forex on Tradestation 9.1 update 13 but am not sure how to setup the commission structure under the strategies "Properties for All..." since tradestation does not charge a commision but has their cost built into the spread.

Any incite would be greatly appreciated. I'm assuming I would be adding this spread to the slippage section of the backtest properties.

Have a great one! =)

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
Which kind of Blockvolume is visible? - order processing
Emini and Emicro Index
What blockvolume is visible? - order processing
NinjaTrader
Short Interest Ratio indicator?
ThinkOrSwim
Work with historical tcks data on MUltichart NET PowerLa …
MultiCharts
 
 
(login for full post details)
  #2 (permalink)
 
 
Posts: 2,979 since Jul 2012
Thanks: 1,576 given, 5,902 received


LetmeInNow View Post
Hi there,

I'm looking at doing some backtesting on Forex on Tradestation 9.1 update 13 but am not sure how to setup the commission structure under the strategies "Properties for All..." since tradestation does not charge a commision but has their cost built into the spread.

Any incite would be greatly appreciated. I'm assuming I would be adding this spread to the slippage section of the backtest properties.

Have a great one! =)

You are correct with the bold statement I highlighted above. You would add 1-2 pips per side for slippage. Just be careful with how TS calculates the total (per lot, or total transaction, etc)

But, there is a bigger problem waiting for you, and I'll take a little time to explain...

The problem you will have backtesting with Forex is that the datastream you see is only Bid data. This can cause major problems with strategies, especially with limit orders and stop orders. Your strategy will get filled when in real life you won't, and vice versa. Accounting for spreads won't take care of this, since it is about trades that never happen.

I'll give you 1 example. Let's say your strategy says "buy next bar at 1.3081 limit." Let's also say that you've selected the "fill order only if limit price is exceeded" option, almost always a good choice. Tradestation normally has a 1-2 pip spread, so let's say it is 1.5. So, you need the chart price to hit 1.3080 for a guaranteed fill, and the bid/ask at that time will be 1.3080/1.30815.

Your strategy places your order, and a little later the TS chart goes down to 1.3080, and the strategy assumes you got filled. The market then takes off like a rocket. YES! A great winning trade. Or is it?

When the chart hit 1.3080, that was the bid price. You can't buy at bid. You can buy at ask, which hit a low of 1.30815, above your limit price. So in real life, you never got filled. You missed the trade! But any backtest will think you did get filled.

Now, there are a few things you can do with TS fills (like convert to a market order), but you won't be able to simulate them in backtest, and if you use a time delay, who knows what the slippage will actually be?

My solution: ONLY use market orders, and always have 1-2 ticks slippage applied to account for the spread. Not a perfect solution, but backtest and real time performance seem to match when I do this.

I know this is probably more than you wanted to know, but it is an important point, that most people ignore - until they lose money.

Good Luck!

By the way, make sure to check around for spread prices. You might find TS spreads to be on the high end.

Follow me on Twitter Reply With Quote
The following 4 users say Thank You to kevinkdog for this post:
 
(login for full post details)
  #3 (permalink)
CA/USA
 
Experience: Intermediate
Platform: Tradestation
Trading: Stocks
 
Posts: 10 since Nov 2012
Thanks: 4 given, 1 received



kevinkdog View Post
You are correct with the bold statement I highlighted above. You would add 1-2 pips per side for slippage. Just be careful with how TS calculates the total (per lot, or total transaction, etc)

But, there is a bigger problem waiting for you, and I'll take a little time to explain...

The problem you will have backtesting with Forex is that the datastream you see is only Bid data. This can cause major problems with strategies, especially with limit orders and stop orders. Your strategy will get filled when in real life you won't, and vice versa. Accounting for spreads won't take care of this, since it is about trades that never happen.

I'll give you 1 example. Let's say your strategy says "buy next bar at 1.3081 limit." Let's also say that you've selected the "fill order only if limit price is exceeded" option, almost always a good choice. Tradestation normally has a 1-2 pip spread, so let's say it is 1.5. So, you need the chart price to hit 1.3080 for a guaranteed fill, and the bid/ask at that time will be 1.3080/1.30815.

Your strategy places your order, and a little later the TS chart goes down to 1.3080, and the strategy assumes you got filled. The market then takes off like a rocket. YES! A great winning trade. Or is it?

When the chart hit 1.3080, that was the bid price. You can't buy at bid. You can buy at ask, which hit a low of 1.30815, above your limit price. So in real life, you never got filled. You missed the trade! But any backtest will think you did get filled.

Now, there are a few things you can do with TS fills (like convert to a market order), but you won't be able to simulate them in backtest, and if you use a time delay, who knows what the slippage will actually be?

My solution: ONLY use market orders, and always have 1-2 ticks slippage applied to account for the spread. Not a perfect solution, but backtest and real time performance seem to match when I do this.

I know this is probably more than you wanted to know, but it is an important point, that most people ignore - until they lose money.

Good Luck!

By the way, make sure to check around for spread prices. You might find TS spreads to be on the high end.

kevinkdog - That was a fantastic reply. Thank you for providing more than I asked. I have been looking at EURUSD for the past week and definitely noticed some oddities. Was planning on emailing Tradestation for some answers... for instance that I only see order filled at the bid or why there is a 20 pip spread almost at all times. At first I thought it was the subscription feed that I opted for but that does seem to be the case.

Market orders was the way I was leaning for the strat...20pips in the hole per entry, need to account for that. It seams the entry is really the issue at least for the little time I played on sim trading. I don't see a way of scaling with a 20 pip spread. Some of the late hour movements are only in the 20 pip spread (annoying).

Thanks again for the info


entropy - dont fight it, its inevitable

Started this thread Reply With Quote
 
(login for full post details)
  #4 (permalink)
 
 
Posts: 2,979 since Jul 2012
Thanks: 1,576 given, 5,902 received


LetmeInNow View Post
kevinkdog - That was a fantastic reply. Thank you for providing more than I asked. I have been looking at EURUSD for the past week and definitely noticed some oddities. Was planning on emailing Tradestation for some answers... for instance that I only see order filled at the bid or why there is a 20 pip spread almost at all times. At first I thought it was the subscription feed that I opted for but that does seem to be the case.

Market orders was the way I was leaning for the strat...20pips in the hole per entry, need to account for that. It seams the entry is really the issue at least for the little time I played on sim trading. I don't see a way of scaling with a 20 pip spread. Some of the late hour movements are only in the 20 pip spread (annoying).

Thanks again for the info


entropy - dont fight it, its inevitable

20 pips? Are you sure its not 2 pips? Right now (midnight eastern) I see 1.30328/1.30347, which is 1.9 pips. That is reasonable (for Tradestation).

Follow me on Twitter Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
(login for full post details)
  #5 (permalink)
CA/USA
 
Experience: Intermediate
Platform: Tradestation
Trading: Stocks
 
Posts: 10 since Nov 2012
Thanks: 4 given, 1 received

hmmm...I through I read a pip is considered the smallest single unit increment of the currency pair you are trading.

I currently see the 1.30352/1.30372 for EURUSD.

Still a newb in this market...

Started this thread Reply With Quote
 
(login for full post details)
  #6 (permalink)
 
 
Posts: 2,979 since Jul 2012
Thanks: 1,576 given, 5,902 received


LetmeInNow View Post
hmmm...I through I read a pip is considered the smallest single unit increment of the currency pair you are trading.

I currently see the 1.30352/1.30372 for EURUSD.

Still a newb in this market...

A pip is the 4th decimal on most pairs, 2nd decimal on JPY pairs. 5th decimal is a fraction of a pip.

1 pip usually equals around $10 on a normal $100,000 forex lot.

Follow me on Twitter Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
(login for full post details)
  #7 (permalink)
Athens, Greece
 
 
Posts: 3 since May 2013
Thanks: 2 given, 0 received

Hi all,

I trade stocks for quite a time in TS. I want to enter FX trading too. I trade in realtime but with simulated account in 1Min FX charts. How realistic my results are?

1. Is TS spread (the way TS gets its share I think) incorporated in real time bid/ask prices? In other words when I trade in TS in SIM but realtime mode, my results take into account TS additional spread?

2. Is there any other cost beyond the platforms fees etc, cost that is directly related to realtime FX charts (extra commissions)?

3. I have set limits etc in my orders. Fills are realistic? Should I add slippage too in realtime? I am under the impression that slippage is ideal for backtest only.

Thank you!

Reply With Quote
 
(login for full post details)
  #8 (permalink)
 
 
Posts: 2,979 since Jul 2012
Thanks: 1,576 given, 5,902 received


JimFeyn View Post
Hi all,

I trade stocks for quite a time in TS. I want to enter FX trading too. I trade in realtime but with simulated account in 1Min FX charts. How realistic my results are?

1. Is TS spread (the way TS gets its share I think) incorporated in real time bid/ask prices? In other words when I trade in TS in SIM but realtime mode, my results take into account TS additional spread?

2. Is there any other cost beyond the platforms fees etc, cost that is directly related to realtime FX charts (extra commissions)?

3. I have set limits etc in my orders. Fills are realistic? Should I add slippage too in realtime? I am under the impression that slippage is ideal for backtest only.

Thank you!


I would not rely on TS sim results for Forex. If you are using limits and stops in backtesting, I wouldn;t trust that either.

The only way I feel comfortable testing Forex in TS is to use all market orders, and add 1-2 pips slippage per side.

Watch your sim real time when you buy. Are you buying the bid or the ask? That will help you see if the sim is being overoptimistic.

Follow me on Twitter Reply With Quote
The following 2 users say Thank You to kevinkdog for this post:
 
(login for full post details)
  #9 (permalink)
Athens, Greece
 
 
Posts: 3 since May 2013
Thanks: 2 given, 0 received

Dear sir,

thank you for your prompt reply. I am interested in realtime simulated trading only, backtest and optimization has been done in another platform since my strategy is CPU demanding and TS cannot handle it in backtest. It is not 100 legit but it was the best I could do. Coding translation to EasyLanguage is perfect, I got the same results.

Yes I am watching it realtime for the past few days. I got fills for about 60% of my trades when I am using limits that utilize currentBid and currentAsk price; I am setting limits dynamically. My algorithm does from 15 to 100 trades per day.

When I was using market orders in realtime in TS, I was buying and selling sometimes very far from the bar's edges.. Hence I am not willing to use market orders in TS in realtime.

Actually, any feedback regarding FX trading in 1Min charts in TS? Does order filling satisfy you? I guess I should deal with very liquid currencies for start.

Thank you for your time.

Reply With Quote
 
(login for full post details)
  #10 (permalink)
 
 
Posts: 2,979 since Jul 2012
Thanks: 1,576 given, 5,902 received



JimFeyn View Post
Dear sir,

thank you for your prompt reply. I am interested in realtime simulated trading only, backtest and optimization has been done in another platform since my strategy is CPU demanding and TS cannot handle it in backtest. It is not 100 legit but it was the best I could do. Coding translation to EasyLanguage is perfect, I got the same results.

Yes I am watching it realtime for the past few days. I got fills for about 60% of my trades when I am using limits that utilize currentBid and currentAsk price; I am setting limits dynamically. My algorithm does from 15 to 100 trades per day.

When I was using market orders in realtime in TS, I was buying and selling sometimes very far from the bar's edges.. Hence I am not willing to use market orders in TS in realtime.

Actually, any feedback regarding FX trading in 1Min charts in TS? Does order filling satisfy you? I guess I should deal with very liquid currencies for start.

Thank you for your time.

Sorry, I can't be of more help. I only use market orders to enter and exit.

Follow me on Twitter Reply With Quote


futures io Trading Community Platforms and Indicators TradeStation > Tradestation Forex Strategy Setup - Accounting for Spread


Last Updated on September 10, 2014


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 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