NexusFi: Find Your Edge


Home Menu

 





OHLCPeriodsAgo EasyLanguage/MultiCharts


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one ccfeldt with 2 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 shadrock55 with 1 posts (0 thanks)
    4. looks_4 Big Mike with 1 posts (0 thanks)
    1. trending_up 4,767 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

OHLCPeriodsAgo EasyLanguage/MultiCharts

  #1 (permalink)
 ccfeldt 
Switzerland
 
Experience: Beginner
Platform: MultiCharts, TradeInterceptor
Trading: Forex
Posts: 13 since Mar 2011
Thanks Given: 0
Thanks Received: 1

What am I not understanding with the OHLCPeriodsAgo function in Multicharts.
I have this test indicator:

*******************************************************************
input: barsBack( 1 );

variable: bbOpen( 0 ),
bbHigh( 0 ),
bbLow( 0 ),
bbClose( 0 ),
resolution( 0 ),
label( "" );

resolution = bartype_ex;
OHLCPeriodsAgo( resolution, barsBack, bbOpen, bbHigh, bbLow, bbClose);

plot1( bbHigh, "high");
*******************************************************************

I was thinking this would get the resolution for my chart, and get OHLC for the bar 'barsBack' ago.
On a hourly chart, with the default barsBack=1 setting, I see this:

2011-03-25_1409 - ccfeldt's library

Any help on what I'm doing wrong would be greatly appreciated.

What I'm actually trying to achieve is writing a function OHLCAtTime( 1030 ). Perhaps someone has written a similar function and would care to share some info.

Many thanks, happy trading.
ccfeldt

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 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,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603


Are you saying High[1] and bbHigh[0] aren't matching, assuming a barsback=1?

I would use print statements to debug vs plots.

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
  #4 (permalink)
shadrock55
Marietta, GA U.S.A
 
Posts: 9 since Mar 2011
Thanks Given: 0
Thanks Received: 4

Can you specify more clearly what you want?

If you simply want to know the value at 10:30 then just set it to a variable or write it to an array.

Var:
1030O(0),
1030H(0),
1030L(0),
1030C(0);

If Time = 1030 Then Begin
1030O = Open;
1030H = High;
1030L = Low;
1030C = Close;
End;

Reply With Quote
  #5 (permalink)
 ccfeldt 
Switzerland
 
Experience: Beginner
Platform: MultiCharts, TradeInterceptor
Trading: Forex
Posts: 13 since Mar 2011
Thanks Given: 0
Thanks Received: 1


shadrock55 View Post
Can you specify more clearly what you want?

If you simply want to know the value at 10:30 then just set it to a variable or write it to an array.

Var:
1030O(0),
1030H(0),
1030L(0),
1030C(0);

If Time = 1030 Then Begin
1030O = Open;
1030H = High;
1030L = Low;
1030C = Close;
End;

Thanks shadrock for the suggestion, I'll have a look at it when I'm back home.
Still haven't figured out what I'm doing wrong when using the OHLCPeriodsAgo function, but I might write up an example and post over at the multicharts forum.

Cheers

Started this thread Reply With Quote




Last Updated on April 6, 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