(TS) Print smth when Strategy is disabled from chart - EasyLanguage Programming | futures io social day trading
futures io futures trading


(TS) Print smth when Strategy is disabled from chart
Updated: Views / Replies:74 / 4
Created: by eronyx Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

(TS) Print smth when Strategy is disabled from chart

  #1 (permalink)
Trading Apprentice
Moldova
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: Emini ES
 
Posts: 2 since Nov 2017
Thanks: 1 given, 0 received

(TS) Print smth when Strategy is disabled from chart

Hi guys
[related to TS coding]

is there a method/function or something that can be coded inside the strategy that will be done before a strategy is disabled?

for example there is such a function
Method override void InitializeComponent()

which is used to code steps when strategy is enabled, but what is the method to code some steps (example : delete a file, delete a global variable) when strategy is removed?

or if anyone could guide me how to delete a global variable / (Item from GlobalDictionary) when a strategy is disabled/removed from chart?

GlobalDictionary is used inside this strategy
PS: trying for few days and still nothing found,
please guide who knows, save a programmer's day

thank you

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,489 since Apr 2013
Thanks: 226 given, 843 received


eronyx,

you can use the following code to subscribe to the event handler methods that are executed on initialization and un-initialization of your code.

 
Code
{ This method gets called by EasyLanguage one time 
	at the beginning to create and initialize the components }
method override void InitializeComponent()
begin
	self.Initialized += Analysistechnique_Initialized ;	
	self.UnInitialized += Analysistechnique_Uninitialized ;		
end ;
However you ought to check if changes to the global dictionary within the Analysistechnique_Uninitialized method are actually saved, though.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #4 (permalink)
Trading Apprentice
Moldova
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: Emini ES
 
Posts: 2 since Nov 2017
Thanks: 1 given, 0 received

Using it in TS 9.1 and I just need to add the uninitialized events directly without the method override void InitializeComponent(), otherwise getting the following error

Error 1; Description: method ts.StrategyGroups.@@Experiment.initializecomponent(void) method redeclared

thx a lot - this is exactly what I was looking for. You are a saver. I will experiment with global dictionary



ABCTG View Post
eronyx,

you can use the following code to subscribe to the event handler methods that are executed on initialization and un-initialization of your code.

 
Code
{ This method gets called by EasyLanguage one time 
	at the beginning to create and initialize the components }
method override void InitializeComponent()
begin
	self.Initialized += Analysistechnique_Initialized ;	
	self.UnInitialized += Analysistechnique_Uninitialized ;		
end ;
However you ought to check if changes to the global dictionary within the Analysistechnique_Uninitialized method are actually saved, though.

Regards,

ABCTG


Reply With Quote
 
  #5 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,489 since Apr 2013
Thanks: 226 given, 843 received

eronyx,

you are welcome.
The code is a full piece of code, including the InitializeComponent call. If you already call this within your code, TS will not call it again and you simply have to add the code that subscribes to the event within the existing method.

Regards,

ABCTG

P.S.: By the way, you can show your appreciation for posts on futures.io by clicking the "Thanks" button next to a post.

Reply With Quote

Reply



futures io > > > > > (TS) Print smth when Strategy is disabled from chart

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

Dec 7

Linda Bradford Raschke: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
current bar volume print next to price on the chart body? moerfutures Traders Hideout 3 March 4th, 2017 01:40 PM
NinjaTrader Wrong bar print on chart snakeHead121 NinjaTrader 9 March 22nd, 2016 02:21 PM
Edit Strategy to Start in Disabled State danyzuko NinjaTrader Programming 10 January 22nd, 2016 05:14 AM
print strategy Position list avivi TradeStation 0 November 26th, 2014 01:26 PM
[MC] indicator - Print Date on chart Nicolas11 The Elite Circle 2 April 6th, 2012 03:16 PM


All times are GMT -4. The time now is 08:16 AM.

Copyright © 2017 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
Page generated 2017-11-21 in 0.06 seconds with 18 queries on phoenix via your IP 54.144.57.183