Hi, i want to count trade in week..
Example: i want to trade only 1 once time
count trade in week
- Anna MultiCharts
- Posts: 560
- Joined: 14 Jul 2017
- Has thanked: 42 times
- Been thanked: 141 times
Re: count trade in week
Hello, shivax!
In manual trading you can do that by just counting the number of trades yourself or monitoring them in the Order and Position Tracker.
If you need to do that in autotrading, then your strategy should memorize the time of the trades and in case you need more than just one trade a week it should also remember the number of trades that were already done during the specified period. Please refer to the Strategy Position and Strategy Position Trades sections of our Wiki:
https://www.multicharts.com/trading-sof ... y_Position
https://www.multicharts.com/trading-sof ... ion_Trades
In manual trading you can do that by just counting the number of trades yourself or monitoring them in the Order and Position Tracker.
If you need to do that in autotrading, then your strategy should memorize the time of the trades and in case you need more than just one trade a week it should also remember the number of trades that were already done during the specified period. Please refer to the Strategy Position and Strategy Position Trades sections of our Wiki:
https://www.multicharts.com/trading-sof ... y_Position
https://www.multicharts.com/trading-sof ... ion_Trades
Re: count trade in week
hi, anna
and how i code the news week?
i must to know when the next week starts
and how i code the news week?
i must to know when the next week starts
- fbertram
- Posts: 166
- Joined: 16 Oct 2014
- Location: Seattle, USA
- Has thanked: 36 times
- Been thanked: 76 times
- Contact:
Re: count trade in week
Hi Shivax,
try something along the lines of:
This should get you pretty close to what you are looking for. Please excuse any typos or other errors, I no longer have an EasyLanguage license available.
https://www.multicharts.com/trading-sof ... p/DateTime
https://www.multicharts.com/trading-sof ... e_Routines
Cheers, Felix
try something along the lines of:
Code: Select all
if DayOfWeeek(DateTime[0]) < DayOfWeek(DateTime[1])) then
begin
// a new week has started
// memorize the total number of trades
end else begin
// we are somewhere in the middle of the week
// trades this week is total number of trades minus the number at the beginning of the week
end;
https://www.multicharts.com/trading-sof ... p/DateTime
https://www.multicharts.com/trading-sof ... e_Routines
Cheers, Felix