Specifically, I'm trying to find all the instances my entry limit orders execute at the move extreme (to the tick) when 'liberal' fill processing is employed.
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Accessing entry efficiency data by code
Collapse
X
-
Accessing entry efficiency data by code
Is there a method to access entry efficiency calculations by code or can anyone suggested a good method to calculate entry efficiency in particular?
Specifically, I'm trying to find all the instances my entry limit orders execute at the move extreme (to the tick) when 'liberal' fill processing is employed.Tags: None
-
Hello nrgtrader,
I am unsure of anyway to gather this specific information from a script as the script is not directly associated with the Account Performance tab and its calculations. You could calculate this value with the script its self using the order information and execution information while it runs. You can see the calculation used by the account perfomance tab in the link you provided, this type of equation could be used in your script as well to calculate this value.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
NinjaTrader_Jesse I am trying to find entries that hit to the tick and am having trouble with this code. Bellow is the code (and output) in onorderupdate and for some reason the matching print is not hitting. What am I doing wrong?
1/26/2017 10:00:29 AM entryPrice = 53.64
1/26/2017 10:00:29 AM minLow = 53.64
1/26/2017 10:00:29 AM maxHigh = 54.06
else if (order.OrderType == OrderType.Limit && order.OrderState == OrderState.Filled)
{
int tradeSpanL = 1 + BarsSinceEntry(bIPindex,"Long limit entry", 0);
int tradeSpanS = 1 + BarsSinceEntry(bIPindex,"Short limit entry", 0);
double minLow = MIN(Low, tradeSpanL)[0];
double maxHigh = MAX(High, tradeSpanS)[0];
Print(Time[0].ToString() + " entryPrice = " + entryPrice);
Print(Time[0].ToString() + " minLow = " + minLow);
Print(Time[0].ToString() + " maxHigh = " + maxHigh);
if (entryPrice == minLow || entryPrice == maxHigh )
{
Print(Time[0].ToString() + " Position entered at move min/max");
}
Comment
-
Hello,
Are you saying that the condition below is not occurring?
Code:if (entryPrice == minLow || entryPrice == maxHigh ) { Print(Time[0].ToString() + " Position entered at move min/max"); }
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
-
NinjaTrader_PatrickH, I believe NinjaTrader_Jesse did resolve my question regarding my code with respect to floating point comparison problems and also my initial question regarding accessibility of entry efficiency data. Thanks.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by andrewtrades, Today, 04:57 PM
|
1 response
5 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
3 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
7 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM |
Comment