Hi there,
I like to write in EL a code where I need to maximize the number of trades on daily basis.
I tried SessionStart en SessionEnd, but still no clue.
Anyone any idea how to specify the number of trades a system may do daily?
thx in advance
How to maximize trades daily
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: How to maximize trades daily
Hello gannlover13,
There are couple of things limiting number of trades per a bar (thus per a day). First of all i recommend you to read how signals are calculated in MC. The following settings may affect the number of trades: If those options are configured correcly, the number of orders per 1 day = the number of orders you code generates per the day.
There are couple of things limiting number of trades per a bar (thus per a day). First of all i recommend you to read how signals are calculated in MC. The following settings may affect the number of trades: If those options are configured correcly, the number of orders per 1 day = the number of orders you code generates per the day.
-
- Posts: 8
- Joined: 15 Aug 2014
- Has thanked: 8 times
Re: How to maximize trades daily
Andrew, thanks for quick answer.
I would like to code it myself in an indicator, I have reasons for that. Not in a signal thus.
Example:
The day starts -> from x to y-time n-trades may be done, long/short.
After x trades THAT DAY trading have to stop.
This is what I need in EL-code
I would like to code it myself in an indicator, I have reasons for that. Not in a signal thus.
Example:
The day starts -> from x to y-time n-trades may be done, long/short.
After x trades THAT DAY trading have to stop.
This is what I need in EL-code
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: How to maximize trades daily
Gannlover13,
We can create it for you on paid basis. If you are interested in evalution, please send us a detailed description and requirements for the indicator to support@multicharts.com
You can also try to create it yourself or ask anouther forum users to help you with this.
We can create it for you on paid basis. If you are interested in evalution, please send us a detailed description and requirements for the indicator to support@multicharts.com
You can also try to create it yourself or ask anouther forum users to help you with this.
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: How to maximize trades daily
I'm still not clear what you're trying to do. Are you trying to limit the number of trades done each day during a certain time?
-
- Posts: 8
- Joined: 15 Aug 2014
- Has thanked: 8 times
Re: How to maximize trades daily
@ furytrader,
Yes, I like to maximize the number of trades between certain times daily.
A variable of maxtrades exists and with this variable one could limit the trades.
Yes, I like to maximize the number of trades between certain times daily.
A variable of maxtrades exists and with this variable one could limit the trades.
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: How to maximize trades daily
Wouldn't it be easier to have the signal communicate this information to the indicator? That would also solve the issue that an indicator cannot stop trading (unless you trade discretionary, but then it's you who stop and not the indicator :] ).I would like to code it myself in an indicator, I have reasons for that. Not in a signal thus.
Example:
The day starts -> from x to y-time n-trades may be done, long/short.
After x trades THAT DAY trading have to stop.
This is what I need in EL-code
See I_SetPlotValue and I_GetPlotValue for that.
I'm not sure if you mean that this `maxtrades` variable holds the current trade count or the treshold that would define the maximum number of trades.A variable of maxtrades exists and with this variable one could limit the trades.
But see TotalTrades for the total number of trades of the signal. This keyword is not accessible in indicator, so you either need to use a global variable or use the above suggestion.
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: How to maximize trades daily
This doesn't have to be too hard, but I don't think this is for an indicator to do. To code it in a signal is pretty straight forward - I'm going to assume that you're working on a 24 hour chart:
There may be easier ways to code this but, like I said, it's pretty simple.
Code: Select all
Input: DailyLimit(0);
vars: startNumTrades(0);
If Date > Date[1] Then startNumTrades = TotalTrades;
...
If (totalTrades - startNumTrades) <= dailyLimit Then Begin
<Enter buy logic here>
<Enter sell logic here>
End;
-
- Posts: 742
- Joined: 09 Apr 2010
- Location: Texas
- Has thanked: 483 times
- Been thanked: 274 times
- Contact:
Re: How to maximize trades daily
In easylanguage there is a function called "TradesToday" ...MC should have something equivalent...
If you can get access to it, just write something like:
If you can get access to it, just write something like:
Code: Select all
If TradesToday <= 5 {trade limit} then begin
enter buy logic here
enter sell logic here
end;
Re: How to maximize trades daily
As long as there is no function implemented in MC like in TS, he needs the counter for each trade to his maximum trades input. Did not see it here :
Hope this makes it more clear and it helps.
My Regards.
Ben
Code: Select all
input : i.MaxTrades(5);
var : var.TradesToday(0);
if date <> date[1] then
begin
var.TradesToday = 0;
end;
if (Trade.Condition = 1) and (var.TradesToday <= i.MaxTrades) then
begin
buy/sell ........
var.TradesToday = var.TradesToday + 1;
end;
My Regards.
Ben
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: How to maximize trades daily
The keyword TotalTrades will tell you the # of total trades closed out since trading started.