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

V formation

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

    V formation

    I'm trying to formulate a method of determining if price makes a valid 'V formation' for an automated strategy. I figured it would be easier to make this a working indicator first before I put it into an automated strategy.

    Basically I want the computer to be able to tell me if price forms a good shaped V or bad shaped V within a preset number of bars. It is fairly easy to see what a good shaped V looks like visually, but I have found it extremely difficult to define it and get a function/method to do this for me automatically because it is a bit subjective.

    My plan is to make it so that the method will only pick out really good looking (not perfect) V's. I'm not sure how to do this, so any suggestions (no matter how whacky) or solutions at all would be very helpful.

    I've attached a few examples of good and bad looking V's to give you an idea of what I mean.

    Below is description of why each one is a Good or Bad V formation.

    Good V1 - it runs up without too many reds and doesn't have too many bits poking out. And the bits don't poke out too far for most bars. The V is also fairly even on both sides with a similar number of bars, and similar slope. Good V's also have plenty of 'white space' in the middle.

    Good V2 - majority red on run down and majority green on run up. most bars don't jut out too much from the 'line of best fit' (line of best fit has not been drawn on, I've only drawn on measurements). Nice gradient down and nice similar gradient up.

    Good V3 - mostly green up, with a small hiccup in the middle, which is ok. and mostly red down. This V is not as perfect as the others but may still be acceptable. If it is easier to define a V without these 'OK' V's then I'm happy to leave this ones out.

    Bad V1 - not enough green bars up on the left side of the V and not much white space on the move up and the bars are a bit congested and about not really moving up, just long red and long green bar.

    Bad V2 - left side is justed completely congested. most bars are going sideways. They are long and aren't moving upwards, especially the bodies aren't going anywhere. Move up is made up of only a few long greens up. There is almost no white space at all in the middle.


    a few extra notes: I've included a scale on all of them to make it easier. All screenshots have been directly from Esignal chart of the emini S&P500.
    I have extra lines and indicators on the charts which I haven't completely removed, those can just be ignored. Some have price rulers to help in seeing the size of the moves.

    Anyway, I would greatly appreciate any help at all. Thanks!
    Attached Files

    #2
    bad V example

    Bad V3 - this another example of a badly formed V. The middle of the V is quite congested with short bodied, sideways moving bars. I want the bars to move straight down with a sharpish sort of point and then move straight back up or vice versa.
    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ScottWalsh, Today, 06:52 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ScottW, Today, 06:09 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ftsc2022, 10-25-2022, 12:03 PM
    5 responses
    256 views
    0 likes
    Last Post KeyonMatthews  
    Started by Board game geek, 10-29-2023, 12:00 PM
    14 responses
    244 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Waxavi, 04-19-2024, 02:10 AM
    4 responses
    56 views
    0 likes
    Last Post sonia0101  
    Working...
    X