Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Builder - Using a Buy/Sell indicator
Collapse
X
-
Hey do you mind sharing your smart channels strategyOriginally posted by marco231 View Post
-
ok Sorry to inquire again but can you check to see if you can get it to take sell orders. I can get it to take buys but it is not taking doing sell orders. I actually changed the code to this (VolumeBasedBuySellSignals1.SellSignal[0] != 0) for the buy signal as well and all it does it take buy orders.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:
-
ok Sorry to inquire again but can you check to see if you can get it to take sell orders. I can get it to take buys but it is not taking doing sell orders. I actually changed the code to this (VolumeBasedBuySellSignals1.SellSignal[0] != 0) for the buy signal as well and all it does it take buy orders.Originally posted by bnoisette View Post
Thx for taking a look and pointing me in the right direction
Leave a comment:
-
Thx for taking a look and pointing me in the right directionOriginally 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:
-
Thanks, I've managed to load your script and get it to take orders. The problem you had was that you are checking if the buy or sell signal =0 , when in actual fact it will never be 0 (it is always be NA or a number). The number it equals is the price the marker is created, see below image of highlighted green order circled in black, see the sell signal is NA in this instance. So the condition you need to check is (0 != VolumeBasedBuySellSignals1.BuySignal[1]).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:
-
Here you go. The indicator is there as wellOriginally 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:
-
is this a free indicator? the Volume Base Buy Sell Signals? It's hard to understand what is going on unless you share the code so that I can review and help you out. Otherwise we'll be doing a lot of back and forth here.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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
81 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
64 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
68 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
55 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Leave a comment: