Trade FOREX with FXCM

  • Award-Winning Platform
  • 24/7 Customer Support
  • Trade Directly on Charts
  • Free $50K Practice Account
Register


Results 1 to 3 of 3

Thread: I’m having problems going from backtesting to live

  1. #1
    JoeO is offline Member
    Join Date
    May 2011
    Posts
    5

    I’m having problems going from backtesting to live

    I’m having problems going from back testing to live – has anyone seen anything similar to this?

    I back tested an stEA that I developed. After determining that the EA worked as expected, I went live with it on a demo account.

    The first live trade encountered did not perform as expected – there were two problems:
    (a) the market order created appeared at the opening of a new bar as opposed to the close of the bar where the order was generated and
    (b) a S/L order should have been created but was not. I turned off the EA and manually closed the trade with a loss of approximately 46 pips (the S/L order would have closed the trade with 10 pip loss).

    I re-ran the back tests and got the results I expected. In fact when the back test got to the bar that triggered the live trade, a Sell Short was generated at the close of the bar and then the trade was then closed when the price had moved 10 pips against me. In back testing, if the price goes in the correct direction, the trade is closed out in three stages..
    btw - IOG is on

    Particulars
    EURUSD 10 minute chart
    (only pertinent lines of code are shown below)
    (declared within the class – outside any method)
    private IMarketOrder enterLong, enterShort;
    private IPriceOrder slLong, slShort;

    (in Construct ())
    enterShort = OrdersFactory.CreateMarketThisBar(new OrdersCreateParams(Lots.Variable, "entS", OrderAction.SellShort));

    slShort = OrdersFactory.CreateStop (new OrdersCreateParams(Lots.Variable, "slS", OrderAction.BuyToCover, ExitInfo.Total));

    in Execute ()if setup conditions are met:

    stopLoss = Bars.High[1] + 20*pips; // initial S/L – reset when order is opened
    slShort.Generate(3*numOfLots);
    enterShort.Generate(3*numOfLots);

    the next time Execute() is run, I check for open trades - I’m using StrategyInfo.MarketPosition to determine how many lots if any are open..

    If three lots are open, do the following:
    stopLoss = entryPrice + 10*pips;// reset S/L relative to entry price
    slShort.Generate(stopLoss, 3*numOfLots);
    tp1Short.Generate(tp1Price, numOfLots);

    If two lots are open:
    stopLoss = entryPrice;// reset S/L to break even
    slShort.Generate(stopLoss, 2*numOfLots);
    tp2Short.Generate(tp2Price, numOfLots);

    If one lot is open:
    stopLoss = recentLow + 10*pips;// trailing S/L @ 10pips
    slShort.Generate(stopLoss, 3*numOfLots);

  2. #2
    docgrace is offline Registered User
    Join Date
    Mar 2012
    Posts
    2

    Trading Binary Option help

    I just started trading binary options on markets world. Gold went down $7 yesterday. I doubled my investment on a lower/call option on gold with Markets World. Binary options trading is far superior to trading gold or stocks. It's simpler and easier to understand. I thought the price of gold was too high yesterday when I looked at it and that it would be lower by the end of the day. I doubled my money just about as I got 95% return plus my investment back!

  3. #3
    Ericmick is offline Member
    Join Date
    Feb 2012
    Posts
    23
    Quote Originally Posted by docgrace View Post
    I just started trading binary options on markets world. Gold went down $7 yesterday. I doubled my investment on a lower/call option on gold with Markets World. Binary options trading is far superior to trading gold or stocks. It's simpler and easier to understand. I thought the price of gold was too high yesterday when I looked at it and that it would be lower by the end of the day. I doubled my money just about as I got 95% return plus my investment back!
    Hi docgrace! First of all i wish to know, what is binary trading? I don't have enough experience in forex trade. I have been came here learn and get good knowledge about forex.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.