Strategy: where do I see the order the system is working on?

Questions about MultiCharts and user contributed studies.
HeiBeh
Posts: 11
Joined: 08 Apr 2008

Strategy: where do I see the order the system is working on?

Postby HeiBeh » 30 Jul 2012

I am running a couple of strategies on end of day data: where do I see what order the strategy is currently working ? I am not talking LIVE orders with a broker, I am talking order(s) the strategy is currently working on INTERNALLY. Those are of course the ones I would then place manually with a broker. Many moons ago, when I was still using TS, these orders could be found in a window named 'Active Orders'. Is there anything similar in MC ? I can't seem to find it ... Thank You !

sptrader
Posts: 640
Joined: 09 Apr 2010
Location: Colorado
Has thanked: 403 times
Been thanked: 239 times
Contact:

Re: Strategy: where do I see the order the system is working

Postby sptrader » 30 Jul 2012

Try "View" , " show order and position tracker window "..

HeiBeh
Posts: 11
Joined: 08 Apr 2008

Re: Strategy: where do I see the order the system is working

Postby HeiBeh » 30 Jul 2012

sptrader wrote:Try "View" , " show order and position tracker window "..


Nope ... I already though of that .. There is nothing in there !

User avatar
Henry MultiСharts
Posts: 8520
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2741 times

Re: Strategy: where do I see the order the system is working

Postby Henry MultiСharts » 31 Jul 2012

Hello HeiBeh,

Unfortunately there is no such functionality in MultiCharts at the moment.
You may want to submit a feature request to the Project Management of our web site so other users can vote for it: https://www.multicharts.com/pm/

User avatar
furytrader
Posts: 353
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 154 times
Been thanked: 215 times

Re: Strategy: where do I see the order the system is working

Postby furytrader » 31 Jul 2012

One thing I have learned in using Multicharts to trade systems in real time (not automated systems, but to generate signals), is that you have to write additional code to let you know what orders to work - i.e., put a line of text saying something like "Working to buy 100 shares @ 55.25" or something like that, so you know what you should be doing.
These users thanked the author furytrader for the post (total 2):
TJJoshM

HeiBeh
Posts: 11
Joined: 08 Apr 2008

Re: Strategy: where do I see the order the system is working

Postby HeiBeh » 01 Aug 2012

Henry Multicharts wrote:Hello HeiBeh,

Unfortunately there is no such functionality in MultiCharts at the moment.
You may want to submit a feature request to the Project Management of our web site so other users can vote for it: https://www.multicharts.com/pm/


Well, that's rather disappointing - to say the least. I am now on Multicharts 8 and I still would have to resort to write some clunky code just to see what my system is considering at the moment ? Something that was already implemented in TS 2000 ? You've got to be kidding ! And by the way ... If you allow me the question: What purpose serves the "strategy position" tab in "show open order and position window" - if not for these kind of things ... ?

HeiBeh
Posts: 11
Joined: 08 Apr 2008

Re: Strategy: where do I see the order the system is working

Postby HeiBeh » 01 Aug 2012

furytrader wrote:One thing I have learned in using Multicharts to trade systems in real time (not automated systems, but to generate signals), is that you have to write additional code to let you know what orders to work - i.e., put a line of text saying something like "Working to buy 100 shares @ 55.25" or something like that, so you know what you should be doing.


Okay ... and what do you do then with that line of text ? Do a DefineDLLFunc and make a call to MessageBox or write something stupid like "If Date=LastCalcDate and PrintPos then FileAppend("C:\MyOrders.txt","MC is too stupid to tell me what my current order is !");" ... ? Or have you come up with something smarter ?

Anyway - thanks for your support !

User avatar
furytrader
Posts: 353
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 154 times
Been thanked: 215 times

Re: Strategy: where do I see the order the system is working

Postby furytrader » 01 Aug 2012

Actually, I just use the text commands in PowerLanguage to put a message on the actual chart screen. If you want me to show you an example, lemme know.

HeiBeh
Posts: 11
Joined: 08 Apr 2008

Re: Strategy: where do I see the order the system is working

Postby HeiBeh » 01 Aug 2012

furytrader wrote:Actually, I just use the text commands in PowerLanguage to put a message on the actual chart screen. If you want me to show you an example, lemme know.


I'd appreciate that - yes. Thanks !

User avatar
furytrader
Posts: 353
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 154 times
Been thanked: 215 times

Re: Strategy: where do I see the order the system is working

Postby furytrader » 02 Aug 2012

Okay, so what we do is add some code to your system to post a message to the screen regarding the system's status. As shown below, we create a string variable called MessageText and we assign it a value based on whatever the status of our system is (i.e., working an order, long, short, etc.). At the end of the program, we include some code to post the message in the lower right hand corner of the chart we're following.

Here's an abbreviated example:

Code: Select all

Variables:
   MessageTextID(0),         // This holds the ID for the MessageText
   MessageText("");         // This stores the current message for the trader

....

If <conditions to buy market are true> Then MessageText = "Looking To Buy Market";
If <conditions to buy market are not true> and MarketPosition = 0 Then MessageText = "No Action Currently Warranted";
If MarketPosition = 1 Then MessageText = "Long Market From " + NumToStr(EntryPrice(0),2);

// The following line instantiates a text object if none has been created already
If Text_Exist(MessageTextID) = FALSE Then MessageTextID = Text_New(Date,Time,Close,MessageText);

// Now we update this message with every bar
value1 = Text_SetString(MessageTextID,MessageText);
value1 = Text_SetColor(MessageTextID,DarkBlue);  // You can choose whatever color you want
value1 = Text_Float(MessageTextID,0,3); // This puts the message in lower righthand corner


Note that you can change the messages to say whatever you want. For example, you could change the message about entering the market to say something like:

"Working order to buy market at 125.25 LIMIT" or something else. It's up to you.

Let me know if you have any more questions. Good luck!
These users thanked the author furytrader for the post (total 4):
Stan BokovKatrin YanenkoJoshMTJ

User avatar
Henry MultiСharts
Posts: 8520
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2741 times

Re: Strategy: where do I see the order the system is working

Postby Henry MultiСharts » 02 Aug 2012

HeiBeh wrote:What purpose serves the "strategy position" tab in "show open order and position window" - if not for these kind of things ... ?

Order and position tracker is for tracing the orders that were actually generated by the strategy while "automated order execution" was turned on or sent to the broker manually. It does not reflect your current backtesting orders.

HeiBeh
Posts: 11
Joined: 08 Apr 2008

Re: Strategy: where do I see the order the system is working

Postby HeiBeh » 02 Aug 2012

furytrader wrote:Okay, so what we do is add some code to your system to post a message to the screen regarding the system's status. As shown below, we create a string variable called MessageText and we assign it a value based on whatever the status of our system is (i.e., working an order, long, short, etc.). At the end of the program, we include some code to post the message in the lower right hand corner of the chart we're following.

Here's an abbreviated example:

Code: Select all

Variables:
   MessageTextID(0),         // This holds the ID for the MessageText
   MessageText("");         // This stores the current message for the trader

....

If <conditions to buy market are true> Then MessageText = "Looking To Buy Market";
If <conditions to buy market are not true> and MarketPosition = 0 Then MessageText = "No Action Currently Warranted";
If MarketPosition = 1 Then MessageText = "Long Market From " + NumToStr(EntryPrice(0),2);

// The following line instantiates a text object if none has been created already
If Text_Exist(MessageTextID) = FALSE Then MessageTextID = Text_New(Date,Time,Close,MessageText);

// Now we update this message with every bar
value1 = Text_SetString(MessageTextID,MessageText);
value1 = Text_SetColor(MessageTextID,DarkBlue);  // You can choose whatever color you want
value1 = Text_Float(MessageTextID,0,3); // This puts the message in lower righthand corner


Note that you can change the messages to say whatever you want. For example, you could change the message about entering the market to say something like:

"Working order to buy market at 125.25 LIMIT" or something else. It's up to you.

Let me know if you have any more questions. Good luck!


Brilliant !
I think I understand what's going on here .. If not, I'll come back ...
Thanks again for your help !


Return to “MultiCharts”