Page 1 of 1
MC equivalent of EL "TradesToday" ?
Posted: Aug 17 2010
by sptrader
I'm trying to limit the trades on a given day to 1 or 2 and can't find the EL "tradestoday" reserved word in MC- is there an equivalent in Multicharts ?
(or has someone written a graceful function to do the same thing ?)
Re: MC equivalent of EL "TradesToday" ?
Posted: Aug 18 2010
by SP
Code: Select all
[LegacyColorValue = true];
{
User Function: TradesToday
Inputs : Target date.
Returns: Number of entries on specified date.
Properties
[ ] Auto Detect
[*] Simple
[ ] Series
Sample Usage :
if (TradesToday(Date[0]) >= 2)
then EntryOK = FALSE ;
or
if (Condition1 and Condition2 and TradesToday(Date[0]) < 2)
then begin
{ ... do something here ... }
end ;
Provided by Product Support Dept.
of Omega Research, Inc.
}
Inputs: Date0(NumericSimple) ;
Vars : Loop(0), Cnt(0) ;
Cnt = 0 ;
for Loop = 0 to 10 begin
if (EntryDate(Loop) = Date0)
then Cnt = Cnt + 1 ;
end ; { next Loop }
TradesToday = Cnt ;
Re: MC equivalent of EL "TradesToday" ?
Posted: Aug 18 2010
by sptrader
Perfect, thanks !
Re: MC equivalent of EL "TradesToday" ?
Posted: Oct 04 2012
by zero123
I am getting Compile error with the above code in MC8.
Any idea?
Re: MC equivalent of EL "TradesToday" ?
Posted: Oct 04 2012
by TJ
I am getting Compile error with the above code in MC8.
Any idea?
You have to post a screenshot of your error message.
Re: MC equivalent of EL "TradesToday" ?
Posted: Oct 04 2012
by zero123
04.10.12 10:16:37
------ Build started: ------
Study: "TradesToday" (Function)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
Re: MC equivalent of EL "TradesToday" ?
Posted: Oct 04 2012
by TJ
04.10.12 10:16:37
------ Build started: ------
Study: "TradesToday" (Function)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
What is the function name you are using?
It should be "
TradesToday".
Re: MC equivalent of EL "TradesToday" ?
Posted: Oct 04 2012
by zero123
I am not using any function, just trying to compile the above code and getting the error with the compile process.
Re: MC equivalent of EL "TradesToday" ?
Posted: Oct 04 2012
by TJ
I am not using any function, just trying to compile the above code and getting the error with the compile process.
The above code is a function.
When you add it to the PowerLanguage Editor, please select it as a function.
Re: MC equivalent of EL "TradesToday" ?
Posted: Oct 04 2012
by zero123
I did add it as a function. Just can't seem to compile it, getting the same error message.
Re: MC equivalent of EL "TradesToday" ?
Posted: Oct 04 2012
by TJ
I did add it as a function. Just can't seem to compile it, getting the same error message.
What is the name you used for this function?
Re: MC equivalent of EL "TradesToday" ?
Posted: Nov 05 2012
by Henry MultiŠ”harts
04.10.12 10:16:37
------ Build started: ------
Study: "TradesToday" (Function)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
If you are unable to compile an empty study then please follow
this guide.