Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Saving values from previous bars to execute the bwfractal strategy

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

    Saving values from previous bars to execute the bwfractal strategy

    I have a quick question about the question you addressed several months ago. What how should I go about saving a value for the bwfractal? My goal is to execute once the pivot is triggered but using the bwfractal indicator by itself wont suffice. Please see the comment below.



    Your condition is detecting that 3 bars ago the Upper Fractal had a value so you are placing a market order to go long 3 bars after the fractal. I think what you want is to save the value of the fractal into a variable as they are found and then in another set check to see if the price does crossabove (or crossed below) the variable to then place your entry order


    How do I save the value of the fractal into a variable as they are found and then in another set check to see if the price does crossabove (or crossed below) the variable to then place your entry order?
    Last edited by jwhite0hg9; 08-15-2021, 10:15 AM.

    #2
    Hello jwhite0hg9,

    Welcome to the NinjaTrader forums!

    I recommend giving this a try after watching the Strategy Builder 301 training video linked in the forum post below.


    In a unlocked script, the variable could be a double.

    For example:

    private double myDouble;

    myDouble = MyIndicator().IndicatorPlot[0]; // (this where the indicator value would be set to a value)

    if (CrossAbove(Close, myDouble, 1))
    {
    // cross above occurred
    }
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    89 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X