Hello all,
I’m unable to cut and paste code into the Custom Criteria Editor! Any ideas as to why?
Additionally, is there a resource library available with sample codes above and beyond what’s native within MC that I might try?
Thanks for the help.
GuppyDRV
Custom Criteria Editor
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Custom Criteria Editor
There's a discussion here with several examples and more information.is there a resource library available with sample codes above and beyond what’s native within MC that I might try?
But the Custom Criteria Editor is kind of the old way of defining a custom criteria, because now there's also the SetCustomFitnessValue keyword.
With `SetCustomFitnessValue()` there are a lot more options available. Plus you don't have to write JavaScript-like code but can simply use PowerLanguage in MultiCharts' regular editor.
Re: Custom Criteria Editor
JoshM,
Thanks for the input. I’ve tried using those, the built in Sharp Ratio, and it produces a division by zero error. This is attached to code that otherwise has traded without issue forever! I know I’m doing something wrong I just can’t figure out what that is!
GuppyDRV
Thanks for the input. I’ve tried using those, the built in Sharp Ratio, and it produces a division by zero error. This is attached to code that otherwise has traded without issue forever! I know I’m doing something wrong I just can’t figure out what that is!
GuppyDRV
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Custom Criteria Editor
It doesn't have to be your mistake! It might also be that the script has a wrong input or calculation that makes it try to divide by zero. The built-in `SharpRatio` function does seem to handle possible division by zero errors well by checking for that.Thanks for the input. I’ve tried using those, the built in Sharp Ratio, and it produces a division by zero error. This is attached to code that otherwise has traded without issue forever! I know I’m doing something wrong I just can’t figure out what that is!
One option to easier find the problem is to use `SetCustomFitnessValue()` in a separate signal rather than in the main signal. That way when there's an error you "only" have to troubleshoot that specific signal that sets the custom criteria. That might make the task a little more manageable!