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
Single trade in one direction
Collapse
X
-
Single trade in one direction
Hello: The below attached strategy places the order when bar changes color and on close of the bar. Is it possible in Strategy builder to place only one order, 1st order on change of candle color till next color change. Currently, it keeps placing orders based on current color till next color change. Please see attached picture of the chart . Thanks,Tags: None
-
Hello mtamaku,
Thanks for your post.
Please note that we have moved your thread to the Ninjatrader 8 Strategy Development forum as that is a more appropriate forum for this topic.
Yes, you can create a "flip-flop" type condition where you would place one trade, flip the state of a bool and then place a trade in the opposite direction (in conjunction with your conditions) and continue the flip-flop process. I've created and attached an example strategy builder strategy you can download, install, and test. It places no trades and colors the background when the conditions change. The conditions in this example are of an EMA crossing above or below an SMA.
ExampleFlipFlop.zip
To Import
Download the zip file to your desktop, keep them in the compressed .zip file.
From the Control Center window select the menu File> Utilities> Import NinjaScript
Select the downloaded .zip file
NinjaTrader will then confirm if the import has been successful.
Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'
Paul H.NinjaTrader Customer Service
- Likes 1
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by RaygunWizzle, Yesterday, 08:52 PM
|
3 responses
11 views
0 likes
|
Last Post Today, 02:50 PM | ||
Started by Tim-c, Today, 08:36 AM
|
4 responses
13 views
0 likes
|
Last Post Today, 02:45 PM | ||
Started by JohnS52, 03-22-2024, 08:06 AM
|
4 responses
28 views
0 likes
|
Last Post
by JohnS52
Today, 02:30 PM
|
||
Started by carnitron, 03-25-2024, 01:59 PM
|
11 responses
52 views
0 likes
|
Last Post
by carnitron
Today, 02:18 PM
|
||
Started by Gerik, 12-21-2023, 08:20 AM
|
15 responses
203 views
0 likes
|
Last Post
by Mindset
Today, 02:06 PM
|
Comment