Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Location
    Manchester, UK
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Syntax error on line 46, can't seem to call a function initialising aspects of a .DLL

    Hi,

    I'm new here and I need a bit of help debugging this code. I've recently picked up some charting software that has Javascript functionalility to automate trades and I've been learning Javascript as I go along

    I've not had that much trouble so far, but I've just finished writing the code attached. It's a simple trading system for the FOREX markets, but I've managed to get a syntax error on line 46.

    "var currentPosition = fxdots5.call("GetMarketPosition","","GBP/USD");"

    I think that my problem is up in PreMain, where I call an initialisation function "initialisefunction()" which is at the bottom of my code, where I set up the access to the bits of the fxdots5.DLL I need in the rest of my code. I've been sitting here for ages trying to work out where I've gone wrong. Lack of sleep and caffeine have driven me insane.

    Any help would be most appreciated.

    Kuro
    Attached Files Attached Files
    Last edited by Kuro-Bishounen; 08-09-2005 at 01:15 AM. Reason: I read the tips on posting and reasilised I should be more specific

  • #2
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Location
    Chamonix, France
    Posts
    600
    Thanks
    1
    Thanked 3 Times in 3 Posts
    find this line (around line 43):
    Code:
    if (getCurrentBarIndex()==0) (
    and change it to this:
    Code:
    if (getCurrentBarIndex()==0) {
    Also change this (around line 137):
    Code:
    )
        //Check only the current bar
    to this:
    Code:
    }
        //Check only the current bar
    Hope this helps

    m_n
    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •