NexusFi: Find Your Edge


Home Menu

 





One Dot When Condition Met


Discussion in NinjaTrader

Updated
    1. trending_up 1,172 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

One Dot When Condition Met

  #1 (permalink)
 KrazyTrader 
Dallas, TX/USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES, CL
Posts: 51 since Aug 2013
Thanks Given: 56
Thanks Received: 9

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
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Cheap historycal L1 data for stocks
Stocks and ETFs
Quant vue
Trading Reviews and Vendors
Better Renko Gaps
The Elite Circle
 
  #3 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


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 !

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 KrazyTrader 
Dallas, TX/USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES, CL
Posts: 51 since Aug 2013
Thanks Given: 56
Thanks Received: 9


rleplae View Post
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
Started this thread Reply With Quote
  #5 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863

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;
}

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on August 17, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts