How to get some message from an indicator if a strategy used

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

How to get some message from an indicator if a strategy used

Postby dogxyz » Sun Oct 09, 2016 1:36 pm

Hi, I add some message by instance:createTextOutput() in my indicator to show at some time. I can see it by my eyes. If I run a strategy which use this indicator, how to get such message in this strategy at this time? I don't like to use data stream (instance:addStream). Is there any idea to do? Thanks.
dogxyz
 
Posts: 7
Joined: Wed Sep 28, 2016 3:20 am

Re: How to get some message from an indicator if a strategy

Postby Apprentice » Wed Oct 12, 2016 3:22 am

public method instance:getTextOutput

Brief
The method returns the text output stream of the indicator by the stream index.

Declaration
Lua
text_output instance:getTextOutput (index)

Parameters
index The index of the stream. The index of the first stream is 0. The index of the last stream is instance:getTextOutputCount() - 1.

Returns
The method returns an instance of the text_output table.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: How to get some message from an indicator if a strategy

Postby dogxyz » Wed Oct 12, 2016 2:29 pm

Thank you. Mr. Apprentice. I have tested and it is ok now. Thanks again.
dogxyz
 
Posts: 7
Joined: Wed Sep 28, 2016 3:20 am


Return to Discussions

Who is online

Users browsing this forum: No registered users and 5 guests