I set up a demo account with FXCM.
I activated autotrading on a chart in the MCFX Demo workspace (top right USDJPY 15min MACD) using the demo account paramters/login. The chart is showing new trades, but none are showing in FXCM demo account trades list (open or closed trades).
Should this be working, and if so, how to set things so that they DO work?
Automated trading not working
-
- Posts: 199
- Joined: 25 Jan 2008
- Has thanked: 2 times
- Been thanked: 7 times
-
- Posts: 199
- Joined: 25 Jan 2008
- Has thanked: 2 times
- Been thanked: 7 times
-
- Posts: 199
- Joined: 25 Jan 2008
- Has thanked: 2 times
- Been thanked: 7 times
-
- Posts: 64
- Joined: 25 Jan 2008
Figured it out. The max shares/contracts to position defaulted to 65000. The fixed shares/conracts per trade (note: do not specify contracts, specify in UNITS) needs to be 100000. Since 100000 (or 1) is not evenly divisible by 65000, it generates an error. The 65000 must be changed to 100000 and the fixed shares/contracts must be integer multiples of 100000.
Far from clear, and the defaults are incorrect - at least on my installation.
Far from clear, and the defaults are incorrect - at least on my installation.
-
- Posts: 199
- Joined: 25 Jan 2008
- Has thanked: 2 times
- Been thanked: 7 times
-
- Posts: 64
- Joined: 25 Jan 2008
No closed trades, only opens new ones, but I know the reason for that, and there are two possible solutions that come to mind.
FXCM has a setting on accounts that allows "hedging". There is a post somewhere in these forums about that, I think. When it's ON (the default), your code has to close a position before opening another in opposite direction. Presently, just like with manual trading, you can be both long and short at the same time (unlike in TS). This can actually be a GOOD thing, for example: you have a long position that you expect to last for 2 weeks, but want to play a short term pullback in an uptrend by going short.
You can apparently request FXCM to turn off hedging for the specific account. Or, you can modify your code to exit an existing position (say, long) when you get a short entry signal.
More work, and some complex scenarios can arise which will be difficult to code around, but before asking for hedging to be turned OFF, I think I'll investigate code solutions.
FXCM has a setting on accounts that allows "hedging". There is a post somewhere in these forums about that, I think. When it's ON (the default), your code has to close a position before opening another in opposite direction. Presently, just like with manual trading, you can be both long and short at the same time (unlike in TS). This can actually be a GOOD thing, for example: you have a long position that you expect to last for 2 weeks, but want to play a short term pullback in an uptrend by going short.
You can apparently request FXCM to turn off hedging for the specific account. Or, you can modify your code to exit an existing position (say, long) when you get a short entry signal.
More work, and some complex scenarios can arise which will be difficult to code around, but before asking for hedging to be turned OFF, I think I'll investigate code solutions.
-
- Posts: 199
- Joined: 25 Jan 2008
- Has thanked: 2 times
- Been thanked: 7 times
-
- Posts: 199
- Joined: 25 Jan 2008
- Has thanked: 2 times
- Been thanked: 7 times
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
If you have a code that doesn't work as expected, you can send it to us together with the description of how the results are different from the expected and we will help you.
You can send the codes to mpashkova@tssupport.com
Regards.
You can send the codes to mpashkova@tssupport.com
Regards.