NexusFi: Find Your Edge


Home Menu

 





2 consecutive red bars


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
giger2000
Barcelona
 
Posts: 15 since Sep 2013
Thanks Given: 1
Thanks Received: 2

Hi!,

I'm programming my first strategy, and I'm using Wizard

Is it possible to write a condition that executes and order if the last 2 bars are red bars?

thanks


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
Double Deadlock: Rubio Calls Hormuz Tolls "Unfeasib …
Traders Hideout
400 Million Barrels to Address Middle East Supply Disruption
Commodities
Energy Futures Shatter All-Time Daily Volume: 8.3 Millio …
Commodities
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,405



giger2000 View Post
Hi!,

I'm programming my first strategy, and I'm using Wizard

Is it possible to write a condition that executes and order if the last 2 bars are red bars?

thanks

Yes


Be yourself; everyone else is already taken. Oscar Wilde
Reply With Quote
  #4 (permalink)
giger2000
Barcelona
 
Posts: 15 since Sep 2013
Thanks Given: 1
Thanks Received: 2


Tasker_182 View Post
Yes

ok. How?


Reply With Quote
  #5 (permalink)
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,405


giger2000 View Post
ok. How?

so you wrote that you are programming a strategy using the wizard and asked if your idea was possible so I answered yes. The best way to learn is to indeed do it yourself by trying different things and reading the various ninja help files and reviewing Ninja videos.

To further assist, the conditions you are looking for are:

if (Close[1] < Open[1] && Close[0] < Open[0]) then do something...

Good luck


Be yourself; everyone else is already taken. Oscar Wilde
Reply With Quote
  #6 (permalink)
giger2000
Barcelona
 
Posts: 15 since Sep 2013
Thanks Given: 1
Thanks Received: 2


Tasker_182 View Post
so you wrote that you are programming a strategy using the wizard and asked if your idea was possible so I answered yes. The best way to learn is to indeed do it yourself by trying different things and reading the various ninja help files and reviewing Ninja videos.

To further assist, the conditions you are looking for are:

if (Close[1] < Open[1] && Close[0] < Open[0]) then do something...

Good luck

Ok, thanks. I started with wizard, but it's time to jump the next level ;-P

My problem is with parameter ENTRIES PER DIRECTION : I'd 2 orders max. per direction, but in some cases both orders are practically in the same price. For example:

1.- High[2] = 200; ASKPRICE[0]=100 Condition OK so.....
2.- If the next bar is a plain bar, the condition is still true, so buy the second order at the same price (+/-)

Do you know some method for avoid this?

Sorry for my english


Reply With Quote
  #7 (permalink)
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,405


giger2000 View Post
Ok, thanks. I started with wizard, but it's time to jump the next level ;-P

My problem is with parameter ENTRIES PER DIRECTION : I'd 2 orders max. per direction, but in some cases both orders are practically in the same price. For example:

1.- High[2] = 200; ASKPRICE[0]=100 Condition OK so.....
2.- If the next bar is a plain bar, the condition is still true, so buy the second order at the same price (+/-)

Do you know some method for avoid this?

Sorry for my english

Not sure that i understand what you mean by plain bar and i am limited in what I can do strategy wise. Perhaps others can help out.


Be yourself; everyone else is already taken. Oscar Wilde
Reply With Quote




Last Updated on October 11, 2013


© 2026 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 - Downloads - Top
no new posts