<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — request a indicator that Exit at certain hours or minutes after trade]]></title>
		<link>https://forexsb.com/forum/topic/9625/request-a-indicator-that-exit-at-certain-hours-or-minutes-after-trade/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/9625/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in request a indicator that Exit at certain hours or minutes after trade.]]></description>
		<lastBuildDate>Mon, 11 Dec 2023 17:55:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: request a indicator that Exit at certain hours or minutes after trade]]></title>
			<link>https://forexsb.com/forum/post/77917/#p77917</link>
			<description><![CDATA[<p>I don&#039;t understand, do you want a custom indicator or you are trying to modify exported EAs?</p><p>Secondly, is this about defining a trading session? You said you want to close positions after certain time has passed. N-bar indi works well for that in most cases. If you are trying to limit trading time then use Entry Time indi.</p><div class="quotebox"><cite>SurfingWave wrote:</cite><blockquote><p>Tried your suggestion fall short. </p><p>trade at certain time base on Server trade starts 8am to 1pm. </p><p>here my ChatGpT code: </p><br /><p>// YourMainScriptOrIndicator.mq4<br />#include &quot;TradingTimeFunctions.mqh&quot;</p><p>// Trading hours in server time (in hours)<br />int tradingStartTime = 8;<br />int tradingEndTime = 13;</p><p>// The start function<br />int start()<br />{<br />&nbsp; &nbsp; // Check if trading is allowed<br />&nbsp; &nbsp; if (IsTradingAllowed(tradingStartTime, tradingEndTime))<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; // Trading is allowed during these hours<br />&nbsp; &nbsp; &nbsp; &nbsp; Print(&quot;Trading is allowed. Current server time: &quot;, TimeToStr(GetCurrentServerTime(), TIME_DATE | TIME_MINUTES));<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; // Trading is not allowed outside these hours<br />&nbsp; &nbsp; &nbsp; &nbsp; Print(&quot;Trading is not allowed. Current server time: &quot;, TimeToStr(GetCurrentServerTime(), TIME_DATE | TIME_MINUTES));<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; return 0;<br />}</p><br /><p>Because, I&#039;m lacking of coding knowledge. I wanna make sure this code works in FSB pro. I willing to pay for the service pm me lets negotiate. Pardon my grammar second language. </p><div class="quotebox"><cite>SurfingWave wrote:</cite><blockquote><div class="quotebox"><cite>footon wrote:</cite><blockquote><p>No, indicators don&#039;t have access to position info, so it can&#039;t be done. You can though use N-bar Exit as a sort of workaround.</p></blockquote></div><p>Thanks! Will try your suggestions.</p></blockquote></div></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (footon)]]></author>
			<pubDate>Mon, 11 Dec 2023 17:55:01 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/77917/#p77917</guid>
		</item>
		<item>
			<title><![CDATA[Re: request a indicator that Exit at certain hours or minutes after trade]]></title>
			<link>https://forexsb.com/forum/post/77914/#p77914</link>
			<description><![CDATA[<p>Tried your suggestion fall short. </p><p>trade at certain time base on Server trade starts 8am to 1pm. </p><p>here my ChatGpT code: <br /></p><div class="codebox"><pre><code>// YourMainScriptOrIndicator.mq4
#include &quot;TradingTimeFunctions.mqh&quot;

// Trading hours in server time (in hours)
int tradingStartTime = 8;
int tradingEndTime = 13;

// The start function
int start()
{
    // Check if trading is allowed
    if (IsTradingAllowed(tradingStartTime, tradingEndTime))
    {
        // Trading is allowed during these hours
        Print(&quot;Trading is allowed. Current server time: &quot;, TimeToStr(GetCurrentServerTime(), TIME_DATE | TIME_MINUTES));
    }
    else
    {
        // Trading is not allowed outside these hours
        Print(&quot;Trading is not allowed. Current server time: &quot;, TimeToStr(GetCurrentServerTime(), TIME_DATE | TIME_MINUTES));
    }

    return 0;
}</code></pre></div><p>Because, I&#039;m lacking of coding knowledge. I wanna make sure this code works in FSB pro. I willing to pay for the service pm me lets negotiate. Pardon my grammar second language. </p><div class="quotebox"><cite>SurfingWave wrote:</cite><blockquote><div class="quotebox"><cite>footon wrote:</cite><blockquote><div class="quotebox"><cite>SurfingWave wrote:</cite><blockquote><p>Hi Footon</p><p>Would be possible to request a indicator that Exit at certain hours or minutes after the trade are made? </p><p>Thank!</p></blockquote></div><p>No, indicators don&#039;t have access to position info, so it can&#039;t be done. You can though use N-bar Exit as a sort of workaround.</p></blockquote></div><p>Thanks! Will try your suggestions.</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (SurfingWave)]]></author>
			<pubDate>Mon, 11 Dec 2023 16:22:17 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/77914/#p77914</guid>
		</item>
		<item>
			<title><![CDATA[Re: request a indicator that Exit at certain hours or minutes after trade]]></title>
			<link>https://forexsb.com/forum/post/77653/#p77653</link>
			<description><![CDATA[<div class="quotebox"><cite>footon wrote:</cite><blockquote><div class="quotebox"><cite>SurfingWave wrote:</cite><blockquote><p>Hi Footon</p><p>Would be possible to request a indicator that Exit at certain hours or minutes after the trade are made? </p><p>Thank!</p></blockquote></div><p>No, indicators don&#039;t have access to position info, so it can&#039;t be done. You can though use N-bar Exit as a sort of workaround.</p></blockquote></div><p>Thanks! Will try your suggestions.</p>]]></description>
			<author><![CDATA[null@example.com (SurfingWave)]]></author>
			<pubDate>Thu, 23 Nov 2023 02:25:32 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/77653/#p77653</guid>
		</item>
		<item>
			<title><![CDATA[Re: request a indicator that Exit at certain hours or minutes after trade]]></title>
			<link>https://forexsb.com/forum/post/77645/#p77645</link>
			<description><![CDATA[<div class="quotebox"><cite>SurfingWave wrote:</cite><blockquote><p>Hi Footon</p><p>Would be possible to request a indicator that Exit at certain hours or minutes after the trade are made? </p><p>Thank!</p></blockquote></div><p>No, indicators don&#039;t have access to position info, so it can&#039;t be done. You can though use N-bar Exit as a sort of workaround.</p>]]></description>
			<author><![CDATA[null@example.com (footon)]]></author>
			<pubDate>Wed, 22 Nov 2023 11:49:32 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/77645/#p77645</guid>
		</item>
		<item>
			<title><![CDATA[request a indicator that Exit at certain hours or minutes after trade]]></title>
			<link>https://forexsb.com/forum/post/77634/#p77634</link>
			<description><![CDATA[<p>Hi Footon</p><p>Would be possible to request a indicator that Exit at certain hours or minutes after the trade are made? </p><p>Thank!</p>]]></description>
			<author><![CDATA[null@example.com (SurfingWave)]]></author>
			<pubDate>Wed, 22 Nov 2023 07:14:11 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/77634/#p77634</guid>
		</item>
	</channel>
</rss>
