Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

HELP with cross over and multiple entries strategy

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

    HELP with cross over and multiple entries strategy

    I am having a heck of a time or maybe im just missing something in the strategy builder but i cannot get my strategy to work right. the basis for it is as such: the data series is a 8/2 unirenko chart. i am trying to have the strategy buy a first entry "A" when price crosses above the 233 EMA i would than want a second entry when the third bar above the 233 EMA cross happens entry "B" and so on i would also like profits to be taken as new entries are entered but i can work on stops and profits my issue is that no matter what i place into the strategy builder the strategy only buys when price first crosses the 233EMA it will not perform a second long entry on the third bar or any bars after that above the 233EMA cross i am lost at this point and need some help i would prefer to have first entry on the 233ema cross second entry on the third bar, third entry on the 4th bar, fourth entry on the 5th bar and so on and the system would take profits on previous entries and new entries and bars are formed more or less a trend seeking scalper system but again i cannot figure out how to have the system buy anything past the first bar cross on the 233ema

    thank you!!!

    #2
    Hello cybertrontrader,

    Are you trying to submit multiple entries into a position?

    If so, do you have unique signal names and EntryHandling set to UniqueEntries or have EntriesPerDirection set to the total number of orders in that direction?

    If you have not enabled TraceOrders, enable TraceOrders.

    If you have have enabled TraceOrders, are you getting messages that orders are being ignored or cancelled?

    Add prints (to a condition set with no conditions) that prints the time of the bar and all values used in the condition set that places orders to see if that condition is evaluating as true.

    Below is a link to a forum post that demonstrates using prints to understand behavior. Please watch the video 'Debugging using prints with the Strategy Builder'.


    Save the output to a text file and included this with your next post. I am happy to assist with analyzing the output from TraceOrders and prints.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      so i do have unique entries and entry handling set correct my main issue is i cannot get the strategy builder to buy on the lets say 3rd bar above the cross of the EMA line (cyan dotted line) in the 8/2 renko. that is what i need help with whenever i do a cross above it buys on the first bar that closes above which is ok but it will not buy on any bars after than even if i cnage the looks back or bars ago. i believe i am doing something wrong. I did try to set a higher high but the issue with that is the higher high keep working and if i set it to buy on the third higher high it will also than submit a long order on the 6th higher high and the 9th higher high and so on because the parameters are set at a 3rd higher high.

      what i am trying to accomplish is to buy on the cross above or sell short on the cross below than to scale in and buy lets say on the 3rd bar from the cross above or sell short on the 3rd bar from the cross below again to buy on lets say the 5th bar on the cross above or sell short on the 5th bar form the cross below. maybe im missing something or just not using the strategy builder correctly. the greater than option will buy and any bars that are long and higher im trying to pin this down to soley the cross of the EMA i do not want to buy in a higher uptrend which is what a higher high or a greater than does

      so my question is how do i have entries on bar 3 bar 5 bar 7 etc from the cross above or below that EMA (cyan dotted line)

      thank you very much for all your help and time!!!

      Comment


        #4
        Hello cybertrontrader,

        You want to count the number of bars after a cross occurs?

        Add two Int custom series to use as counters, one to always be counting the current bar (so an offset can be used) and one to count bars after the cross . When the cross occurs set the custom counter to the current bar value to store it. On each new bar set the value to the previous bars value of that series (to carry it forward). Use an offset to subtract the custom series from the current bar series to get a number of bars between the current bar and the bar the cross occurred on. Compare this to an integer representing a number of bars.

        Attached is an example.
        Attached Files
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gentlebenthebear, Today, 01:30 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Aviram Y, Today, 05:29 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by cls71, Today, 04:45 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by TradeForge, Today, 02:09 AM
        1 response
        22 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by elirion, Today, 01:36 AM
        2 responses
        14 views
        0 likes
        Last Post elirion
        by elirion
         
        Working...
        X