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 cmv727, Today, 05:38 AM
    0 responses
    12 views
    0 likes
    Last Post cmv727
    by cmv727
     
    Started by AlessioCianini12, Today, 01:38 AM
    0 responses
    33 views
    0 likes
    Last Post AlessioCianini12  
    Started by nandhumca, Yesterday, 11:54 PM
    0 responses
    29 views
    0 likes
    Last Post nandhumca  
    Started by nandhumca, Yesterday, 11:51 PM
    0 responses
    28 views
    0 likes
    Last Post nandhumca  
    Started by ezrollin, Yesterday, 11:48 PM
    2 responses
    31 views
    0 likes
    Last Post ezrollin  
    Working...
    X