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
Draw an arrow as signal
Collapse
X
-
Link below is the coding to draw arrow :
Basically, you have to make a condition for it to draw. For example :
Code:if (Condition here) Draw.ArrowUp(this, "tag1 " + CurrentBar, true, 0, Low[0] - TickSize, Brushes.Red);
From your picture, it must be have condition for it to draw the region.
Make you just put the draw arrow function inside there function.
-
Hello Rosario,
Thanks for your post.
You would need to devise some logic to create the situation you have. The situation is that you have a variable length of background drawing.
One approach to this would be to create an int variable to use as a counter. When you do NOT have the condition to draw the background you would set the counter to 0. When you do have the condition to draw the background you increment the counter. When the counter is 1, you draw the arrow.
if (some condition to draw the background)
{
BackBrush =...
myCounter++; // increment counter
if (myCounter == 1)
{
Draw.arrow....
}
}
else
{
myCounter = 0; // reset the counter if NOT drawing the background
}Paul H.NinjaTrader Customer Service
Comment
-
Hello, Paul
Thanks for your reply. Attached file. It works ok.
Sincerely,Attached Files
- Likes 1
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by knighty6508, 05-10-2024, 01:20 AM
|
4 responses
25 views
0 likes
|
Last Post
by knighty6508
Today, 05:29 AM
|
||
Started by OllieFeraher, 05-09-2024, 11:14 AM
|
6 responses
19 views
0 likes
|
Last Post
by OllieFeraher
Today, 04:00 AM
|
||
Started by PaulMohn, 05-02-2024, 06:59 PM
|
2 responses
44 views
0 likes
|
Last Post
by PaulMohn
Today, 03:51 AM
|
||
Started by ETFVoyageur, Today, 02:10 AM
|
0 responses
14 views
0 likes
|
Last Post
by ETFVoyageur
Today, 02:10 AM
|
||
Started by rayyyu12, Today, 12:47 AM
|
0 responses
9 views
0 likes
|
Last Post
by rayyyu12
Today, 12:47 AM
|
Comment