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 bortz, 11-06-2023, 08:04 AM
|
47 responses
1,606 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
8 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
4 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
13 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment