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 ?)
MC equivalent of EL "TradesToday" ?
Re: MC equivalent of EL "TradesToday" ?
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" ?
I am getting Compile error with the above code in MC8.
Any idea?
Any idea?
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: MC equivalent of EL "TradesToday" ?
You have to post a screenshot of your error message.I am getting Compile error with the above code in MC8.
Any idea?
Re: MC equivalent of EL "TradesToday" ?
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)
------ Build started: ------
Study: "TradesToday" (Function)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: MC equivalent of EL "TradesToday" ?
What is the function name you are using?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)
It should be "TradesToday".
Re: MC equivalent of EL "TradesToday" ?
I am not using any function, just trying to compile the above code and getting the error with the compile process.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: MC equivalent of EL "TradesToday" ?
The above code is a function.I am not using any function, just trying to compile the above code and getting the error with the compile process.
When you add it to the PowerLanguage Editor, please select it as a function.
Re: MC equivalent of EL "TradesToday" ?
I did add it as a function. Just can't seem to compile it, getting the same error message.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: MC equivalent of EL "TradesToday" ?
What is the name you used for this function?I did add it as a function. Just can't seem to compile it, getting the same error message.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: MC equivalent of EL "TradesToday" ?
If you are unable to compile an empty study then please follow this guide.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)