Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Potential flaw in ATM methods
Collapse
X
-
Hello bosajin, thanks for your post.
GetAtmStrategyMarketPosition will report the current market position, so is the strategy closing the open position if this reports Long or Short? Did you add Print methods to the strategy to see why the exit method was called in this case? What conditions became true to enact the close position behavior?
I look forward to hearing from you.
Chris L.NinjaTrader Customer Service
-
Hello ChrisL
Thanks for swift reply.
the following code is being used to close ATM order.
Code:protected override void OnBarUpdate() { //in this case MaxProfit = 37 if(NetPnL > MaxProfit) { MyAtmStrategyClose(strategyId); } } double NetPnL { get { var realized = Account.Get(AccountItem.RealizedProfitLoss, Currency.UsDollar); var unrealized = PositionAccount.GetUnrealizedProfitLoss(Performanc eUnit.Currency); var result = realized + unrealized ; return result; } }
Comment
-
Hello,
This is Jim, responding on behalf of Chris who is out of the office at this time.
I tried setting this up in a test strategy, but I have been unable to reproduce. Could you test my strategy and modify it as needed so I can reproduce the issue? If there are any specific steps I should be taking or if the ATM strategy that is used makes a difference, please let me know.
Below is a demonstration showing how I have tested.
Demo - https://drive.google.com/file/d/1yNn...w?usp=drivesdk
Please also be sure that you are testing on the latest version of the platform, release 23.2. Update installer can be downloaded below.
Update - https://ninjatrader.com/PlatformDirect
I look forward to hearing from you.Attached FilesJimNinjaTrader Customer Service
Comment
-
Hello bosajin,
Thanks for your reply.
Jim is out of the office today.
Please send to PlatformSupport[at]Ninjatrader[dot]com. Mark the e-mail Ticket# 2930049, Atten: Jim.
In the body of the e-mail please include a link to reference this thread.
Thanks in advance for your patience.
Paul H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by southpacific001, 02-26-2021, 09:25 PM
|
12 responses
56 views
0 likes
|
Last Post
![]()
by REI140205
Today, 07:13 PM
|
||
Oco
by punkiy2111
Started by punkiy2111, Today, 05:22 PM
|
0 responses
2 views
0 likes
|
Last Post
![]()
by punkiy2111
Today, 05:22 PM
|
||
Started by secrettrader, Today, 03:36 PM
|
0 responses
8 views
0 likes
|
Last Post
![]()
by secrettrader
Today, 03:36 PM
|
||
Started by t3chn0, Today, 01:03 PM
|
1 response
8 views
0 likes
|
Last Post
|
||
Started by jleira, Today, 02:27 PM
|
0 responses
25 views
0 likes
|
Last Post
![]()
by jleira
Today, 02:27 PM
|
Comment