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 Big Mike with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 shadrock55 with 1 posts (0 thanks)
    1. trending_up 5,332 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread
  #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

 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
15 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 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,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,577


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 X 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


© 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