![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Mar 2012
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
|
Hello all,
I would like to program a Strategy so it makes at minimum of say 20 ticks a day. Say that my StopLoss is 10 ticks and my ProfitTarget is 20 ticks. I could see 3 main scenarios: 1. 1st trade wins 20 ticks and strategy stops running ( gets disabled? ) 2. 1st trade looses 10 ticks. 2nd trade wins 20 ticks. 3rd trade wins 20 ticks - I have a profit of 30 ticks and strategy stops running 3. Likewise I would like to limit my losses. Eg in case I have 3 consecutive losses of say 30 ticks total, the strategy stops running. So I need a variable to cummulate my losses and my profit and when it reaches certain amount I want strategy to get disabled. Any thoughts? M |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
|
mal1954, you can check into this example - http://www.ninjatrader.com/support/f...ead.php?t=4084
It deals with using the Performance class available in our NinjaScript to halt a strategy once certain PnL levels for the session are hit.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Program CLOSING a trade after PROFIT/LOSS of 10 ticks obtained | mal1954 | Automated Trading | 1 | 05-14-2012 10:26 AM |
| Please: Ruler Draw Object to include number of Ticks | Turtle Trader | Suggestions And Feedback | 1 | 01-12-2011 08:58 AM |
| Volume chart with number of ticks per bar | jim380 | Charting | 3 | 10-27-2010 07:35 AM |
| Number of ticks up and down in a bar. | xTrader1 | Version 7 Beta General Questions & Bug Reports | 3 | 07-20-2010 05:16 AM |
| Number of ticks... | justme | Suggestions And Feedback | 5 | 03-09-2008 11:27 PM |