NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 04-06-2008, 11:29 PM   #1
Elliott Wave
Senior Member
 
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
Question DrawText (PnL) on trade exit?

I'm wondering how I can most easily draw the profit/loss of a trade on the chart upon exiting?

Using the strategy wizard I'm finding it harder than I expected.

If the DrawText action had the ability to select a data source as an input, i.e. (...) + Unrealized PnL it would be easy, but that causes an error which could be because only strings are allowed in this field.

I also thought of creating a string variable and setting it to "Unrealized PnL" prior to closing the position, but I couldn't do that either. It seems rather limiting in my opinion to define variables at the start of a strategy if they can't be changed in response to conditions...

Any ideas?
Last edited by Elliott Wave; 04-06-2008 at 11:32 PM.
Elliott Wave is offline  
Reply With Quote
Old 04-07-2008, 07:17 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Default

I think that this might be difficult with the Wizard. At first thought, I can't think of a way to accomplish this.
NinjaTrader_Ray is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DrawText API doc? mazachan General Programming 1 03-04-2008 03:12 PM
DrawText Mike Winfrey General Programming 1 12-21-2007 04:57 PM
Handling of Exit Long and Exit Short before EOD Trader Rob Strategy Development 3 10-22-2007 02:13 PM
DrawText, DrawLine, etc... funk101 Indicator Development 2 05-27-2007 01:13 PM
Can not get DrawText to work (NT6) RedDuke General Programming 7 05-13-2007 06:10 PM


All times are GMT -6. The time now is 05:20 AM.