Strategy Debugger: Indicator not found

Moderator: admin

Strategy Debugger: Indicator not found

Postby BMTrader » Sat Jan 08, 2011 5:45 pm

Hi guys,

I just wrote a first custom strategy. but i cannot debug it.
i use a custom indicator. i have a copy of the indicator in every directory in the SDK path,
indicator,
indicator\standard
strategy
strategy\standard
but the debugger always tells me he couldnt find the indicator.
the indicator works in marketscope.
the indicator requires to parameters:

indicator:name(resources:get("name"));
indicator:description(resources:get("description"));
indicator:requiredSource(core.Bar);
indicator:type(core.Indicator);

indicator.parameters:addInteger("Signal", resources:get("param_Signal_name"), resources:get("param_Signal_description"), 8);
indicator.parameters:addInteger("Band", resources:get("param_Band_name"), resources:get("param_Band_description"), 5);
indicator.parameters:addColor("SignalColor", resources:get("param_SignalColor_name"), resources:get("param_SignalColor_description"), core.rgb(255, 0, 0));
indicator.parameters:addColor("BandColor", resources:get("param_BandColor_name"), resources:get("param_BandColor_description"), core.rgb(0, 255, 64));

the strategy calls it with
BarSource = ExtSubscribe(1, nil, instance.parameters.Period, instance.parameters.Type == "Bid", "bar");
indicator = core.indicators:create("CustomIndicator", BarSource, Signal,Band);

has anyone a clue what i did wrong. think it is a little mistake
but i cant figure it out

thanks for any advice

BM
BMTrader
 
Posts: 2
Joined: Thu Dec 30, 2010 12:41 pm

Re: Strategy Debugger: Indicator not found

Postby Apprentice » Sun Jan 09, 2011 6:33 am

It would help if you send me an indicator to my private email (lua and lua.rc).


From this piece of code you post, i can see two possible problems.

1)
When calling an external function, its name must be always written in capital letters
indicator = core.indicators:create("CustomIndicator", BarSource, Signal,Band);
indicator = core.indicators:create("CUSTOMINDICATOR", BarSource, Signal,Band);

2)
Do you have on your platform CUSTOMINDICATOR,
or is it the name of this function?

If it is you call CUSTOMINDICATOR from CUSTOMINDICATOR.

3) Custom Indicators you need to copy only to indicators/Custom folder.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36494
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Strategy Debugger: Indicator not found

Postby BMTrader » Mon Jan 10, 2011 8:23 am

thanks for the quick reply

as u said i changed to capital letters.
gladly i recently change my indicator and introduced a mistake. from the
error message i got, i can now tell that the strategy debugger expects an indicator
to be in the
indicator\standard directory of indicoreSDK
no matter if its a standard or a custom indicator.

thanks for ur help

BM
BMTrader
 
Posts: 2
Joined: Thu Dec 30, 2010 12:41 pm

Re: Strategy Debugger: Indicator not found

Postby Apprentice » Mon Jan 10, 2011 8:48 am

I could help more if I had a complete code.
Now, I can only assume, what is the problem.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36494
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 47 guests