Help to solve an error

Post Reply
User avatar
Gamma_gallus
Trader
Posts: 118
Joined: Wed Nov 16, 2011 2:03 pm
Location: France

Help to solve an error

Post by Gamma_gallus »

Hi everyone,

I almost managed to create my first ever indicator !! Well not from scratch, far from it, I did mix informations from couple of indies (main frame) and then adding more similar lines was 'kind of easy'

'Almost' because in fact I have a bug somewhere, and an error when I compile it (I was able to compile without errors until I decided to add a last functionality with few lines of code ... :evil: )

If someone could please help me ! It would be great

1- The compile error appears since I've added those lines (start line 218) - the error tells me 'unbalanced left parenthesis' at a place where everything was fine before .... -

if (HardPrice>0) {
mml[0] = HardPrice-(GridSpace*MathFloor(FactorToDivideRange/2);
}
else {

2- The Bug is related to the TF input : it should be fixed from the user input, but actually on the chart when I switch from a TF to another one, the values change too, where it shouldn't ..

Really sorry if those errors are stupid, but these are my first walks on this weird coding world ..

Thx
Olivier
You do not have the required permissions to view the files attached to this post.
Dennis4x
Trader
Posts: 16
Joined: Wed Feb 22, 2012 2:27 pm

Re: Help to solve an error

Post by Dennis4x »

I didn't look into the attachment, but your code is missing a parenthesis:

(GridSpace*MathFloor(FactorToDivideRange/2)

Should be:

(GridSpace*MathFloor(FactorToDivideRange/2))

?
User avatar
Gamma_gallus
Trader
Posts: 118
Joined: Wed Nov 16, 2011 2:03 pm
Location: France

Re: Help to solve an error

Post by Gamma_gallus »

Dennis4x wrote:I didn't look into the attachment, but your code is missing a parenthesis:

(GridSpace*MathFloor(FactorToDivideRange/2)

Should be:

(GridSpace*MathFloor(FactorToDivideRange/2))

?

Damn it ... Thank you very much, I knew this error was stupid, but that's the problem with trying to search for it in the middle of the night, when the eyes can't bearly stay open for more than 5 min :D

It compiles correctly now.

I'll see if I can fix the bug now, but that may be more complex to find, expecially with my level :)

Thank you !

Olivier
Post Reply

Return to “Coders Hangout”