Syntax Error referencing external symbol's EMA and
Author: swuzy
Creation Date: 4/13/2009 1:58 AM
profile picture

swuzy

#1
In this simple exercise, the part I'm having trouble with is in trying to reference an external symbol's EMA to see whether the external symbol's price is higher or lower than its EMA. The language or syntax is incorrect however in line 34. Thanks for any help in straightening me out here.

CODE:
Please log in to see this code.
profile picture

Eugene

#2
CODE:
Please log in to see this code.
profile picture

swuzy

#3
Thanks. No error signals on run now.

However, there must be some other error in the logic regarding this or PriceUnderEMA / PriceOverEMA. There should be some trades, and there are none. Can't figure it out after several hours. Taking a break.
profile picture

Eugene

#4
Remove "else" in
CODE:
Please log in to see this code.
profile picture

swuzy

#5
Thanks, works now.

But it turned out to be a pretty bad modification. Wanted to reduce the drawdowns and from the charts, it seemed like this should help, but this dumbed the script down incredibly, and still had bad drawdowns.

Gotta keep trying.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).