Announcement

Collapse
No announcement yet.

Weird symbol apparition?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weird symbol apparition?

    Hi, I'm experiencing a weird bug:

    Currently I'm testing various efs scripts on the same symbol, FGBL H6-EUX. I do have studies thrown up other charts, such as FXXP H6-EUX, but none of them have EFS automated trading enabled.

    I left one of these scripts running overnight for testing purposes, on eSignal Paper Trading, placing 1 contract trades on FGBL. Here's how my trades are scripted:

    Normal Entries/Exits are Market:
    ...
    bloid=Trade.buyMarket(getSymbol(),nqty);
    debugPrintln(getSymbol()+" BUY MARKET with OID "+bloid);
    ...

    ...
    tempid=Trade.sellMarket(getSymbol(),nqty);
    debugPrintln(getSymbol()+" position close via SELL MARKET order with OID "+tempid);
    ...


    I also have a Stop Loss order placed:

    ...
    ssoid=Trade.sellStop(sl,getSymbol(),nqty);
    debugPrintln(getSymbol()+" Stop Loss @"+sl+" with OID "+ssoid);
    ...

    and nqty=1 is a constant I declare globally.

    In the morning, I found that the DEMO2 account it ran on was showing -9000 Realized and Total P&L even though the trades it realized lost 4 and 5 pips respectively according to ORDERS tab (and again, I was running 1 contract only).
    Worse than that, though, a couple of the debug messages from above were on FXXP H6-EUX instead of FGBL H6-EUX and it wasn't just a bad symbol message showing up, but also the corresponding price in the message was the FXXP one.

    I checked the dictionary equivalencies in Broker Manager under eSignal Paper Trading to make sure I hadn't mismatched some symbols but they were all correct. Does anyone have any idea what could be causing this?

    Could it be that the heavy usage of getSymbol() might cause it to malfunction?
Working...
X