NexusFi: Find Your Edge


Home Menu

 





Entries per day limit


Discussion in EasyLanguage Programming

Updated
    1. trending_up 3,265 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?
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
23 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 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