Trading Articles
Article Categories
Article Tools
One Dot When Condition Met
Updated August 17, 2016
trending_up
654 views
thumb_up
2 thanks given
group
2 followers
forum
4 posts
attach_file
0 attachments
Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free and simple.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
One Dot When Condition Met
(login for full post details)
#1 (permalink )
Dallas, TX/USA
Experience: Intermediate
Platform: NinjaTrader
Trading: ES, CL
Posts: 49 since Aug 2013
Thanks: 55 given,
9
received
Hello All,
I would like the following condition to generate an alert on the first bar only. Unfortunately, my limited knowledge has a dot at each bar until the condition changes.
if EMA (8) [0] > SMA (20) [0] && SuperTrend.UpTrend [0] == true
{
DrawDot ("Dot", true, 0, High [0], Color.Green)
}
Thanks in advance.
Difference between discomfort and pain = 1 tick
Best Threads (Most Thanked) in the last 7 days on futures io
(login for full post details)
#3 (permalink )
Gits (Hooglede) Belgium
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,991 since Sep 2013
Thanks: 2,437 given,
5,801
received
use an extra flag (bool)
when the condition is met, you put the flag
when the condition stops, you remove the flag
if the flag is put, the signal can not be generated
good luck !
The following user says Thank You to rleplae for this post:
(login for full post details)
#4 (permalink )
Dallas, TX/USA
Experience: Intermediate
Platform: NinjaTrader
Trading: ES, CL
Posts: 49 since Aug 2013
Thanks: 55 given,
9
received
rleplae
use an extra flag (bool)
when the condition is met, you put the flag
when the condition stops, you remove the flag
if the flag is put, the signal can not be generated
good luck !
Thanks for the reply.
I don't have a clue about flag (bool) can you point in a direction to learn.
Difference between discomfort and pain = 1 tick
(login for full post details)
#5 (permalink )
Gits (Hooglede) Belgium
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,991 since Sep 2013
Thanks: 2,437 given,
5,801
received
roughly like this :
Code
if (EMA (8) [0] > SMA (20) [0] && SuperTrend.UpTrend [0] == true && !fired)
{
DrawDot ("Dot", true, 0, High [0], Color.Green);
fired = true;
}
if (EMA (8) [0] < SMA (20) [0] || SuperTrend.UpTrend [0] == flase)
{
fired = false;
}
The following user says Thank You to rleplae for this post:
Last Updated on August 17, 2016
Right now
Ongoing
Coming soon
March
Register to Attend
Elite only
Register to Attend
Elite only
Right now
April