NexusFi: Find Your Edge


Home Menu

 





Entries per day limit


Discussion in EasyLanguage Programming

Updated
    1. trending_up 3,266 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Entries per day limit

  #1 (permalink)
soacm
Bucharest, Romania
 
Posts: 71 since Mar 2022
Thanks Given: 38
Thanks Received: 22

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.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
11 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #2 (permalink)
 
Rovo27's Avatar
 Rovo27 
Austin + TX/United States
 
Experience: Advanced
Platform: Ninjatrader 8
Broker: Rithmic
Trading: NQ
Posts: 78 since Aug 2020
Thanks Given: 23
Thanks Received: 122

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.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
soacm
Bucharest, Romania
 
Posts: 71 since Mar 2022
Thanks Given: 38
Thanks Received: 22



Rovo27 View Post
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.

Thank you, will give it a try.

Reply With Quote




Last Updated on July 1, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts