Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Looking for a boolean trading system
Collapse
X
-
Looking for a boolean trading system
Hey guys does anyone have a boolean trading system not INDICATOR that they have created and are willing to post it here. I am having a super hard time coding my first boolean system. So what I am thinking is, I should use someone else's system and in the condition box just put in my code instead of yours. -
Hello wallsteetking,
Thank you for your post.
While I do not have or know of a boolean based trading system off-hand I can assist you here with your strategy. Can you give me an example of how you intend to use the booleans in your strategy? And/or are you looking for a better understanding of them first before implementing them?
I look forward to your response.
-
How do you mean "boolean trading sytem"? Are not all automated trading systems boolean? At its simplest,Originally posted by wallsteetking View PostHey guys does anyone have a boolean trading system not INDICATOR that they have created and are willing to post it here. I am having a super hard time coding my first boolean system. So what I am thinking is, I should use someone else's system and in the condition box just put in my code instead of yours.
No?Code:if (EnterConditionMet) EnterTrade; if (ExitConditionMet) ExitTrade;
Comment
-
You might find what he seeks here:Originally posted by koganam View PostHow do you mean "boolean trading sytem"? Are not all automated trading systems boolean? At its simplest,
No?Code:if (EnterConditionMet) EnterTrade; if (ExitConditionMet) ExitTrade;
Comment
-
I am trying to make this strategy work.
(http://www.ninjatrader.com/support/f...043#post339043)
when two conditions are met that it takes a long. but my coding skills are horrible. I have attached the file that i am working on. But its not working correctly because it does not take a long when both the red and blue triangles are on the SAME bar.Attached Files
Comment
-
-
Hello wallsteetking,
Thank you for your response.
I have tested your strategy and it actually takes positions as expected. However, there are two items to take into consideration:
First is that if the strategy is set the EntriesPerDirection = 1 then you will only see one entry per direction. Apply your strategy to your chart (for now ignore the triangles) > then right click in your chart > select Strategy Performance > MARSHALL > Historical Performance > Executions tab > then take a look at the most recent execution, it should be a buy that occurred earlier on your chart.
The second item is the triangles, you have both set to the following tag: "My triangle up" + CurrentBar
This will always be the same for both, please try the following to see both triangles at the same time:
For information on EntriesPerDirection please visit the following link: http://www.ninjatrader.com/support/h...rdirection.htmCode:// Strategy 1 if (Bars.BarsSinceSession >=7) if (Stochastics(7, 14, 3).D[0] >= 30) { enterLongStrat1 = true; // enterLongStrat2 = false; [B]DrawTriangleUp("My triangle up red" + CurrentBar, true, 0, High[0] + 20 * TickSize, Color.Red);[/B] } //Strategy 2 if (Bars.BarsSinceSession >=7) if (Close[0] >= EMA(30)[0]) { enterLongStrat2 = true; // enterLongStrat1 = false; [B]DrawTriangleUp("My triangle up blue" + CurrentBar, true, 0, High[0] + 30 * TickSize, Color.Blue);[/B] }
Please let me know if you have any questions.
Comment
-
-
If my indicator has already the conditions to go long/short
How do you apply these 2 conditions (already declared as variables in the indicator code) using the strategy builder to go long or short:
private BoolSeries upDeviceSeries;
private BoolSeries downDeviceSeries;
I was using the strategy builder but I got stuck in the "conditions and actions > condition builder" section.
Thanks for your help,
Alan
Comment
-
Futuros,
You would need to create these as public BoolSeries so that those values can be accessed outside of the indicator.
Edit: Only plots will show up in the Strategy Wizard. BoolSeries will need to be accessed directly using manual code.Last edited by NinjaTrader_CalH; 08-15-2014, 02:58 PM.Cal H.NinjaTrader Customer Service
Comment
-
They already are public BoolSeries:Originally posted by NinjaTrader_Cal View PostFuturos,
You would need to create these as public BoolSeries so that those values can be accessed outside of the indicator.
"Finally, if anyone might want to use this in a strategy, I also put the device signals in a publicly accessible boolean series. Use UpDeviceSeries and DownDeviceSeries."
Comment
-
-
Futuros,
I do not have a sample for a strategy available for this.
I do have one available for the indicator and how they are created inside the script-
http://www.ninjatrader.com/support/f...ead.php?t=7299Cal H.NinjaTrader Customer Service
Comment
-
Thanks, but I already have the indicator which I want to turn into a trading system...Originally posted by NinjaTrader_Cal View PostFuturos,
I do not have a sample for a strategy available for this.
I do have one available for the indicator and how they are created inside the script-
http://www.ninjatrader.com/support/f...ead.php?t=7299
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
58 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
39 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
19 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
21 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
51 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment