• 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

Exit Positions

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

    Exit Positions

    Hi:

    I am trying to learn how to set exits in end of day trading systems as a beginner.
    For e.g. in the SimpleMACrossover example

    1. Can you share some code to set an ATR stop?

    2. If wish to sell half of my position after reaching 10% profitTarget

    3. Can you explain the CalculationMode.Ticks parameter for setting the StopLoss and SetProfitTarget functions? Whats the difference from Mode-Percent and Price.

    4. Will Setting StopLoss and ProfitTarget, I also wish to sell if the MA system reverses i.e. generates a short (For previous long) etc.

    #2
    lovec,

    1. Can you share some code to set an ATR stop?

    How do you want to define this stop? Generally you just call SetStopLoss like follows : http://www.ninjatrader.com/support/h...etstoploss.htm

    2. If wish to sell half of my position after reaching 10% profitTarget

    This would be up to your strategy to track. Here are some reference samples.

    http://www.ninjatrader.com/support/f...ead.php?t=5790

    http://www.ninjatrader.com/support/f...ead.php?t=3751

    3. Can you explain the CalculationMode.Ticks parameter for setting the StopLoss and SetProfitTarget functions? Whats the difference from Mode-Percent and Price.

    CalculationMode.Ticks makes it so the stop loss can be specified in ticks as units. Percent is a percentage of the entrance price, and price is a static price value. They are just different ways to calculate the stop loss.

    4. Will Setting StopLoss and ProfitTarget, I also wish to sell if the MA system reverses i.e. generates a short (For previous long) etc.

    You can use ExitLong() or ExitShort() for this purpose.

    http://www.ninjatrader.com/support/h...l?exitlong.htm

    http://www.ninjatrader.com/support/h...?exitshort.htm
    Adam P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by markus3500, Today, 03:29 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by bohenriksen, Today, 04:00 AM
    1 response
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by brett0, Today, 12:33 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Melissa  
    Started by lordvader34, Today, 11:12 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by tausifkhan, Today, 05:18 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X