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

Crosses Over doesn't work

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

    Crosses Over doesn't work

    I must be stupid be I cannot get even a simple strategy to work correctly.

    I have the properties to set to calculate on 'price change'. I simply want to enter long as soon as the price of the current candle breaks the high off the previous candle.

    If I set the condition to 'high/ask/close' of period 0 'crosses above' the high of period 1, then the strategy produces 0 results. So I must be doing something wrong.

    I can get some results if I set the condition to 'high' of period 0 is 'greater than' the 'high' of period 1. But I assume this will constantly trigger a trade every time the price changes and this isn't correct.

    I only want the trade to trigger once the high is broken once. I don't want it to keep triggering. I'm unsure what to do.


    #2
    I can answer my own question.

    I found a forum post that suggest to use a variable to check if the entry bar was the same as a the currentBar to make sure the trade isn't triggered multiple times.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by jaybedreamin, Today, 01:08 PM
    0 responses
    2 views
    0 likes
    Last Post jaybedreamin  
    Started by Rheiverson, 07-18-2024, 04:28 PM
    2 responses
    18 views
    0 likes
    Last Post Rheiverson  
    Started by p1kn1t, Today, 11:32 AM
    0 responses
    7 views
    0 likes
    Last Post p1kn1t
    by p1kn1t
     
    Started by Bob-Habanai, Today, 10:27 AM
    0 responses
    10 views
    0 likes
    Last Post Bob-Habanai  
    Started by bortz, 11-06-2023, 08:04 AM
    57 responses
    2,762 views
    0 likes
    Last Post bortz
    by bortz
     
    Working...
    X