NexusFi: Find Your Edge


Home Menu

 





Using currentHigh/Low Open


Discussion in NinjaTrader

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




 
Search this Thread

Using currentHigh/Low Open

  #1 (permalink)
jtradr
Connecticut
 
Posts: 26 since Dec 2010
Thanks Given: 16
Thanks Received: 27

I am looking to use the current day High Low and Open in a strategy.

What is the easiest way to get NT to recognize CurrentHigh in my trade executions.

For example I have a custom line indicator where I want to look for a crossbelow but only if the close of 1 bar ago was above this indicator and a certain number of ticks from the current high. Therefore I need to use CurrentHigh -10*TickSize and I get an error saying that the name CurrentHigh does not exist in the current context. I have a line: Add(CurrentDayOHL());
trying to call on that indicator but it doesn't work.

Thank you in advance.

J

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
Exit Strategy
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,446 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,610


Going solely based on memory, typing free hand, not tested...

 
Code
                            
# vars

private double dayHighdayLow;

# onbarupdate
dayHigh CurrentDayOHLC().CurrentHigh[0];
dayLow CurrentDayOHLC().CurrentLow[0]; 
I don't know about NT7 but I never really liked using CurrentDayOHLC with NT 6.5, I always kept track of the session high/low myself and reset it on a new session.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
jtradr
Connecticut
 
Posts: 26 since Dec 2010
Thanks Given: 16
Thanks Received: 27

I am having a problem where my strategy enters the first position of the day and then ignores all profit target and stop loss. Is this because I have my:

private void go long()
{
SetStopLoss("target1").........

SetProfitTarget

EnterLong
}

lines inside the Initialize() portion of the code? I tried to move it to the OnBarUpdate() section and it comes back with a lot of Expected class, delegate, enum, interface, or struct errors so I am assuming there is something that OnBarUpDate doesn't like in there.

The full code is attached.

Thank you in advance.

Attached Files
Elite Membership required to download: BigMikeHelp3.txt
Reply With Quote




Last Updated on January 14, 2011


© 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