Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Length of a candle
Collapse
X
-
Length of a candle
hi, i'm making a strategy and i want the entry to be made when the length of the candle is defined by the user. How do I measure the length of the previous candle and know if it could be a market entry candle? Thank youTags: None
-
Hello jerryblack,
Thanks for the post.
By length of the candle do you mean Time it took to complete or the Difference between high and low?
The user input part is very easy, that can be created by the strategy builder in the user inputs section. Depending on the condition you are looking for would determine what Type the user input is.
I look forward to being of further assistance.
-
Thanks for answering
I want to choose the type of candle, which is a large candle and with intention
Comment
-
yes exactly, I want to measure it and put it in a variable to tell the strategy if it is the correct candle to enter or not
Comment
-
Hello jerryblack,
You could calculate that by using the following syntax:
This would give you the price difference whihch you could then use in a condition. Assuming you have a user input called InputPrice it would look like the following:Code:double length = High[1] - Low[1];
I look forward to being of further assistance.Code:if(InputPrice > length) { }
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
46 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
66 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment