Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Hi, I have an intraday strategy that is active after the close of the regular session (after 18.00 exchange time) to 6.00. Since I want it to take only one trade per day I used the function entriestoday(date[0]) < 1. The issue is that if the strategy takes a trade between 18.00 and midnight and then closes it either if stop loss or target is hit, the function entriestoday(date[0]) does not stop the strategy from taking another trade after midnight if the entry criteria is met. Is there a way to get around it? Maybe a different function that refers to the entire regular session from open to close?
Thank you.
Can you help answer these questions from other members on NexusFi?
The easiest way to do this would be to initialize an int i before any of your other strategy logic.
eg.
int i;
Next at the time that you want to begin trading, set i=0
eg.
if(ToTime(Time[0]) == 180000) i=0;
In the conditional if statement that would trigger your entry order, include
&& i < 1 and in the line after your entry order placement line, write i++;
eg.
if(CrossAbove(EMA(20),EMA(50),1) && i<1)
{
EnterLong();
i++;
}
Note: I don’t use EasyLanguage so this is based on NT8 C#. But the underlying logic principles still apply. Essentially, you need to avoid using the predefined function that will reset entries at midnight and manually increment an entry order count and reset it to zero when you want the next trading session to start.