Please edit your post (don't create a new post) and replace your code properly (with "</>" or Alt-S), or attach the original file directly with the "+ Attach file" button below the text box.
NB! Very important! DO NOT create a new post. EDIT your original post.
You have defined your function as requiring a boolean parameter:
bool fCheckTradingTime( bool useTradingTimeFilter ) { ... }
Yet when you call the function, you don't supply an argument for the parameter that you declared for the function:
fCheckTradingTime( )
okay, so should this be
fCheckTradingTime(useTradingTimeFilter)
or am i missing something?
You are reusing variable names for different scopes. Just because they have the same name does not make them the same variable.
They have different scopes. One is an input and the other a parameter.
input bool useTradeTimeFilter = true;
bool fCheckTradingTime( bool useTradingTimeFilter ) { ... }
Use different names so that you don't get confused.
input bool i_useTradeTimeFilter = true; ... bool fCheckTradingTime( bool useTradingTimeFilter ) { ... }; ... if( !fCheckTradingTime( i_useTradeTimeFilter ) ) ...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I've been trying to add a true/false input for use of time filter, however i get the below error. Probably missing something obvious. Any help is greatly appreciated.
'fCheckTradingTime' - Wrong parameter count
inputs
time filter code
getting error in on tick, with following lines
if(Localtime>waitTime && fCheckTradingTime())
and
if(fCheckTradingTime()==false)
again could possibly be missing something simple. but for the life of me cant see it. any help is greatly appreciated