The only other way I handle generate a report of the ATM template. Also the template shows that it has a print statement? but where is it printing to? I would like to see per traded performance show in a box either on the chart or in separate window. It's not in the chart or data box.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Auto Strategy not traking profit/losses
Collapse
X
-
Auto Strategy not traking profit/losses
I am working or writing a strategy and I am using the SampleAtmStrategy as a baseline. I notice it is not showing execution markers and the strategy is not keeping track of performance. Does a strategy with an ATM not have the ability to keep track of the Pnl since it was handed off to an ATM? Is there a way around this? I would like to monitor the strategy/ATM on a continual basis as still have the ability to move stops/targets as the positon develops.
The only other way I handle generate a report of the ATM template. Also the template shows that it has a print statement? but where is it printing to? I would like to see per traded performance show in a box either on the chart or in separate window. It's not in the chart or data box.Tags: None
-
Hello jngrim,
Thanks for your post.
You cannot see the PnL on the same chart. If you open the SuperDom or another chart with the chart trader enabled then are you able to view the PnL.
If you are trying to track the PnL via NinjaScript then unfortunately the Atm strategy wont return the PnL values using the Performance class etc. However you can use the GetAtmStrategyUnrealizedProfitLoss or GetAtmStrategyRealizedProfitLoss to retrieve the PnL values. Please refer to our help guide to know more about it.- http://www.ninjatrader.com/support/h...izedprofit.htm
- http://www.ninjatrader.com/support/h...edprofitlo.htm
Are you referring to the Print function. If so then the values will be printed out in the Output Window (Tools>Output Window, in the Control Center).JoydeepNinjaTrader Customer Service
-
The Unrealized profit is already in the ATM I think
if (atmStrategyId.Length > 0)
{
// You can change the stop price
if (GetAtmStrategyMarketPosition(atmStrategyId) != MarketPosition.Flat)
AtmStrategyChangeStopTarget(0, Low[0] - 3 * TickSize, "STOP1", atmStrategyId);
// Print some information about the strategy to the output window
Print("The current ATM Strategy market position is: " + GetAtmStrategyMarketPosition(atmStrategyId));
Print("The current ATM Strategy position quantity is: " + GetAtmStrategyPositionQuantity(atmStrategyId));
Print("The current ATM Strategy average price is: " + GetAtmStrategyPositionAveragePrice(atmStrategyId)) ;
Print("The current ATM Strategy Unrealized PnL is: " + GetAtmStrategyUnrealizedProfitLoss(atmStrategyId)) ;
So I'm lost too
Comment
-
JoydeepNinjaTrader Customer Service
Comment
-
-
Hello Shadowshorter,
To assist you further can you please send a toy NinjaScript code* replicating the behavior to support[AT]ninjatrader[DOT]com
Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.
I look forward to assisting you further.
*The "toy" just means something that is a stripped down version that isn't necessarily the whole logic. It makes things easier to rout out.JoydeepNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by funk10101, Today, 09:43 PM
|
0 responses
3 views
0 likes
|
Last Post
by funk10101
Today, 09:43 PM
|
||
Started by pkefal, 04-11-2024, 07:39 AM
|
11 responses
36 views
0 likes
|
Last Post
by jeronymite
Today, 09:37 PM
|
||
Started by bill2023, Yesterday, 08:51 AM
|
8 responses
44 views
0 likes
|
Last Post
by bill2023
Today, 09:27 PM
|
||
Started by yertle, Today, 08:38 AM
|
6 responses
26 views
0 likes
|
Last Post
by ryjoga
Today, 09:17 PM
|
||
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
24 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
Comment