• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Streak and Stop Loss

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

    Streak and Stop Loss

    Good Morning,

    I'm trying to break losing streak in my strategy.

    I'm using the strategy builder as my programming knowledge are not good enough to do it.

    I would like your help with the following:

    1) I would like to add a condition using a variable that is 0 if the previous trade was a winner and 1 is it was a loser. If the Streak Variable = 0 it places an order, if Streak Variable = 1 it does not place an order but if It would do it the trade end as a winner and it makes the Streak Variable = 0 and it will be taken the next trade.
    I'm struggling to get it to work. I need the condition to make the variable 0 or 1, also I need this variable to change to 0 even when it does not take the trade.
    Can you please tell me how to do it?

    2) Also, I'm trying to set a stop loss that is a % of my current account value. For example, Stop loss = 3% of Account Value.

    Thank you in advance for all your help.
    Regards
    Carlos

    #2
    Hello Carlos,

    Thanks for your post.

    I do not think that you can accomplish your first objective within the strategy builder but would suggest that this would involve at best an elaborate use of bool variables to control the sequencing. They key objective of "if Streak Variable = 1 it does not place an order but if It would do it the trade end as a winner and it makes the Streak Variable = 0" would likely be the stumbling block as you would have to guess at the entry/exit and/or perform math on variables which is not available in the strategy builder.

    For #2, you would not be able to set this automatically in the strategy builder as the account value is not available.

    Please note that we do not provide programming services. We can leave this thread open for others in the community that may wish to provide this level of assistance.

    Alternatively, you may want to hire a 3rd party programmer who would be able to create a strategy to meet your needs (although not in strategy builder form). If this is of interest we can provide a link to a developers site in the Ninjatrader ecosystem.

    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by linuxguru, Today, 06:02 PM
    0 responses
    5 views
    0 likes
    Last Post linuxguru  
    Started by kokobeef, Today, 06:00 PM
    0 responses
    3 views
    0 likes
    Last Post kokobeef  
    Started by Bionian, Today, 03:07 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by JakeOfSpades, Today, 03:05 PM
    2 responses
    13 views
    0 likes
    Last Post JakeOfSpades  
    Started by aligator, Today, 01:49 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X