![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2008
Posts: 310
Thanks: 0
Thanked 0 times in 0 posts
|
Hi
I wrote a system and I'd like to apply a profit target, not a static one based on fixed nr of pips, but proportional to the ATR. To do so, after my conditions to enter/exit trades, I wrote: // Condition set 3 if (Close[0] > Position.AvgPrice * (1 + ATR(14)[0])) { ExitLong("TAKEPROFIT", " BUY"); } It doesn't work though, like if those lines were not present, the system trades regardless. What did I forget please? Any help greatly appreciated
|
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simulated stops and profit targets. | dtf139 | ATM Strategies (Discretionary Trading) | 3 | 03-11-2008 06:57 AM |
| Splitting Profit Targets | fifty2aces | Strategy Development | 1 | 10-10-2007 08:00 AM |
| Profit Targets & 'Exit on Close' | dgregor5 | General Programming | 2 | 07-15-2007 01:35 PM |
| Printing Current StopLoss & Profit Targets | Jim-Boulder | Strategy Analyzer | 1 | 06-25-2007 11:16 AM |
| Profit Targets in Strategy Wizard | gregw | Strategy Development | 3 | 01-24-2007 09:30 AM |