![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: May 2011
Posts: 17
Thanks: 0
Thanked 0 times in 0 posts
|
I would like to know how to program a strategy that adds to a position every X pips as long as the entry conditions are still valid and then moves the stoploss up by the same amount each time a new position is added.
Example: if(MA1 crosses MA2) if(MA1 > MA2) EnterLong(100000); Then I would like to add another position at that 1st long entry plus 20 pips and move the trade1 stop up to breakeven. So now I am long 2 lots and have one stop at an initial value and another stop at breakeven. This can continue until the positions are either stopped out or the max number of positions has been reached. This is asking a lot so any direction on where to start will be greatly appreciated. I am familiar with basic NinjaScript and have already written what I consider basic strategies. Cheers! |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding a trailing stop to open position. | billr | Automated Trading | 2 | 01-03-2011 10:17 AM |
| Adding to a Position? | whoslooking | Strategy Development | 5 | 11-01-2010 12:27 PM |
| Adding to Position in Strategy / Analyzer | webart | Strategy Analyzer | 2 | 04-14-2010 05:09 PM |
| Adding to a position | YoungOne | ATM Strategies (Discretionary Trading) | 12 | 08-22-2009 03:02 PM |
| Adding to a position | vandalrpm | General Programming | 2 | 04-09-2008 10:17 AM |