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