WL4 script compiled with some error messages
Author: denoving
Creation Date: 8/1/2012 11:35 PM
profile picture

denoving

#1
The following code is code that I was evolving into something new, but
I never got it finished. I figure I can start evolving again as soon as
I can get a baseline to compile and run....

The code runs for about 500 milliseconds, and then I get the following
messages:

Runtime error: Specified argument was out of the range of valid values.
at wealthlabcompile2.strategy.execute[]
at wealthlapcompile2.strategy.plotMAEMFEProfit[]
at finantic.tl.wealthscriptTL.positionOpenMAE(int32 bar, int32 P)
at finantic.tl.wealthscriptTL.check_position(int32 position)

What do you recommend that I do?


Here's the code....

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

Eugene

#2
QUOTE:
at wealthlapcompile2.strategy.plotMAEMFEProfit[]

So the failing piece of code is: PlotMAEMFEProfit(). Considering that this routine serves eye candy kind of purposes, here's a quick & dirty fix:

1. Find this line:
CODE:
Please log in to see this code.
2. Insert a new line right below:
CODE:
Please log in to see this code.

i.e.
CODE:
Please log in to see this code.
And the script will produce trades and visual output.
QUOTE:
What do you recommend that I do?

I'd recommend a manual translation of the script. For example, a 25-line construct called "get_sma_score" boils down to just this:
CODE:
Please log in to see this code.
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).