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

How to program an entry in long and short when a symbol appears!

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

    How to program an entry in long and short when a symbol appears!

    Hi everyone! I am programming a strategy on an indicator that I create myself, but I have a problem for the execution of its orders, and that is that the buy and sell orders are subject to the appearance of a symbol in the middle of the confirmation candle.

    I look for that when a symbol appears in any part of the body of the candle immediately or at least one or two ticks later, I make my entry into the market, but I still cannot place market orders at the moment that the symbol appears, such as saying price of market = symbol in question.

    I would like to know if someone here can help me with the logic that I should use, at least so that what I will show you next in an image happens, thank you very much.

    Attached Files

    #2
    Hello 8033075,

    From the description all that I could currently suggest would be that you run the script OnEachTick and then place the entry syntax within the symbol condition that you mentioned.

    If the entry is being submitted later than expected that would very likely be a situation where you will need to use Prints to better understand why that is happening when you run the script.

    So that we can better assist with your question on the forums you will likely need to provide more specific details here. For example a excerpt of the logic you are asking about so that we can get an idea of what code is being used and how it would execute when run.

    Because you are asking about a specific condition (symbol) you would likely need to provide more specifics. An example of the values from the bars/indicators used in your condition would help. Prints will also help with that and understanding why the condition was or was not true at a given time.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    21 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    10 views
    0 likes
    Last Post cre8able  
    Working...
    X