NexusFi: Find Your Edge


Home Menu

 





Help programming strategy


Discussion in NinjaTrader

Updated
    1. trending_up 1,548 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 2 attachments




 
Search this Thread
  #1 (permalink)
 sburtt 
London, UK
 
Experience: Advanced
Platform: NinjaTrader
Trading: EUR/USD
Posts: 58 since Jul 2012
Thanks Given: 3
Thanks Received: 4

Hi Guys,

I was hoping somebody can help me out with a problem I have. I've attached a simple strategy (MovingAverageSimpleCrossOver.cs) that enters/exits position on a moving average cross over. What I would like is to use the SuperTrend Indicator as a trailing stoploss (I've attached the indicator in case you dont have it) .

The problem I have is that not always the trailings stoploss is in the correct direction. In fact the SuperTrend indicator is programmed to flip from long to short only when the close crosses below/above the indicator, that is not 100% in Sync with my entry strategy. I will all be more clear if you try to run the strategy on your pc.

Would anybody be able to spend some time to re-program the indicator in order for the SuperTrend Indicator to start only when the strategy enters a position?

Thanks for your time


Attached Files
Elite Membership required to download: MovingAverageSimpleCrossOver.cs
Elite Membership required to download: SuperTrendU11.zip
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Thursday May 28: GDP + Core PCE + Jobless Claims All at …
Traders Hideout
Beijing Summit Closes: Xi Pledges Hormuz Help -- $1.14B …
Prediction Markets & Event Contracts
April CPI Preview: +3.7% YoY Expected at 8:30 AM ET -- C …
Traders Hideout
Probability Collapse: Bitcoin $150k Craters from 15% to …
Prediction Markets & Event Contracts
SEC Chairman Calls for New Golden Age of SEC-CFTC Regula …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 sburtt 
London, UK
 
Experience: Advanced
Platform: NinjaTrader
Trading: EUR/USD
Posts: 58 since Jul 2012
Thanks Given: 3
Thanks Received: 4


can somebody please give me a hint on how to program the SuperTrend as a stoploss that is calculated only on entry and in the right direction to protect the trade? This would be very useful for many, as the indicator is much better than the traditional ATR trailing stop

thanks,


Started this thread Reply With Quote




Last Updated on November 20, 2012


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts