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.
-
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.
Code:if (EnterConditionMet) EnterTrade; if (ExitConditionMet) ExitTrade;
Comment
-
Originally posted by koganam View PostHow do you mean "boolean trading sytem"? Are not all automated trading systems boolean? At its simplest,
Code:if (EnterConditionMet) EnterTrade; if (ExitConditionMet) ExitTrade;
hey guys I need some help with my code. What I want to do is create a long entry when two of my systems both fire a long on the same bar. what i did is i created a boolean and put both of my strategies into one strategy called Mashall. however when i write the code, and run it.. does not work for some reason. can someone please help me decipher why this does not work. /// /// Enter the description of your strategy here /// [Description("Enter the description of your strategy here")] …
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:
Code:// 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
-
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
-
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 WHICKED, Today, 12:56 PM
|
1 response
8 views
0 likes
|
Last Post Today, 01:17 PM | ||
Started by cre8able, Today, 01:16 PM
|
0 responses
1 view
0 likes
|
Last Post
by cre8able
Today, 01:16 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
2 responses
47 views
0 likes
|
Last Post
by chbruno
Today, 01:15 PM
|
||
Started by WHICKED, Today, 12:45 PM
|
1 response
11 views
0 likes
|
Last Post Today, 01:08 PM | ||
Started by samish18, Today, 01:01 PM
|
0 responses
5 views
0 likes
|
Last Post
by samish18
Today, 01:01 PM
|
Comment