NexusFi: Find Your Edge


Home Menu

 





crosses counter


Discussion in EasyLanguage Programming

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




 
Search this Thread

crosses counter

(login for full post details)
  #1 (permalink)
 doitagaitforme 
Rostov-na-Donu/ Russia
 
Experience: Beginner
Platform: Metatrader
Posts: 17 since Jul 2010
Thanks Given: 8
Thanks Received: 4

Hi all. Advice please. I draw a horizontal line on the closing price and continue to the right. How can I count the number of intersections of this line with the future prices?


 
Code
ID = TL_New(Date, Time, Close, Date, Time, Close); Value1 = TL_SetExtRight (ID, True);

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Request for MACD with option to use different MAs for fa …
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trader Dale [email protected] or Scammer Dale
Trading Reviews and Vendors
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Volume profile TradeStation
EasyLanguage Programming
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Tao te Trade: way of the WLD
30 thanks
GFIs1 1 DAX trade per day journal
28 thanks
Supertradersams Thread Journal on NQ/MNQ
27 thanks
Just another trading journal: PA, Wyckoff & Trends
12 thanks
1% Risk Journal
11 thanks

(login for full post details)
  #3 (permalink)
 doitagaitforme 
Rostov-na-Donu/ Russia
 
Experience: Beginner
Platform: Metatrader
Posts: 17 since Jul 2010
Thanks Given: 8
Thanks Received: 4


The problem is solved. Thank onesmith on traderslaboratory
 
Code
input: count(3);
var: x(0), oldest(0), recycle(0), size(99);
array: id[99,3](0);  // 0=id, 1=price, 2=count, 3=age

once for x=0 to size begin
    id[x,0]=tl_new(d,t,0,d,t,0);
end;

if barstatus(1)=2 then begin
    oldest=0;
    for x=0 to size begin
        if L<=id[x,1] and H>=id[x,1] then begin
            id[x,2]=id[x,2]+1;
            if id[x,2]=count then begin
                id[x,1]=0;  id[x,2]=0;  id[x,3]=9999999;  tl_setend(id[x,0],d,t,0);  tl_setbegin(id[x,0],d,t,0);  // reset price, count and age
            end;
        end;
        if id[x,1]>0 then tl_setend(id[x,0],d,t,id[x,1]);
        id[x,3]=id[x,3]+1;
        if id[x,3]>oldest then begin
            oldest=id[x,3];  recycle=x;
        end;
    end;
    id[recycle,1]=c;  id[recycle,2]=0;  id[recycle,3]=0;  tl_setend(id[recycle,0],d,t,c);  tl_setbegin(id[recycle,0],d,t,c);
end;

Started this thread Reply With Quote
The following 2 users say Thank You to doitagaitforme for this post:





Last Updated on April 27, 2012


© 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