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

08-09-2005, 02:03 AM

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.


08-09-2005, 10:27 AM
find this line (around line 43):

if (getCurrentBarIndex()==0) (

and change it to this:

if (getCurrentBarIndex()==0) {

Also change this (around line 137):

//Check only the current bar

to this:

//Check only the current bar

Hope this helps