NexusFi: Find Your Edge


Home Menu

 





LowestBar question


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
 decs0057 
Munich, Germany
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB, NinjaTrader Brokerage
Trading: ES,NQ,6E
Posts: 73 since Feb 2010
Thanks Given: 15
Thanks Received: 25

I am new to Multicharts and want to understand following code

Vars:
value1(0)
depth(12),
shift(0);


for shift = ( currentbar - depth ) downto 0
begin
value1 = Low[LowestBar(low, depth)[shift] ];
end;

what is index of
LowestBar(low, depth)[shift]


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
Four New E-mini Futures Launch June 29 -- Russell 3000, …
Emini and Emicro Index
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
Warsh Opens Today, Hormuz June 19 -- WTI Below $80, Fran …
Prediction Markets & Event Contracts
$12M Ceasefire Contract Goes Disputed as Bandar Abbas St …
Prediction Markets & Event Contracts
 
  #3 (permalink)
shadrock55
Marietta, GA U.S.A
 
Posts: 9 since Mar 2011
Thanks Given: 0
Thanks Received: 4


I'm not sure what you mean by index. Here is what I understand the code to do.

for shift = ( currentbar - depth ) downto 0 begin
{For all the bars since the 12th bar on the chart}

value1 = Low[LowestBar(low, depth)[shift] ];

Write to Value1 the Low of the lowest bar based on the low for 12 bars back. Its easier to break it up.

Low[ Barnumber ] Finds the low value of the bar "Barnumber" bars back.

LowestBar (low, depth) -
A. The word low means that you want the lowest low instead of the lowest close or lowest high, etc.
B. Depth is the number of bars back you want to look to find the low. In this case 12.

That means that you would return the barnumber of the lowest low in the last 12 bars.

Shift would be the number of bars back that you want to obtain the result from. For instance, zero means that you want to know for this bar. If Shift = 1, it would find the lowest low of the 12 bars preceding the bar on bar before the current bar. The coder would generally be better off writing the data into an array than using shift. Its confusing and takes longer to process.


Reply With Quote
Thanked by:




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