Thank you!
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
One Trade Per Day
Collapse
X
-
One Trade Per Day
I'm bringing this back up - if a trader wants to enter only one trade a day (session set to market) and has a strategy set up, how can they utilize the Wizard to add this criteria - one trade per session. I see a lot pre v7 posts, and am wondering if there is anything under the Condition Builder - session break that would work? I am still hoping not to have to go into the code, I've been given links and zip files, but I think they are all pre NT v.7
Thank you!Tags: None
-
Originally posted by Dia1496 View PostI'm bringing this back up - if a trader wants to enter only one trade a day (session set to market) and has a strategy set up, how can they utilize the Wizard to add this criteria - one trade per session. I see a lot pre v7 posts, and am wondering if there is anything under the Condition Builder - session break that would work? I am still hoping not to have to go into the code, I've been given links and zip files, but I think they are all pre NT v.7
Thank you!
-
I did receive the reply and downloaded the files of coding. However, I'm seeing features such as session breaks that I'm thinking can handle this without having to add that code. I'm not sure where to even plug in the code. Some code I've looked at is over 2 years old and certainly older than NT Version 7, other code is pertaining to PnL balance. So I'm looking specifically for a new session break before taking another trade.
Comment
-
Originally posted by Dia1496 View PostI did receive the reply and downloaded the files of coding. However, I'm seeing features such as session breaks that I'm thinking can handle this without having to add that code. I'm not sure where to even plug in the code. Some code I've looked at is over 2 years old and certainly older than NT Version 7, other code is pertaining to PnL balance. So I'm looking specifically for a new session break before taking another trade.
does it not work?
Comment
-
Hi Sledge, I can put this as the next set, I am not sure how to handle the variable however. So if My criteria for Long is on Set 1, and Short criteria on Set 2, I would put this on Set 3. Do I give the variable a number othre than zero? I'm still getting more than one trade per day.
Comment
-
Originally posted by Dia1496 View PostHi Sledge, I can put this as the next set, I am not sure how to handle the variable however. So if My criteria for Long is on Set 1, and Short criteria on Set 2, I would put this on Set 3. Do I give the variable a number othre than zero? I'm still getting more than one trade per day.
You'd probably need to mimic set1/2 in set4/5 for short, and have set3 reset variable1 for shorts.
I don't use the builder, as I'm a coder. This was my 2nd attempt at looking at it in a long time.
Comment
-
Thank you Bertrand, this does return only one trade per day. A question, I noticed if the opening bar contains the signal it will not take the trade until the next instance. This is not the case if the 2nd or beyond bars contain the signal. Is there a reason it is ignoring the first bar of the session?
Comment
-
cbc, it would not need to be unlocked for the idea shown in the demo file - it works via user variables and the daily reset at session break that you could capture as condition from the wizard - thus allowing you to execute one trade only, as your variable that keeps track would not allow further to happen once one trade has been done. It would only allow a trade to happen again on the next day, as your tracking variable would be reset then to a value of 0 (Condition set 2).BertrandNinjaTrader Customer Service
Comment
-
Ok
Bertrand,
Thank heaps for your help. I'm really sorry to ask, hopefully this will be the last question tho. How exactly do I setup the file so in the condition builder it will be variable 1. Again I've looked in the NT help for how to do this and couldn't find any help anywhere.
Then once its been set to variable1. In the condition builder how do I set it up?
Is it simply click on variable 1 on the LHS, then put an = in the middle, then what do I put on the RHS?
Thanks for all the help Bertrand.
Comment
-
No worries, the setup would be all done in the Condition Builder - so from the User Variables on the left side you pick which one you want to set / update in value. In the middle you have the operator for comparison (so would left side be equal to right, or greater / smaller). Using an equal sign here would check for the user variable to have a specific value, which is then used as part of your overall condition (all blocks you enter in one set are connected via AND, so all need to happen in order to trigger an action).
The lower part 'do the following' would trigger the action as result of hitting your condition here the condition builder would allow to set a variable value as well - which we take advantage of to stop trading for the day once one entry has hit. Then later in the day with your variables being set an entry could not happen again since one requirement is that the specific tracking user variable has a value of 0, which it only would have if we had it reset to this value at the beginning of the session - which would allow the script to reenter.BertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kevinenergy, 02-17-2023, 12:42 PM
|
117 responses
2,766 views
1 like
|
Last Post
by jculp
Today, 12:59 PM
|
||
Started by Mongo, Today, 11:05 AM
|
5 responses
15 views
0 likes
|
Last Post Today, 12:58 PM | ||
Started by SightCareAubetter, Today, 12:55 PM
|
— |
Topic deleted by NinjaTrader_LuisH
|
||
Started by traderqz, Today, 12:06 AM
|
8 responses
16 views
0 likes
|
Last Post
by traderqz
Today, 12:51 PM
|
||
Started by SightCareAubetter, Today, 12:50 PM
|
0 responses
2 views
0 likes
|
Last Post Today, 12:50 PM |
Comment