<div dir="ltr"><div class="gmail_default" style="font-size:small;color:#000000">Set your StartTime/EndTime in your config to when you want to start or stop the connection. Then call initiator.Start(), which starts the initiator on a separate QF thread. As long as your app's main thread is alive, the initiator will startup and shutdown according to your config times.</div>
<div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000">Your app is shutting down immediately because your application.Run() call returns immediately (this is something you implemented, which you borrowed from from TradeClient I believe).</div>
<div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000">You need to do something that keeps the main thread alive. A really easy and silly way would be to use "while(true){sleep(5000);}" or something. Or you could have it wait on a console command, like TradeClient does. In a UI application, the UI might keep the application open for you.</div>
<div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 25, 2013 at 11:01 AM, Ashutosh Mishra <span dir="ltr"><<a href="mailto:A.Mishra@ny.tr.mufg.jp" target="_blank">A.Mishra@ny.tr.mufg.jp</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hi Grant,<u></u><u></u></p>
<p class="MsoNormal"> I have used this code as is in my program.cs file<u></u><u></u></p>
<p class="MsoNormal" style="line-height:10.8pt;background:white"><span style="font-size:7.0pt;font-family:Consolas;color:#333333"> initiator.Start();<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:10.8pt;background:white"><span style="font-size:7.0pt;font-family:Consolas;color:#333333"> application.Run();<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:10.8pt;background:white"><span style="font-size:7.0pt;font-family:Consolas;color:#333333"> initiator.Stop();<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:10.8pt;background:white"><span style="font-size:7.0pt;font-family:Consolas;color:#333333"><u></u> <u></u></span></p>
<p class="MsoNormal">so, my initiator logs on and than logs off.<u></u><u></u></p>
<p class="MsoNormal">How can I make it to be logged on and log out with user intervention?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="text-align:justify;line-height:12.0pt;text-autospace:none">
<span style="font-family:"Arial","sans-serif";color:#4f81bd">Thanks & Regards,<u></u><u></u></span></p>
<p class="MsoNormal" style="text-align:justify;line-height:12.0pt;text-autospace:none">
<span style="font-family:"Arial","sans-serif";color:#4f81bd">Ashutosh Mishra<u></u><u></u></span></p>
<p class="MsoNormal" style="text-align:justify;line-height:12.0pt;text-autospace:none">
<span style="font-size:12.0pt;font-family:"MS PMincho""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-align:justify;line-height:12.0pt;text-autospace:none">
<span style="font-size:12.0pt;font-family:"MS PMincho"">*********************************************************************************<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:12.0pt;text-autospace:none"><span style="font-size:12.0pt;font-family:"MS PMincho"">This communication (including any attachments) is intended only or the use of the individual whom it is addressed and may
contain information that is privileged, confidential or legally protected. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us immediately by replying to the message. Please also delete the message and its attachments, if any, from your computer and destroy any hard copies you may have created. Thank you for your cooperation.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"MS PMincho"">*********************************************************************************</span><span style="font-size:10.5pt;font-family:"Century","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<br>_______________________________________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font><span style="background-color:#000000"><span style="background-color:#ffffff">Grant Birchmeier</span></span></font><font><font color="#3333ff"><br>
</font></font></div><div><font><b><font color="#3333ff"><span style="background-color:#ffcc33"><span style="background-color:#ffcc66"><span style="background-color:#ffcc99"><span style="background-color:#ffffff"><span style="background-color:#ffcc00">Connamara Systems, LLC</span></span></span></span></span></font></b></font><br>
</div><div><font><b>Made-To-Measure Trading Solutions.</b></font></div><div><font>Exactly what you need. No more. No less.</font><font><b><font color="#3333ff"><br></font></b></font></div><div><font><a href="http://connamara.com" target="_blank">http://connamara.com</a><br>
</font></div>
</div>