Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Builder - Using a Buy/Sell indicator
Collapse
X
-
Originally posted by marco231 View Post
-
Originally posted by bnoisette View Post
Thx for taking a look and pointing me in the right direction
Leave a comment:
-
Here is what I have for the short section. On the longs it will still take trades without the print that is why I have it commented out here. The long is exactly the same except labeled "Buy"
// Set 2
if ((VolumeBasedBuySellSignals1.SellSignal[0] != 0)
//&& (Close[0] <= Close[1])
//&& ((BarsSinceExitExecution() > 3)
//|| (BarsSinceExitExecution() == -1)
&& (Position.MarketPosition == MarketPosition.Flat))
{
//Print(@"VolumeBasedBuySellSignals1.SellSignal[0]:" + Convert.ToString(VolumeBasedBuySellSignals1.SellSi gnal[0]));
}
{
EnterShort(1, @"ShortCTP");
EnterShort(1, @"ShortCTR");
Leave a comment:
-
Here is what I have for the short section. On the longs it will still take trades without the print that is why I have it commented out here. The long is exactly the same except labeled "Buy"
// Set 2
if ((VolumeBasedBuySellSignals1.SellSignal[0] != 0)
//&& (Close[0] <= Close[1])
//&& ((BarsSinceExitExecution() > 3)
//|| (BarsSinceExitExecution() == -1)
&& (Position.MarketPosition == MarketPosition.Flat))
{
//Print(@"VolumeBasedBuySellSignals1.SellSignal[0]:" + Convert.ToString(VolumeBasedBuySellSignals1.SellSi gnal[0]));
}
{
EnterShort(1, @"ShortCTP");
EnterShort(1, @"ShortCTR");
Leave a comment:
-
Originally posted by bnoisette View Post
Thx for taking a look and pointing me in the right direction
Leave a comment:
-
Originally posted by marco231 View PostI forgot to mention, if you run into little problems like this try painting the background for order execution and reviewing your order entry conditions and also open the data box to get an understanding of what the indicators are printing out (saves time from having to manually use the print function).
Leave a comment:
-
I forgot to mention, if you run into little problems like this try painting the background for order execution and reviewing your order entry conditions and also open the data box to get an understanding of what the indicators are printing out (saves time from having to manually use the print function).
- Likes 1
Leave a comment:
-
Originally posted by bnoisette View PostAlso the sell signal is committed out as I was trying to get the buy signal to work properly first.
The other thing I noticed was this condition && (BarsSinceExitExecution(0, "", 0) > 3), I commented it out to get it to take a trade. You need to refine what this is as I'm not sure what this is checking. I had it active and it didn't take any trades over 5 days 23 hours of the market open.
Anyway best of luck with your strategy, It looks like a great piece of work coming together !
Leave a comment:
-
Also the sell signal is committed out as I was trying to get the buy signal to work properly first.
Leave a comment:
-
Originally posted by marco231 View PostIf you can share the source code of your script + where I can download the indicator then I can review your code for you and give better guidance on why the issue is occuring.
Leave a comment:
-
If you can share the source code of your script + where I can download the indicator then I can review your code for you and give better guidance on why the issue is occuring.
Leave a comment:
-
Originally posted by bnoisette View Post
Yeah I have that. This is what I have tried and it is not working
if ((0 == VolumeBasedBuySellSignals1.BuySignal[1])
&& (BarsSinceExitExecution(0, "", 0) > 3)
&& (Position.MarketPosition == MarketPosition.Flat))
{
Print(@"VolumeBasedBuySellSignals.BuySignal[0]:" + Convert.ToString(VolumeBasedBuySellSignals1.BuySig nal[0]));
Leave a comment:
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by litamm89, 03-12-2025, 10:26 AM
|
5 responses
22 views
0 likes
|
Last Post
![]()
by litamm89
Today, 07:40 PM
|
||
Started by Artorias, Today, 02:16 PM
|
5 responses
19 views
0 likes
|
Last Post
![]()
by rockmanx00
Today, 07:09 PM
|
||
Started by amichalska, Today, 06:52 PM
|
0 responses
8 views
0 likes
|
Last Post
![]()
by amichalska
Today, 06:52 PM
|
||
Started by samish18, Today, 06:05 PM
|
0 responses
6 views
0 likes
|
Last Post
![]()
by samish18
Today, 06:05 PM
|
||
Started by phil62, Today, 05:34 PM
|
0 responses
5 views
0 likes
|
Last Post
![]()
by phil62
Today, 05:34 PM
|
Leave a comment: