<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — Working on FST]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/3430/" />
	<updated>2012-07-25T09:45:24Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/3430/working-on-fst/</id>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15541/#p15541" />
			<content type="html"><![CDATA[<p>FST will show a warning message and will play an error sound when detects a failed close order.</p><p><span class="postimg"><img src="http://i.imgur.com/8x0US.png" alt="http://i.imgur.com/8x0US.png" /></span></p><p>FST will resend close order at every 30 seconds until the warning message is closed or the position is closed.<br />The position can be also close manually.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2012-07-25T09:45:24Z</updated>
			<id>https://forexsb.com/forum/post/15541/#p15541</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15539/#p15539" />
			<content type="html"><![CDATA[<p>Thank you SpiderMan for the reasonable request. I&#039;m going to work on that matter today.</p><br /><div class="quotebox"><blockquote><p>I was caught with this when I changed my AUDUSD strategy from a 30 minute to a 15 minute time frame but forgot to change the MT4 chart.</p></blockquote></div><p>If the strategy comes from FSB, it has a time frame and a symbol record. I can add a warning and additional confirmation if one tries to start trading on different chart.</p><p>If strategy was set directly in FST it can also record info for the market it was initially started to trade. <br />Normally FST stop trading if the user changes the chart, but currently there is no warning or confirmation when tarding is started on different chart.</p><p>I can also add a record if a strategy was first tested on a Demo account. If it wasn&#039;t, FST can show a confirmation dialog.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2012-07-25T03:55:34Z</updated>
			<id>https://forexsb.com/forum/post/15539/#p15539</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15538/#p15538" />
			<content type="html"><![CDATA[<p>In the interests of making FST rock solid I have another issue you might want to consider. FST doesn&#039;t check that the time frame or currency pair match that of the MT4 chart. I was caught with this when I changed my AUDUSD strategy from a 30 minute to a 15 minute time frame but forgot to change the MT4 chart. FST didn&#039;t know and merrily went on trading a demo account to nothing!</p>]]></content>
			<author>
				<name><![CDATA[SpiderMan]]></name>
				<uri>https://forexsb.com/forum/user/4094/</uri>
			</author>
			<updated>2012-07-25T01:50:57Z</updated>
			<id>https://forexsb.com/forum/post/15538/#p15538</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15535/#p15535" />
			<content type="html"><![CDATA[<p><strong>Repeating Failed Close Orders</strong></p><p>I think the failure to close an order is a critical issue. There can be nothing worse than an open position going against you that you have no control over. A bit like in the early days when you couldn&#039;t get hold of your broker and no-one else wanted to get involved with a fellow brokers book. Here are my thoughts.</p><p>1. If the close order is sent and it fails I think the order should be continuously retried until canceled by operator intervention.&nbsp; At the same time a flashing warning should be displayed on FST as a visual indication of a problem and maybe even send an email indicating an order failure. </p><p>2. How long should it retry for? Maybe every 30 seconds would seem reasonable. Maybe for an hour, after that the market would either be closed or there is another problem.</p><p>3. I think strategy activity should be stopped until the order is closed. You cannot keep trading a strategy when half of it is broken.</p><p>4. I do occasionally get a message that says market closed when it isn&#039;t and the next minute the order goes through so getting a market closed response shouldn&#039;t be an indication to stop sending the close order.</p>]]></content>
			<author>
				<name><![CDATA[SpiderMan]]></name>
				<uri>https://forexsb.com/forum/user/4094/</uri>
			</author>
			<updated>2012-07-24T22:20:06Z</updated>
			<id>https://forexsb.com/forum/post/15535/#p15535</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15526/#p15526" />
			<content type="html"><![CDATA[<p>After publishing FST 1.5.3.3 Beta I have to find a way for implementing the requested repeat of failed close orders feature.</p><p><strong>Repeating Failed Close Orders</strong><br />My thoughts are to make FST checking the return status of close orders. If close order returns an error or we still have a position after that, FST must repeat the close order. It&#039;s clear but:<br /> - how frequently FST should repeat failed close orders: At every minute, At every new bar...<br /> - When to cancel resending of close orders: after a specified time...<br /> - do we need to stop strategy activity until the position gets closed (I mean adding and so on)<br />Please comment on that topic.</p><p><strong>Fixing Martingale.</strong><br />Current issue is failing of catching activated Stop loss or Take profits some times. It means that consecutive losses stats may not be correct. It is not a big issue, but we have to make FST as better as we can. Any thoughts on that matter?</p><p>I&#039;m going to release stable FST after fixing these topics. Am I missing something?</p><p>I&#039;ll be in Bulgaria till the end of August. FST and FSB must become rock solid till than.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2012-07-24T12:43:48Z</updated>
			<id>https://forexsb.com/forum/post/15526/#p15526</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15458/#p15458" />
			<content type="html"><![CDATA[<p>I`m sorry, I wrongly interpreted this exception to be autostart issue - but it`s not.<br />Just installed fresh 1.5.3b, updated Mt4, and when FST is connecting to MT4, it throws this exception below. Broker Oanda &amp; GoMarkets.</p><p>Ok probably I know what`s the problem, as it`s conversion issue, it must be good/old -&gt; different Culture. Do you use US culture (I`m from Europe) ?</p><br /><p>************** Exception Text **************<br />System.FormatException: Input string was not in a correct format.<br />&nbsp; &nbsp;at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp; number, NumberFormatInfo info, Boolean parseDecimal)<br />&nbsp; &nbsp;at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)<br />&nbsp; &nbsp;at System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info)<br />&nbsp; &nbsp;at Forex_Strategy_Trader.Actions.ParseAndSetParametrs(String parameters)<br />&nbsp; &nbsp;at Forex_Strategy_Trader.Actions.TimerPingTick(Object sender, EventArgs e)<br />&nbsp; &nbsp;at System.Windows.Forms.Timer.OnTick(EventArgs e)<br />&nbsp; &nbsp;at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message&amp; m)<br />&nbsp; &nbsp;at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)</p>]]></content>
			<author>
				<name><![CDATA[acerguest]]></name>
				<uri>https://forexsb.com/forum/user/3701/</uri>
			</author>
			<updated>2012-07-17T22:19:16Z</updated>
			<id>https://forexsb.com/forum/post/15458/#p15458</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15446/#p15446" />
			<content type="html"><![CDATA[<p>Yes, that was a part of error message (but might be not the exact words).</p>]]></content>
			<author>
				<name><![CDATA[acerguest]]></name>
				<uri>https://forexsb.com/forum/user/3701/</uri>
			</author>
			<updated>2012-07-17T08:01:41Z</updated>
			<id>https://forexsb.com/forum/post/15446/#p15446</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15439/#p15439" />
			<content type="html"><![CDATA[<p>What do you mean with &quot;when converting to double.&quot; ?</p><p>Is the text &quot;when converting to double.&quot; a part of the errormessage?<br />thomas</p>]]></content>
			<author>
				<name><![CDATA[tnickel]]></name>
				<uri>https://forexsb.com/forum/user/5655/</uri>
			</author>
			<updated>2012-07-16T20:46:03Z</updated>
			<id>https://forexsb.com/forum/post/15439/#p15439</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15438/#p15438" />
			<content type="html"><![CDATA[<p>Don`t understand the question. I used compiled version, I didn`t have yet time to check the source code.</p>]]></content>
			<author>
				<name><![CDATA[acerguest]]></name>
				<uri>https://forexsb.com/forum/user/3701/</uri>
			</author>
			<updated>2012-07-16T18:53:58Z</updated>
			<id>https://forexsb.com/forum/post/15438/#p15438</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15430/#p15430" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>acerguest wrote:</cite><blockquote><p>Hi. <br />I`m testing 1.5.3.1, autostart seems to not work:</p><p>start &quot;&quot; &quot;Forex Strategy Trader.exe&quot;&nbsp; &nbsp;140&nbsp; &nbsp;&quot;no&quot;&nbsp; &nbsp; &quot;Test Trade&quot;</p><p>got parse error, when converting to double.</p></blockquote></div><p>Did you covert to double ConnectionID?<br />I&#039;ll add int.TryParse to prevent crashes.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2012-07-16T02:53:56Z</updated>
			<id>https://forexsb.com/forum/post/15430/#p15430</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15429/#p15429" />
			<content type="html"><![CDATA[<p>Hi. <br />I`m testing 1.5.3.1, autostart seems to not work:</p><p>start &quot;&quot; &quot;Forex Strategy Trader.exe&quot;&nbsp; &nbsp;140&nbsp; &nbsp;&quot;no&quot;&nbsp; &nbsp; &quot;Test Trade&quot;</p><p>got parse error, when converting to double.</p>]]></content>
			<author>
				<name><![CDATA[acerguest]]></name>
				<uri>https://forexsb.com/forum/user/3701/</uri>
			</author>
			<updated>2012-07-15T23:47:06Z</updated>
			<id>https://forexsb.com/forum/post/15429/#p15429</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15385/#p15385" />
			<content type="html"><![CDATA[<p>Update:</p><p>Following tags remain open after publishing <a href="http://forexsb.com/forum/topic/3453/fst-15-nightly-build/">FSTv1.5.1NB</a>.</p><p>- Automatic log file for FST;<br />- Repeating non executed closing orders (with an on/off option);</p><p>To fix:<br /> - Dealing with activated SL and TP that are not properly detected from expert. </p><p>Documentation ToDO:<br /> - <a href="http://forexsb.com/wiki/fst/manual/trade_settings">Trade Settings</a>;<br /> - <a href="http://forexsb.com/wiki/fsb/manual/logical_groups">Logical Groups</a>;</p><p>ETA next NB with log file Wednesday.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2012-07-09T21:02:38Z</updated>
			<id>https://forexsb.com/forum/post/15385/#p15385</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15377/#p15377" />
			<content type="html"><![CDATA[<p>Code for detecting activation of StopLoss and TakeProfit</p><div class="codebox"><pre><code>///
/// Detects if position was closed from SL or TP.
/// Must be called at every new tick.
///
void DetectSLTPActivation(string symbol)
{
    
    // Save position values from previous tick.
    double oldStopLoss   = PositionStopLoss;
    double oldTakeProfit = PositionTakeProfit;
    double oldProfit     = PositionProfit;
    int    oldType       = PositionType;

    // Update position values.
    SetAggregatePosition(symbol);

    // Compare updated values with previous tick values.
    if (oldType != OP_SQUARE &amp;&amp; PositionType == OP_SQUARE)
    {   // Position was closed this tick must be due to SL or TP.
        double closePrice;
        double activatedSL = 0;
        double activatedTP = 0;
        if (oldType == OP_BUY)
            closePrice = MarketInfo(symbol, MODE_BID);
        else if (oldType == OP_SELL)
            closePrice = MarketInfo(symbol, MODE_ASK);

        string stopMessage = &quot;No SL or TP activation&quot;;
        if (MathAbs(oldStopLoss - closePrice) &lt; 2 * PipsValue)
        {   // Activated Stop Loss
            activatedSL = closePrice;
            stopMessage = &quot;Activated StopLoss=&quot; + activatedSL;
        }
        else if (MathAbs(oldTakeProfit - closePrice) &lt; 2 * PipsValue)
        {   // Activated Take Profit
            activatedTP = closePrice;
            stopMessage = &quot;Activated TakeProfit=&quot; + activatedTP;
        }

          // For Martingale (if used)
        ConsecutiveLosses = IF_I(oldProfit &lt; 0, ConsecutiveLosses + 1, 0);

        string message = stopMessage +
            &quot;, Position closed at &quot; + closePrice +
            &quot;, Profit=&quot; + oldProfit +
            &quot;, ConsecutiveLosses=&quot; + ConsecutiveLosses;

        if (Write_Log_File) WriteLogLine(message);
        Print(message);
    }
}</code></pre></div><p>It compares current tick position values with previous tick values. If the position was closed, the code checks if current price is near to position&#039;s SL or TP. If yes, it assumes that the closing was due to activation of SL or TP.<br />We&#039;ll log this info and send it to FST for logging and drawing on the chart.<br />Also Martingale ConsecutiveLosses variable is be updated according to the profit / loss.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2012-07-09T08:34:27Z</updated>
			<id>https://forexsb.com/forum/post/15377/#p15377</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15368/#p15368" />
			<content type="html"><![CDATA[<p>Update on auto start proposed <a href="http://forexsb.com/forum/topic/2718/added-little-automation-for-fst/">here</a>.</p><p>I used the idea of @acerguest for FST starting automation.<br />The batch file for autostarting will be included in the distribution.<br />Here is it&#039;s code:<br /></p><div class="codebox"><pre><code>:: This batch file runs FST automatically, sets connection ID,
:: sets a strategy name to load and starts (or not) autotrade;
:: Example:
:: start &quot;&quot; &quot;Forex Strategy Trader.exe&quot;   100   &quot;yes&quot;   &quot;Test Trade&quot;
:: Where:
::       100 is the ConectionID,
::       &quot;yes&quot; means start autotrade when connected,
::       &quot;no&quot; means do not start autotrading,
::       &quot;Test Trade&quot; is the strategy name without extension.

start &quot;&quot; &quot;Forex Strategy Trader.exe&quot;   100   &quot;yes&quot;   &quot;Test Trade&quot;
start &quot;&quot; &quot;Forex Strategy Trader.exe&quot;   110   &quot;yes&quot;   &quot;Test Trade&quot;
start &quot;&quot; &quot;Forex Strategy Trader.exe&quot;   120   &quot;yes&quot;   &quot;Test Trade&quot;
start &quot;&quot; &quot;Forex Strategy Trader.exe&quot;   130   &quot;no&quot;    &quot;Test Trade&quot;
start &quot;&quot; &quot;Forex Strategy Trader.exe&quot;   140   &quot;no&quot;    &quot;Test Trade&quot;</code></pre></div><p>It will be available for testing on Monday together with other changes on FST.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2012-07-07T18:27:31Z</updated>
			<id>https://forexsb.com/forum/post/15368/#p15368</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Working on FST]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/15355/#p15355" />
			<content type="html"><![CDATA[<p>I still cannot decide how to check for SL and TP activation. I have some ideas but still need testing. I&#039;m going to update FST on Monday so we can test it on the next week.</p><p>I&#039;m planning a short vacation (5-6 days) from 18th of July, so I really hope to update FST to next beta till then.</p><p>Hope Hackers&#039; God will send me some inspiration.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2012-07-06T13:21:42Z</updated>
			<id>https://forexsb.com/forum/post/15355/#p15355</id>
		</entry>
</feed>
