Page 1 of 1

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

PostPosted: Sun Oct 09, 2016 1:36 pm
by dogxyz
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.

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

PostPosted: Wed Oct 12, 2016 3:22 am
by Apprentice
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.

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

PostPosted: Wed Oct 12, 2016 2:29 pm
by dogxyz
Thank you. Mr. Apprentice. I have tested and it is ok now. Thanks again.