Real Time Data Now / Nest Trader to Amibroker, Fcharts

Open settings and keep Datadelay 15 secs. Download RTD_1.60 again and setup. It works much faster with VWAP table now.

Did as told by you.
However did one mistake while backfilling: In the field " Backfill gap from" I set time from 09.15.00 to 15.30.00 when I was backfilling around 11.15 AM. And what I got is the chart for entire day today. Dont know whats hapening. Please tell me how to get rid of this.

Vwap.png
 
Did as told by you.
However did one mistake while backfilling: In the field " Backfill gap from" I set time from 09.15.00 to 15.30.00 when I was backfilling around 11.15 AM. And what I got is the chart for entire day today. Dont know whats hapening. Please tell me how to get rid of this.
Remove the affected quotes and then Backfill again. There is always a second chance!
In AmiBroker select a Watchlist and store only the affected symbols whose quotes are needs to be deleted. Open a Notepad > Copy the below code and Paste it in the Notepad > Save it anywhere safe with a filename as you wish but with .js extension > Before you run this JavaScript, you need to make changes to the following variables:
1. filespec: Specify the path to the Watchlist of the affected symbols
2. DataDir: Specify the path to your Database
3. DeleteFrom: DateTime from which to Delete
4. DeleteTo: DateTime until which to Delete
Caution Do not change the DateTime format of DeleteFrom and DeleteTo. Just modify that is required to be modified. And DeleteTo must be always greater than DeleteFrom. Also Backup your DB before running the Script.

JavaScript:
//Before running the script, backup of the database is necessary to avoid any unexpected dataloss

filespec = "C:/Program Files/AmiBroker/My_Database_Name/WatchLists/My_Watchlist_containing_the_ruined_symbols.tls";
DataDir = "C:\\Program Files\\AmiBroker\\My_Database_Name";

var fso, watchlist, s, ForReading;
ForReading = 1, ForWriting = 2, s = "";
fso = new ActiveXObject( "Scripting.FileSystemObject" );
watchlist = fso.OpenTextFile( filespec, ForReading, false );

var oAB = new ActiveXObject( "Broker.Application" );
oAB.LoadDatabase( DataDir );

Shell = new ActiveXObject("WScript.Shell");

var oStocks = oAB.Stocks;
var Qty = oStocks.Count;
var DeleteFrom = new Date("November 02, 2018 00:00:00");
var DeleteTo = new Date("November 02, 2018 23:59:59");

var DayDeleteFromNum = Date.parse(DeleteFrom);
var DayDeleteToNum = Date.parse(DeleteTo);

file = fso.OpenTextFile( "_remowe_xdays.log", ForWriting, true );
file.WriteLine( "Starting delete quotes from date:" + DeleteFrom);
file.WriteLine( "" );

while( !watchlist.AtEndOfStream )
{
     s = watchlist.ReadLine( );
     for( i = 0; i < Qty; i++ )
     {
         oStock = oStocks( i );
         if( s == oStock.Ticker )
         {
             file.Write( i + ". " + oStock.Ticker + "=" );
             for ( j = oStock.Quotations.Count - 1; j >= 0; j-- )
             {
                tmpDateNum = Date.parse( oStock.Quotations( j ).Date );
                         if(tmpDateNum >= DayDeleteFromNum)
                         {
                                  if (tmpDateNum <= DayDeleteToNum)
                                  {
                                           oStock.Quotations.Remove( j );
                                  }
                         }
                         else
                         {
                                  break;
                         }
             }
             file.WriteLine( "OK" );
         }
     }
}
watchlist.Close( );
oAB.RefreshAll();
oAB.SaveDatabase( );

Shell.Popup( "Done!", 1.5 );
 
Last edited:
Did as told by you.
However did one mistake while backfilling: In the field " Backfill gap from" I set time from 09.15.00 to 15.30.00 when I was backfilling around 11.15 AM. And what I got is the chart for entire day today. Dont know whats hapening. Please tell me how to get rid of this.
;)
You got holiest of holy grail. Giving chart for full day in the morning itself.
 
Well deleted symbol and backfilled with DT again and worked. Its a great utility as it comes totall free. However I am facing only one issue with it, and would appreciate it greatly if someone using it can solve it: When I backfill using DT, the candles change after backfill, and backfill with VWAP doesnt work properly. I faced the same issue even with the earlier versions of NEST. Can somebody tell me a solution?

Regards
Krushna
 
Last edited:
I wrote multiple posts about this issue but no one posted any solution.
You will face this issue, on using v3.13 and above, on backfill with VWAP table or DT
 
I wrote multiple posts about this issue but no one posted any solution.
You will face this issue, on using v3.13 and above, on backfill with VWAP table or DT
Only thing I can guess is for majority it works well, but for few like us it doesnt for some unknown reasons even with the same settings.
 
Only thing I can guess is for majority it works well, but for few like us it doesnt for some unknown reasons even with the same settings.
No
The reason is real time quotes starts from 9.15.00. while the backfill using vwap table and DT of v 3.13 and above starts from 9.16.00,
I uses v3.11 for backfill and there is no distortion in candles, whatsoever
 

josh1

Well-Known Member
Remove the affected quotes and then Backfill again. There is always a second chance!
In AmiBroker select a Watchlist and store only the affected symbols whose quotes are needs to be deleted. Open a Notepad > Copy the below code and Paste it in the Notepad > Save it anywhere safe with a filename as you wish but with .js extension > Before you run this JavaScript, you need to make changes to the following variables:
1. filespec: Specify the path to the Watchlist of the affected symbols
2. DataDir: Specify the path to your Database
3. DeleteFrom: DateTime from which to Delete
4. DeleteTo: DateTime until which to Delete
Caution Do not change the DateTime format of DeleteFrom and DeleteTo. Just modify that is required to be modified. And DeleteTo must be always greater than DeleteFrom. Also Backup your DB before running the Script.

JavaScript:
//Before running the script, backup of the database is necessary to avoid any unexpected dataloss

filespec = "C:/Program Files/AmiBroker/My_Database_Name/WatchLists/My_Watchlist_containing_the_ruined_symbols.tls";
DataDir = "C:\\Program Files\\AmiBroker\\My_Database_Name";

var fso, watchlist, s, ForReading;
ForReading = 1, ForWriting = 2, s = "";
fso = new ActiveXObject( "Scripting.FileSystemObject" );
watchlist = fso.OpenTextFile( filespec, ForReading, false );

var oAB = new ActiveXObject( "Broker.Application" );
oAB.LoadDatabase( DataDir );

Shell = new ActiveXObject("WScript.Shell");

var oStocks = oAB.Stocks;
var Qty = oStocks.Count;
var DeleteFrom = new Date("November 02, 2018 00:00:00");
var DeleteTo = new Date("November 02, 2018 23:59:59");

var DayDeleteFromNum = Date.parse(DeleteFrom);
var DayDeleteToNum = Date.parse(DeleteTo);

file = fso.OpenTextFile( "_remowe_xdays.log", ForWriting, true );
file.WriteLine( "Starting delete quotes from date:" + DeleteFrom);
file.WriteLine( "" );

while( !watchlist.AtEndOfStream )
{
     s = watchlist.ReadLine( );
     for( i = 0; i < Qty; i++ )
     {
         oStock = oStocks( i );
         if( s == oStock.Ticker )
         {
             file.Write( i + ". " + oStock.Ticker + "=" );
             for ( j = oStock.Quotations.Count - 1; j >= 0; j-- )
             {
                tmpDateNum = Date.parse( oStock.Quotations( j ).Date );
                         if(tmpDateNum >= DayDeleteFromNum)
                         {
                                  if (tmpDateNum <= DayDeleteToNum)
                                  {
                                           oStock.Quotations.Remove( j );
                                  }
                         }
                         else
                         {
                                  break;
                         }
             }
             file.WriteLine( "OK" );
         }
     }
}
watchlist.Close( );
oAB.RefreshAll();
oAB.SaveDatabase( );

Shell.Popup( "Done!", 1.5 );
No need to go thru all this trouble. There is a delete facility in RTD. Just look at the symbol
Screenshot from 2018-11-05 20-48-33.png
in the middle of Main Menu. It will show you all symbols present in Amibroker. Delete which ever quotes you want.
 
Last edited:

Similar threads