Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder - Using a Buy/Sell indicator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • bnoisette
    replied
    Originally posted by marco231 View Post

    I ended up reviewing my code and there was additional information , you need make sure your market position is flat as part of the condition you can do something like this , && (Position.MarketPosition == MarketPosition.Flat)) . So when you get a signal, it will check 1 are you in a trade (from a previous signal - if so do not open another trade), if you are flat and you get a signal then enter the trade.
    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:


  • marco231
    replied
    Originally posted by bnoisette View Post

    marco231 can you please share how you were able to get this to work? I use a similar indicator and I tried the print solution above and I get the same results.
    I ended up reviewing my code and there was additional information , you need make sure your market position is flat as part of the condition you can do something like this , && (Position.MarketPosition == MarketPosition.Flat)) . So when you get a signal, it will check 1 are you in a trade (from a previous signal - if so do not open another trade), if you are flat and you get a signal then enter the trade.

    Leave a comment:


  • marco231
    replied
    Make sure your logic is calculate on bar close, and try using other conditions. Like Close of previous candle must be below 50 EMA or SMA. or Only take shorts if price is under Vwap or take longs if above vwap.

    Leave a comment:


  • bnoisette
    replied
    Originally posted by marco231 View Post
    Awesome , thanks this works! and fires only when the candle prints a signal.

    Thank you so much.
    marco231 can you please share how you were able to get this to work? I use a similar indicator and I tried the print solution above and I get the same results.

    Leave a comment:


  • marco231
    replied
    Awesome , thanks this works! and fires only when the candle prints a signal.

    Thank you so much.

    Leave a comment:


  • NinjaTrader_Gaby
    replied
    Hello marco231,

    In the actions, under Misc > select Print. Click on "set" next to message, then you can set up your print statement.

    The attached screenshot demonstrates printing out the current value of a 14 period SMA. String 0 is a text label, and String 1 I have set to print out the value of the SMA.

    Please let me know if I can assist further.
    Attached Files

    Leave a comment:


  • marco231
    replied
    Hi Gaby,

    It is listed in the available list of indicators, see below the properties available. Its the smartchannels indicator

    Click image for larger version

Name:	image.png
Views:	512
Size:	21.3 KB
ID:	1296754

    How do I go ahead and print the plot values as for now I'm comparing this statement - numeric value =0 not equal indicator then go long (when the indicator has the plot as buy. This logic works when you set it up as an alert under the indicator and only fires off once. So when you get a sell signal like below, it would enter as a market order on the next candle. However in the strategy builder when using this logic the strategy continuously takes trades and can take 100 trades in a day. Where as the alert would only take the number of signals that was given.

    Click image for larger version

Name:	image.png
Views:	486
Size:	79.6 KB
ID:	1296755

    Let me know if you can assist.

    Leave a comment:


  • NinjaTrader_Gaby
    replied
    Hello marco231,

    Thank you for your inquiry.

    When you take a look at the list of indicators available within the Strategy Builder is that custom indicator listed? If so, try printing the plot values to see what it is exposing for data. If one of the plots is a signal, you would be able to use that for your logic.

    Otherwise, if there are no plots (it is not listed in the Strategy Builder) or the plots are not the right value you would not be able to accomplish this from the Strategy Builder. You cold reach out to the developer of the indicator about exposing the buy/sell signals as plot values.

    Please let me know if I can assist further.

    Leave a comment:


  • marco231
    started a topic Strategy Builder - Using a Buy/Sell indicator

    Strategy Builder - Using a Buy/Sell indicator

    Hi There,

    Not sure if this post exists, so sorry if it already has been asked.

    I'm wanting to know how to develop a strategy, using the strategy builder, to make an order based on a buy and sell indicator output.

    For example, I have this custom indicator that prints arrows to enter long or short based on breakouts or breakdowns. I've used the alert method within the indicator to fire a market order when the indicator displays on chart after bar close. The results are not great as the indicator is active all the time (I only want set hours) and also I would like to use limit orders with a tick offset and disappear after 3 or 4 bars have printed on any time frame.

    Is there a way to extract the indicator output and use this in the strategy builder to go long with limit order when the indicator prints buy or go short with limit order when the indicator prints sell.

    Any help would be appreciated.

    Thanks in Advance,

    Marco

Latest Posts

Collapse

Topics Statistics Last Post
Started by herzogvladimir2, Today, 08:10 PM
0 responses
6 views
0 likes
Last Post herzogvladimir2  
Started by giogio1, 04-13-2025, 01:42 AM
2 responses
35 views
0 likes
Last Post giogio1
by giogio1
 
Started by mmenigma, 01-23-2024, 09:37 AM
1 response
90 views
0 likes
Last Post Nin8aTrender  
Started by wbayne333, 02-22-2021, 01:18 PM
6 responses
410 views
0 likes
Last Post Nin8aTrender  
Started by gtheaded, 07-03-2020, 03:47 PM
3 responses
370 views
0 likes
Last Post Nin8aTrender  
Working...
X