9.1- 9.5 - futures io
futures io futures trading



9.1- 9.5


Discussion in EasyLanguage Programming

Updated by eronyx
      Top Posters
    1. looks_one Pitrader with 1 posts (0 thanks)
    2. looks_two eronyx with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 ABCTG with 1 posts (0 thanks)
    1. trending_up 335 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 3 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

9.1- 9.5

(login for full post details)
  #1 (permalink)
Canada
 
 
Posts: 12 since Feb 2011
Thanks: 3 given, 0 received

I have an indicator that works just fine on ver 9.1 but I get an error when applied to 9.5 or higher. Placed on a 15 second chart to expedite, once the active bar closes I get a 'Vector is empty or invalid index' error. I have the code below. Any help would be appreciated.

 
Code
 using elsystem ; 								
using elsystem.drawingobjects ; 								
using elsystem.drawing ; 								
								
inputs: 								
	BackBars(10), 							
    PtOffsetPoint(0.5), UniqueID("GGG"); 								
	 							
Vars: 								
	ii(0), ptoffset(0), TextLabel BarCounterTxt( NULL ), TextLabel DeleteText(NULL), BNPoint PosBN( NULL ); 							
	 							
Arrays: TXID[100](0);	 							
method void CreateBNLabel(int barcnt) 								
	begin 							
	{ create position for the text label by bar number using the BNPoint class } 							
	PosBN = BNPoint.Create( CurrentBar - barcnt, Low[barcnt]-PtOffsetPoint) ; 							
		 						
	{ create the text label } 							
	BarCounterTxt = TextLabel.Create( PosBN, Numtostr(barcnt+1,0) ) ; 							
	BarCounterTxt.Font = Font.Create( "Arial", 8 ) ; 							
	BarCounterTxt.HStyle = HorizontalStyle.center ; 							
	BarCounterTxt.VStyle = VerticalStyle.top;							
	BarCounterTxt.Color = Color.Red ; 							
	BarCounterTxt.Tag = UniqueID astype string ;							
		 	 					
	BarCounterTxt.Persist = true ; 							
	end ;	 						
								
method void ShowText() 								
	begin 							
		DrawingObjects.Add( BarCounterTxt ) ; 						
	end;							
//Deleting the Old Texts								
method void deleteAllText()  								
Var: int textList, int textCnt,int jj  ;  								
begin  								
    textList = ObjectCategory.TextLabel;   								
    textCnt = DrawingObjects.Items[textList].Count;  								
    if (LastBarOnChart) then   								
    begin  								
        for jj = 0 to TextCnt - 1   								
        begin  								
            DeleteText = DrawingObjects.Items[textList][jj] astype TextLabel;  								
            if (DeleteText <> NULL) and DeleteText.Tag astype string = UniqueID then DrawingObjects.Delete(DeleteText);  								
        end;  								
    end;  								
end;     								
								
	if (LastBarOnChart) and (BarStatus(1)=2) then 							
	begin 		 					
		deleteAllText();						
		for ii = 0 to BackBars -1						
		begin 						
			CreateBNLabel(ii);					
			ShowText();					
		end; 						
	end;

Reply With Quote

Can you help answer these questions
from other members on futures io?
is there an easy way to obtain by code the price variation percentual
MultiCharts
Looking freelancer for MT4 Indicator
Platforms and Indicators
Atm strategy help
NinjaTrader
GBP/ARS Pair
Traders Hideout
Need a near crosses scan help for TOS
ThinkOrSwim
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Legal question and need desperate help
89 thanks
Building a high-performance data system
15 thanks
Is Orderflow An Outdated Concept?
11 thanks
VWAP for stock index futures trading?
11 thanks
New Computer Build
11 thanks
 
(login for full post details)
  #3 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,189 since Apr 2013
Thanks: 385 given, 1,425 received


Pitrader,

this might be caused by your method that deletes the text, as you loop through elements of the drawing collection and delete elements from it during the loop. This can lead to a situation where you try to access an index that is not longer present in the collection, which would trigger the error.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
(login for full post details)
  #4 (permalink)
Moldova
 
 
Posts: 9 since Nov 2017
Thanks: 6 given, 0 received

Hi

just wondering if you were able to fix the issue? and how it was done

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > 9.1- 9.5


April 27, 2020


Upcoming Webinars and Events
 

Getting Comfortable with Price Action Patterns w/Earn2Trade

Aug 4
 

Live Video Panel: Ask Me Anything w/Ironbeam Brokerage

Aug 6
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts