<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Data-file parameter ignored]]></title>
		<link>https://forexsb.com/forum/topic/9440/datafile-parameter-ignored/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/9440/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Data-file parameter ignored.]]></description>
		<lastBuildDate>Thu, 11 May 2023 14:53:05 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Data-file parameter ignored]]></title>
			<link>https://forexsb.com/forum/post/74783/#p74783</link>
			<description><![CDATA[<p>I managed to run it only by making the commands a single-line string.</p><div class="codebox"><pre><code>$timeframes = &#039;M1&#039;, &#039;M5&#039;, &#039;M15&#039;

foreach ($timeframe in $timeframes) {

    $maxDataBars = switch ($timeframe) {
        &#039;M1&#039;  { 200000 }
        &#039;M5&#039;  {  55000 }
        &#039;M15&#039; {  35000 }
    }

    $datafile = &quot;.\data\Premium\EURUSD_${timeframe}.json&quot;

    $command  = &quot;node .\bin\gen.js --data-file $datafile --max-data-bars $maxDataBars&quot;

    start cmd -ArgumentList &quot;/k $command&quot;
}</code></pre></div><p><a href="https://image-holder.forexsb.com/store/xgen-powershell-script-test1.png"><span class="postimg"><img src="https://image-holder.forexsb.com/store/xgen-powershell-script-test1-thumb.png" alt="https://image-holder.forexsb.com/store/xgen-powershell-script-test1-thumb.png" /></span></a></p><br /><p>Note:</p><p>To make it possible to execute Powershell scripts run: <br /></p><div class="codebox"><pre><code>Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Thu, 11 May 2023 14:53:05 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/74783/#p74783</guid>
		</item>
		<item>
			<title><![CDATA[Re: Data-file parameter ignored]]></title>
			<link>https://forexsb.com/forum/post/74761/#p74761</link>
			<description><![CDATA[<p>I found the solution myself. By using the cmd prompt it&#039;s working also from PowerShell script. It doesn&#039;t matter if we use PowerShell or CMD for execution:<br /></p><div class="codebox"><pre><code>$timeframes = 1,5,15

foreach ($timeframe in $timeframes)
{
    
    $maxDataBars = switch ( $timeframe )
    {
        1  { 200000 }
        5  { 55000 }
        15 { 35000 }        
    }
    
    $datafile = &quot;.\mydata\${timeframe}.json&quot;        
    
    $command = &quot;node .\bin\gen.js `
               --settings .\forex.ini `
               --period = $timeframe `
               --data_file = $datafile `
               --max_data_bars = $maxDataBars&quot;

    start cmd -ArgumentList &quot;/k $command&quot;
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (felix-brenkel)]]></author>
			<pubDate>Wed, 10 May 2023 10:27:38 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/74761/#p74761</guid>
		</item>
		<item>
			<title><![CDATA[Data-file parameter ignored]]></title>
			<link>https://forexsb.com/forum/post/74757/#p74757</link>
			<description><![CDATA[<p>I have the problem, that the data-file parameter is ignored when I use it as a parameter in my PowerShell script:</p><div class="codebox"><pre><code>$timeframe = 5
$datafile = &quot;c:\express-generator\mydata\$timeframe.json&quot;      

start powershell {node .\bin\gen.js `
                  --settings .\forex.ini `
                  --period = $timeframe `
                  --data-file = $datafile `
                  --max_data_bars = 200000 `                  
                  ;Read-Host}</code></pre></div><p>This is giving me this error message:</p><div class="codebox"><pre><code>..:: Express Generator v2.26 ::..
Cannot read data file: C:\express-generator\data\1.json</code></pre></div><p>The seems to be a default file which is used.</p>]]></description>
			<author><![CDATA[null@example.com (felix-brenkel)]]></author>
			<pubDate>Wed, 10 May 2023 08:53:40 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/74757/#p74757</guid>
		</item>
	</channel>
</rss>
