Thanks in advance.
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
First Trade Flat
Collapse
X
-
First Trade Flat
Hey everyone, I am having a bit of an issue with one of my strategies. I have one that uses price change as one of the indicators, ie. close of current bar is higher than close of previous bar. Then it takes a buy, opposite for sell. I have it start at 9am and trades until noon. My problem is, if the condition is true at 9am it takes a buy/sell, and then could go right against me. I would like to be able to have it wait for a new signal instead. Ie. if close of current bar is higher than close of previous bar, it "would" normally buy but I want it to wait until the opposite signal fires. Is there a way to do this via strat builder? I have tried a few different things to no avail.
Thanks in advance.Tags: None
-
Excuse me, but this is not a viable trading plan. I mean, technically of course you can set your strategy like that, but simple logic says that you cannot buy just because a bar closes higher than the previous. Prices fluctuate up and down all the time. You need to enter some more criteria in your strategy, because (as you write) a position opened this way “…then could go right against me” very easily and quickly.
That’s why strategy builder allows for many conditions to be set in a strategy.
-
Hello sprks7979,
To confirm, you are wanting a sequence of conditions to evaluate as true in a specific order?
This is possible to create with the Strategy Builder using bools. When the first condition is true, set the bool to true. In the second condition require the bool to be true, trigger the action and set the bool back to false.
Below is a link to an example.
Hi, To improve a strategy, I would like the condition to enter a trade to be triggered only after a second crossing happens. Meaning, for instance we have a sthocastics crossing, but the strategy would only trigger when a crossing between 2 emas happen. Would the looking back N bars work? Can it be done within the builderChelsea B.NinjaTrader Customer Service
Comment
-
@KonstantinosNT - yes, I understand that is not a usable plan. I did say "uses price change as ONE of the indicators" I made the example easy for simplicity sakes.
@NinjaTrader_ChelseaB - Thank you, I am using a bool to do this, my issue is that if the "trigger" happens at 8:58 and at 9:00 it is still true, then it takes a trade. I am wanting it to wait until the next valid trade before entering. Would this need to be done using multiple condition tabs? This is a rough idea of what I currently have.
Tab one - if X is true
and Y is True
and bool is set to True
then buy and set bool to False
Tab Two - if X is true
and Y is True
and bool is set to False
then buy and set bool to True
My other issue is that as it is written, as soon as the strategy opens it IMMEDIATELY takes a buy position no matter if true or false.
In summary, I am looking for a way to delay the first entry until the next valid signal and be able to take entries in either direction.
Thanks for your time.
Comment
-
Hello sprks7979,
my issue is that if the "trigger" happens at 8:58 and at 9:00 it is still true, then it takes a trade. I am wanting it to wait until the next valid trade before entering.
If the conditions to enter a trade with an entry order evaluate as true, and the bool is true, how is that not a valid signal? What makes it invalid?
Are you requiring the bool variable to be true in the condition that submits the entry order?
Are you wanting two valid entry signals? (You can use two bools if you need two valid entry signals to occur)
Would this need to be done using multiple condition tabs?
My other issue is that as it is written, as soon as the strategy opens it IMMEDIATELY takes a buy position no matter if true or false.
Have you used prints to understand the behavior?
https://ninjatrader.com/support/foru...121#post791121Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by benmarkal, Yesterday, 12:52 PM
|
3 responses
23 views
0 likes
|
Last Post Today, 05:22 AM | ||
Started by helpwanted, Today, 03:06 AM
|
1 response
19 views
0 likes
|
Last Post Today, 03:35 AM | ||
Started by Brevo, Today, 01:45 AM
|
0 responses
11 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
244 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
9 responses
388 views
1 like
|
Last Post
by Gavini
Today, 12:29 AM
|
Comment