PDA

View Full Version : Copying existing indicators


sbgtrading
10-05-2009, 07:52 AM
I'm having trouble creating a new indicator from an existing one.

I wanted to create a new custom indicator called GannFanTest2, so
I opened up an existing indicator (I randomly chose the RegressionChannel indicator), and stripped out basically all the code and wrote in my simple changes (I've attached the new CS file here).

Now since the new indicator didn't require any properties, I commented out the one property that had been defined in the RegressionChannel code. The name of that property was "Period".

Now, when I compile the new indicator, it errors out, because the NinjaScript code that has been automatically added to the indicator is still looking for that old property "Period" to be defined. I believe this was also a problem under v6.5.

eDanny
10-05-2009, 08:09 AM
In 6.5, if I commented a range in properties with /* */ I would get the error but if commenting every line with // I would not get the error. Doesn't seem to be the case here.

NinjaTrader_Dierk
10-05-2009, 08:25 AM
Yes, commenting out by "//" should do the trick.

sbgtrading
10-05-2009, 08:33 AM
Yes, commenting out by "//" should do the trick.

That commenting method was used in the attached CS file, but it did not solve the compile-time problem.

NinjaTrader_Dierk
10-05-2009, 09:19 AM
I see. This is a bug which will be fixed with next update. Thanks for reporting.