View Full Version : NinjaScript Delete Warning
08-19-2007, 06:08 PM
While trying to delete a self-created strategy, I am getting the following error message.
"You have custom NinjaScript files on your PC that have programming errors. These errors must be resolved before you can delete a NinjaScript File."
How can I find error and resolve the issue? The error message does not direct me to a specific file.
08-19-2007, 07:51 PM
Open any strategy, compile it, a list of errors and associated file(s) will be listed in the bottom of the NinjaScript Editor.
08-19-2007, 07:57 PM
Thanks for the reply. After compiling the strategies I got the following error description.
"The name 'Max' does not exist in the current context Strategy"
This relates to my other post regarding the maximum high of last 20 bars. My code is as below.
if (High <= Max(High,20))
DrawArrowUp("My up arrow" + CurrentBar, 0, 0, Color.Green);
Can you point out what error I have made in the above code?
08-19-2007, 09:08 PM
I think you want to be using Bars.HighestBar instead of Max. If you decide Max is what you want to be using you should use Math.Max().
For HighestBar I believe this will work to your likings:
if(High <= High[Bars.HighestBar(20)])
08-19-2007, 09:27 PM
Bars.HighestBar worked great.
08-20-2007, 06:42 AM
Note: The capitilization.