NexusFi: Find Your Edge


Home Menu

 





LowestBar question


Discussion in EasyLanguage Programming

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




 
Search this Thread

LowestBar question

  #1 (permalink)
 decs0057 
Munich, Germany
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB, NinjaTrader Brokerage
Trading: ES,NQ,6E
Posts: 71 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?
Exit Strategy
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
 
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)
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


© 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