NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support

Miscellaneous Support Miscellaneous support issues.

Reply
 
Thread Tools Display Modes
Old 09-23-2008, 06:13 AM   #1
dedomraz
Junior Member
 
Join Date: Sep 2008
Posts: 26
Thanks: 7
Thanked 0 times in 0 posts
Exclamation problems wit realized PnL

hello everybody

i have 2 simple problems

im developing a simple strategy by using condition builder

i have one question

Can i use to define my profite target by function strategy Realized Pnl
f.e: when i set "realized Pnl to numerical value 300" i expect profit target at 300 $ ( I want set up my profit target and stop loss in "edit strategy>set stop an targets)

2. problem

I have simple strategy EMA CROSSOVER and I have 2 conditions Enter Long ... and Enter short..., I defined profit target and SL, but always my entry conditions get me out of the trade before my profit target is reached

...to remind: im using strategy wizard - conditions builder.

thanks
dedomraz is offline  
Reply With Quote
Old 09-23-2008, 06:22 AM   #2
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,


1- yes, you can do thiss by selecting Strategy then Realized PnL on the left and side of the conidtion and Misc. then Numeric value on the right side of the condition.

2- I do not know why this is happening to you. Check the value you are using to place the targets. Maybe post a screen shot of the conditions and the targets etc. and I will check to see if there is something wrong.

To send a screenshot, click CTRL + PRINT SCREEN. Then, open up Paint from Start > Accessories > Paint. Paste into the Paint program by clicking CTRL + V. Lastly, save as a jpeg file.

Screen shot Windows XP

- Highlight the window you want to take a screenshot of

- Then press ALT+Prnt Scrn


NinjaTrader_Ben is offline  
Reply With Quote
Old 09-23-2008, 07:08 AM   #3
dedomraz
Junior Member
 
Join Date: Sep 2008
Posts: 26
Thanks: 7
Thanked 0 times in 0 posts
Default thanks BUT

So thanks for promt reply... but...

1. first solution doesnt work. When i set "realized pnl" to "numeric value" ninja trader doesnt close a trade whe the condition is accomplished


2. Ok so

i have 2 conditions:

1. if ema 9 cross above ema 18 ; enter long (signal name Buy)
2. if ema 9 cross below ema 18 ;enter long ( signal name Sell)

i set profit target 5% ( for Sell ) ; profit target 5% ( for Buy)
stop loss 2% ( for Sell) ; stop loss 2% ( for Buy)

So my system always revers when EMA 9 cross EMA 18 vice versa. I want to keep my position open until my profit target is reached. What im doing wrong
Attached Images
File Type: gif 2.png (85.1 KB, 14 views)
Last edited by dedomraz; 09-23-2008 at 07:26 AM.
dedomraz is offline  
Reply With Quote
Old 09-23-2008, 07:53 AM   #4
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

1- I noticed in your CumProfit condition that you are using "==". Try using ">".

2- This is because you cannot be both long and short within the same market. I.e. you cannot have an open long and an open short position at the same time. One will cancel the other.
NinjaTrader_Ben is offline  
Reply With Quote
Old 09-23-2008, 08:04 AM   #5
dedomraz
Junior Member
 
Join Date: Sep 2008
Posts: 26
Thanks: 7
Thanked 0 times in 0 posts
Smile ok so,

1. when i try operator >(is greater) problem is still not resolved


2.
Ok i understand, but, when i go long and i set my profit target as sonn as emas cross but, my profit profit target is not reached. I dont wanna reverse my position immadiately
dedomraz is offline  
Reply With Quote
Old 09-23-2008, 09:00 AM   #6
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

1- What are you using to determine your PnL and come to the conclusion that it is not working?

2- You cannot keep the existing order open and open another order in the opposite direction. To do this you will need to run two different strategies. Or you can hold the second order off by using a market postion == flat condition. You will find this under the Strategy category.
NinjaTrader_Ben is offline  
Reply With Quote
Old 09-23-2008, 09:31 AM   #7
dedomraz
Junior Member
 
Join Date: Sep 2008
Posts: 26
Thanks: 7
Thanked 0 times in 0 posts
Smile here is it

Thanks for reply!!

OK so i explain

Im developing simple strategy wehere

if EMA 62 > EMA 200; stoch 9,3,3 crosses above 30 enterlong( namesignal Nakup)-(entry conditions and actions in tab "set1" )

i will close trade ad PnL 100 ( 100 currency) so

in tab set2 i set realizedPnL = 100;exit short ( namesignal Nakup)

In options i set 10 000 USD acoount.

my idea: Close trade if Pnl of every trade is 100 ($) ( FDAX 09-08)

in attach is strategy
Attached Files
File Type: cs CCIMA.cs (23.5 KB, 3 views)
dedomraz is offline  
Reply With Quote
Old 09-23-2008, 09:47 AM   #8
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

Realized PnL is the PnL you have realized so it will be the profit or loss that has been closed and realized. Open orders are not included in this.

What PnL are you looking at to tell you that this does not work?
NinjaTrader_Ben is offline  
Reply With Quote
Old 09-23-2008, 10:01 AM   #9
dedomraz
Junior Member
 
Join Date: Sep 2008
Posts: 26
Thanks: 7
Thanked 0 times in 0 posts
Default so

oh... i dont understand

i want close my position when Pnl of position is 100 USD.

So what exactly mean "realizedPnL"???
dedomraz is offline  
Reply With Quote
Old 09-23-2008, 10:11 AM   #10
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Realized PnL means PnL you have already cashed out with. You want to use Unrealized PnL or PnL that has not been solidified.
NinjaTrader_Josh 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
Realized Profit Issues While In Trade mjuviler Strategy Development 36 08-07-2008 10:55 PM
No Money in unrealized or realized for Forex jlm0@infionline.net Historical NinjaTrader 6.5 Beta Threads 5 11-12-2007 10:35 AM
No money going in Realized P&L when trade closes jlm0@infionline.net Historical NinjaTrader 6.5 Beta Threads 12 11-12-2007 07:01 AM
realized profit rally7 Miscellaneous Support 9 07-28-2007 11:39 PM
Realized P&L ctgiblin Miscellaneous Support 5 03-08-2006 05:43 AM


All times are GMT -6. The time now is 03:36 AM.