Tuesday 17 October 2017

Trading Backtest Systemkalkulationstabelle


Auto Trade System Backtesting Einführung Wenn Sie die Tabellenkalkulation für Trading-Studien verwenden oder eine ACSIL-Studie (Advanced Custom Study and Interface Language) erstellt haben, die die ACSIL Trading-Funktionen verwendet, können Sie Back-Tests unter Verwendung von Trade Simulation durchführen Modus und Wiedergabe des Diagramms. Oder durch einen Bar Based Back Test. Um zu bewerten, wie Ihr Trading-System historisch durchgeführt wurde und um die historischen Trades für vergangene Daten zu sehen, ist es notwendig, einen Back-Test durchzuführen. Ein Bar Based Back Test verwendet die Open, High, Low, Close Daten der geladenen Chart Bars selbst, um das automatisierte Handelssystem zu bewerten. Diese Daten werden während des Backtests inkrementell zum Diagramm hinzugefügt. Diese Methode der Back-Testing ist schneller im Vergleich zu einem Replay Back Test, aber es ist weniger genau als ein Replay Back Test. Ein Replay Back Test verwendet die zugrunde liegenden Daten die Intraday-Datendatei, um das automatisierte Handelssystem auszuwerten. Diese zugrundeliegenden Daten haben einen Zeitrahmen pro Datensatz von 1 Tick bis 1 Minute (abhängig von verschiedenen Faktoren, einschließlich des verwendeten DataTrading-Dienstes, der verfügbaren historischen Daten und der Sierra Chart-Einstellungen). Es sind diese detaillierteren Daten in der Intraday-Datendatei, die dem Diagramm während des Back-Tests inkrementell hinzugefügt wird. Dies ist eine langsamere Methode der Back-Test im Vergleich zu einem Bar Based Back Test, aber es ist genauer. Bei beiden Methoden des Back-Tests kann ein vollständiger Trade Statistics-Bericht auf der Grundlage aller während des Back-Tests generierten Order-Fills betrachtet werden. Siehe Testergebnisse anzeigen. Bar Based Back Testing Unterstützt für Historical und Intraday Charts. Back-Tests an belasteten Balken ist ein Back-Testverfahren mit den Open-, High-, Low - und Close-Werten der geladenen Balken. Die zugrunde liegenden Daten in der Datendatei werden nicht direkt verwendet, sondern nur die geladenen Balken selbst. Dies führt in der Regel nicht so hohe Genauigkeit eines Back-Tests im Vergleich zu einem Replay Back Test. Allerdings ist es in der Regel schneller und die empfohlene Methode, wenn schnelle Back-Testing ist wichtig. Stellen Sie sicher, es gibt ein Häkchen von Trade gtgt Auto Trading Enabled, wenn es nicht bereits ein. Andernfalls wird das automatisierte Handelssystem keine Trades generieren. Trennen Sie die Verbindung zum Daten - und Handelsserver, wenn dies noch nicht geschieht, indem Sie Datei gtgt Disconnect wählen. Es ist nicht möglich, einen Bar Based Back Test durchzuführen, während er mit dem Daten - oder Handelsserver verbunden ist. Um einen High-Speed-Back-Test basierend auf geladenen Balken durchzuführen, wählen Sie Trade gtgt Autom. Sie werden aufgefordert, die Bar Processing Increment. Der Standardwert ist 250. Hier wird die Anzahl der Balken angegeben, die sofort verarbeitet werden, bevor die Benutzerschnittstelleneingabe verarbeitet wird. Das bedeutet, wenn Sie 250 angeben, dann werden 250 Bars auf einmal verarbeitet und dann wieder 250. Zwischen jedem dieser Blöcke können Sie den Back Test durch Drücken der Escape-Taste auf der Tastatur unterbrechen. Je größer die angegebene Nummer ist, desto länger dauert die Benutzung der Benutzeroberfläche. Um detaillierte Ergebnisse des Back-Tests anzuzeigen, lesen Sie den Abschnitt Back Testergebnisse anzeigen. Bar Based Back Testing Notes Die Studien werden in der Tabelle viermal für jede Bar berechnet. Für jeden Balken in der Tabelle werden die Studien zuerst mit dem Open-Preis, dann mit dem High und Low der Bar berechnet. Entweder wird das Hoch zuerst verwendet oder das Tief wird zuerst verwendet, abhängig von der bestimmten Richtung der Kursbewegung. Das Niedrige wird zuerst verwendet, wenn das Schließen der Leiste näher zum Hoch der Leiste ist. Der Hochwert wird zuerst verwendet, wenn die Naht der Leiste näher an dem Niedrigwert der Leiste ist oder die Naht einen gleichen Abstand zu dem Hoch und Niedrig hat. Schließlich wird der Close-Preis der Leiste verarbeitet. Die Füllpreise für Aufträge werden auf den Werten "Offen", "Hoch", "Niedrig" und "Schließen" oder innerhalb eines Häcksets von ihnen basieren, sofern es sich nicht um Aufträge handelt (nicht marktführende Aufträge, die nicht sofort füllen). Weitere Informationen finden Sie unter Wie Bestellungen gefüllt werden. Beachten Sie dies bei der Betrachtung der Füllpreise. Der Zeitstempel einer Auftragsfüllung ist die Startzeit der Leiste, in der die Auffüllung erfolgt ist. Es gibt nichts besonderes, was Sie brauchen, um mit der Entwicklung eines ACSIL-Handelssystems oder ein Spreadsheet-Handelssystem zu tun, wenn bar-basierte Back-Tests. Wenn Sie einen Handel am Ende der Bar machen wollen, wenn Ihre Regeln erfüllt sind, werden Sie wissen, dass Ihr System gegen den Schlusskurs ausgewertet wird, wenn Sie sehen, dass die sc. LastTradePrice. Im Falle eines ACSIL-Handelssystems, gleich dem Bar-Close-Wert oder innerhalb eines Tick-Wertes ist. Bar-basierte Back-Tests ist eine schnelle Methode der Back-Test, es sei denn, Sie benötigen hohe Präzision Tick Replay-basierte Back-Tests. Replay Back Testing - Automatisch Unterstützt nur für Intraday-Charts. In diesem Abschnitt wird beschrieben, wie Sie einen Back-Test durchführen, indem Sie den Befehl Trade gtgt Auto Trade System Replay Back Test verwenden. Dies vereinfacht die Durchführung eines Replay-basierten Backtests. Trennen Sie die Verbindung zum Daten-Feed, indem Sie im Menü Datei gtgt Disconnect wählen. Wählen Sie Diagramm gtgt Diagrammeinstellungen aus, und legen Sie die zu ladenden Tage auf die Anzahl der Tage fest, zu denen Sie den Backtest durchführen möchten. Drücke OK . Sobald dies gesetzt ist, muss es nicht erneut geändert werden. Stellen Sie sicher, es gibt ein Häkchen von Trade gtgt Auto Trading Enabled, wenn es nicht bereits ein. Andernfalls wird das automatisierte Handelssystem keine Trades generieren. Wählen Sie Trade gtgt Auto Trade System Replay Zurück Test im Menü. Dieser Befehl löscht alle simulierten Handelsdaten für das Chartsymbol und wiederholt das gesamte Diagramm von Beginn an mit hoher Geschwindigkeit. Sierra Chart ist während des Back-Tests belegt. Sie können die Back-Test aber durch Drücken der Stopp-Taste auf dem Chart Replay-Fenster zu stoppen. Sie haben die Möglichkeit, diese Taste alle paar Sekunden zu drücken. Um detaillierte Ergebnisse des Back-Tests anzuzeigen, lesen Sie den Abschnitt Back Testergebnisse anzeigen. Replay Back Testing - Manual Unterstützt nur für Intraday-Charts. Manuelle Backtests werden verwendet, wenn Sie den Back-Test mit einer langsameren Geschwindigkeit ausführen, um zu beobachten, was es tut, und es kann notwendig sein, diese Art von Back-Test verwenden, wenn Sie zurück testen ein Handelssystem, das mehrere Charts umfasst. Stellen Sie sicher, es gibt ein Häkchen von Trade gtgt Trade Simulation Mode On, wenn es nicht bereits ein. Allerdings wird Sierra Chart in diesem Modus sowieso platziert werden, wenn Sie einen Back-Test starten. Stellen Sie sicher, es gibt ein Häkchen von Trade gtgt Auto Trading Enabled, wenn es nicht bereits ein. Andernfalls wird das automatisierte Handelssystem keine Trades generieren. Wählen Sie Diagramm gtgt Replay Chart, um das Replay-Fenster anzuzeigen. Im Replay-Fenster wählen Sie Accurate Trading System Back Test Mode. Wenn Sie mehrere Diagramme in einem Handelssystem wiederholen möchten, das mehrere Diagramme verwendet, aktivieren Sie für alle Diagramme im Chartbuch im Replay-Fenster. Ansonsten muss diese Option deaktiviert sein. Weitere Informationen finden Sie unter Durchführen von Backtests auf einem Handelssystem, das mehrere Charts verwendet. Blättern Sie zu dem Punkt im Diagramm, an dem Sie den Back-Test starten möchten, und drücken Sie die Play-Taste im Replay-Fenster. Wenn die Wiedergabe gestartet wird, werden die aktuelle simulierte Handelsposition für das Symbol, falls vorhanden, die simulierten Aufträge für das Symbol, falls vorhanden, und alle simulierten Auftragsvorgänge für das Symbol gelöscht. Weitere Informationen finden Sie auf der Seite Wiedergebende Diagramme. Um detaillierte Ergebnisse des Back-Tests anzuzeigen, lesen Sie den Abschnitt Back Testergebnisse anzeigen. Durchführen von Backtests auf einem Handelssystem, das mehrere Charts verwendet Wenn Sie ein Handelssystem haben, das mehrere Charts umfasst, ist die Frage, ob Sie Replay oder BackTest nur das Diagramm, auf dem sich die Handelssystemstudie befindet, oder alle Charts, die die Handelssystem bezieht sich auf. Sie möchten alle Charts wiedergeben, die ein Handelssystem referenziert, indem Sie die Methode Replay Back Testing - Manuell verwenden, wenn Sie möchten, dass Ihr Handelssystem die Kurs - und Studienwerte aus Balken verwendet, die im Prozess der Bildung statt in der Studie stattfinden Und Preiswerte in den Quelldiagrammen, die vollständige und abschließende Werte aufweisen. Betrachten Sie zum Beispiel ein 5-minütiges Balken-Diagramm. In dem Quellendiagramm, auf das sich das Handelssystem bezieht, wird es, wenn es nicht zur gleichen Zeit wiedergegeben wird, vollständige 5-Minuten-Balken aufweisen. Wenn Sie es wiederholen, schrittweise über den Fünf-Minuten-Zeitrahmen, wird ein 5-Minuten-Bar zu bauen und die Studienwerte werden sich ändern. Wenn es wichtig ist, Barwerte und Studienwerte für Ihr Handelssystem zu ändern, und nur Sie diese Frage beantworten können, dann möchten Sie alle Charts wiedergeben, die das Handelssystem verwendet. Sie wollen nicht alle Charts wiederholen, die ein Handelssystem referenziert und stattdessen nur einen Backtest auf dem bestimmten Chart, auf dem das Handelssystem aktiviert ist, wiederholen oder durchführen, wenn es für Sie akzeptabel ist, vollständige und finalisierte Bar - und Studienwerte zu haben Im Quelldiagramm oder in den Diagrammen. Wenn ein Handelssystem Verweise auf andere Diagramme macht, muss es eine von zwei Methoden verwenden, um dies zu tun. Es muss die StudyPrice Overlay-Studie verwenden. Oder im Fall eines ACSIL-Handelssystems kann es Verweise auf andere Diagramme unter Verwendung der Methode, die auf dem Referenzieren anderer Zeitrahmen und Symbole bei der Verwendung der ACSIL-Seite dokumentiert wird, vornehmen. Wenn Sie das StudyPrice-Overlay verwenden, um Preis - oder Studiendaten auf das Diagramm zu legen, in dem das Handelssystem aktiviert ist und die Diagrammbalken auf Volumen, Anzahl der Trades, Range, Renko, Umkehrung, Delta-Volumen oder Preisänderungen basieren, benötigen Sie Um die Datenkopie-Modusstudie Input zu verwenden, um den frühesten Wert aus dem entsprechenden Zeitrahmen zu verwenden. Andernfalls werden in dem Fall, wenn das andere angezeigte Diagramm nicht wiedergegeben wird und nicht zeitlich auf das Zieldiagramm synchronisiert ist, Daten von dem letzten Strich in dem Diagramm, auf das verwiesen wird, für die gerade zurückgetestete aktuelle Leiste verwendet. Die referenzierten Daten wären also nicht korrekt. Wenn Sie mehrere Diagramme gleichzeitig wiederholen, um einen Rücktest durchzuführen, müssen Sie die Methode Replay Back Testing - Manual verwenden. Im Replay-Fenster müssen Sie die Option Für alle Charts im Chartbook aktivieren. Wählen Sie im Replay-Fenster die Option Accurate Trading System Zurück Testmodus oder Berechnen bei jedem TickTrade. Wenn Sie dies tun, wird ein synchronisierter Backtest durchgeführt. Für diesen Backtest-Typ empfiehlt es sich, die Verbindung zu den Daten - und Handelsservern zu trennen, indem Sie Datei gtgt Disconnect wählen. Bei einem synchronisierten Backtest wird die Abhängigkeit zwischen den Diagrammen bestimmt und die Berechnungen in der richtigen Reihenfolge durchgeführt. Das garantiert Konsistenz und Genauigkeit. Sie können jede Replay Speed ​​verwenden. Wenn Sie die synchronisierte Rücktestwiedergabe starten, werden Sie nach dem Zeitschrittinkrement gefragt, in dem der Rücktest durchgeführt werden soll (Eingabeverarbeitungsschritt in Sekunden). Die Voreinstellung ist 60 Sekunden. Je kleiner der Zeitrahmen, desto genauer der Back-Test, aber es dauert länger, um abzuschließen. Je größer der Zeitrahmen, desto schneller wird der Back-Test sein, aber er wird weniger genau sein. Die Genauigkeit hängt jedoch von dem Zeitrahmen der Quell - und Zieltabellen ab. Sie möchten nicht ein Zeitschrittinkrement verwenden, das länger ist als der Zeitrahmen der Balken, die am Handelssystem beteiligt sind. Sie können einen Zeitrahmen wählen, der ungefähr 25 der durchschnittlichen Stabzeitlänge ist. Anzeigen von Back-Testergebnissen Sie können detaillierte Ergebnisse Ihres Handelssystems anzeigen, indem Sie im Menü den Eintrag Trade gtgt Trade Activity Log gtgt Trade Statistics wählen. Wählen Sie am oberen Rand des Handelsaktivitätsprotokolls das Symbol, mit dem der Rücktest durchgeführt wurde. Sie müssen das Symbol auswählen, das SIM vor sich hat. Am oberen Rand des Handelsaktivitätsprotokolls müssen Sie Simuliert aus der Liste der Auftragsaktivitätsquellen auswählen, um die Auftrags - und Fülltätigkeit für den Rücktest anzuzeigen. Eine vollständige Anleitung finden Sie auf der Registerkarte Handelsstatistik. Es gibt viele Felder, die detaillierte Ergebnisse des Handels liefern. Für ein Trade by Trade-Protokoll wählen Sie Trade gtgt Trade Activity Log gtgt Trades aus dem Menü. Eine vollständige Anleitung finden Sie auf der Registerkarte Handel. Um die Auftragsabwicklung visuell auf dem Chart anzuzeigen, aktivieren Sie Trade gtgt Order Order Fills im Menü des Hauptfensters oder des Chartfensters. Um genau zu wissen, wann ein Auftrag gefüllt wurde, müssen Sie die Auftragsfüllungen auf dem Diagramm betrachten, anstatt die Pfeile anzuzeigen, die von einem Handelssystem auf dem Diagramm platziert werden, da diese Pfeile nicht notwendigerweise tatsächliche Aufträge darstellen und füllen. Weitere Informationen hierzu finden Sie unter Ignorierte Signale mit Spreadsheet-Systemen oder Alerts (dies gilt für das Spreadsheet-System für Handelsstudien). Verbesserung der Back-Test-Performance Es gibt einige Dinge, die getan werden können, um Back-Test-Performance zu verbessern. Die schnellste Back-Testing wird sein, wenn mit dem Bar Based Back Testing Back-Test-Methode. Im Fall der Verwendung der Spreadsheet-System für den Handel. Beziehen Sie sich auf die Verbesserung der Back-Test-Performance von Tabellenkalkulationssystemen zusätzlich zu den folgenden Punkten. Die Entwicklung eines automatisierten Trading-Systems mit dem Advanced Custom Study Interface und Sprache wird immer geben die beste Leistung im Vergleich zu mit Spreadsheets. Wenn Sie einen Wiederholungstyp des Rücktests ausführen, werden die Testtests im Vergleich zu höheren Zeitrahmendatensätzen in der Intraday-Datendatei langsamer, wenn die Daten in der Intraday-Diagrammdatendatei 1 Tick oder 1 Zweite Datensätze enthalten. Daher erhöhen Sie die globalen Einstellungen gtgt DataTrade Service-Einstellungen gtgt Intraday Data Storage Time Unit. Danach laden Sie die Intraday-Diagrammdaten erneut herunter, indem Sie in das Intraday-Diagramm wechseln und Bearbeiten gtgt Löschen Alle Daten und Herunterladen wählen. Dies muss nur einmal pro Symbol erfolgen. Dies wird dazu beitragen, die Zeit für Back-Tests. Das nächste, was zu überprüfen, um die Quelle der langsamen Rück-Tests zu bestimmen ist, entfernen Sie alle Studien aus dem Diagramm oder Diagrammen, die wiedergegeben werden, oder aus dem Diagramm ein barbasierter Backtest durchgeführt wird. Führen Sie den Rücktest erneut aus und sehen Sie, ob Sie bessere Leistung erhalten. Wenn ja, dann ist es eine jener speziellen Studien, die das Problem verursacht. Sie können dann Studien zurück allmählich eins nach dem anderen, um zu sehen, welche ist eine längere Zeit zu berechnen. Wenn eine benutzerdefinierte Studie ein Leistungsproblem verursacht, muss der Entwickler dieser Studie die Leistungsfähigkeit dieser Studie verbessern. Die benutzerdefinierte Studie muss sc. FreeDLL 0 im sc. SetDefaults-Codeblock setzen, um die Leistung zu verbessern. Verbesserung der Back-Test-Performance von Spreadsheet-Handelssystemen Im Falle der Verwendung der Spreadsheet-System für Trading-Studie, Back-Testing ist in der Regel nicht sehr schnell. Der Grund dafür ist, dass alle Diagrammdaten in ein separates Tabellenobjekt ausgegeben werden. Jedes Mal, wenn während des Back-Tests eine neue Leiste hinzugefügt wird, müssen alle Diagrammdaten erneut in die Tabelle eingefügt werden. Dies verursacht eine Menge von Berechnungen auftreten. Inhärent mit ACSIL ist viel schneller. Sie können jedoch die Leistung verbessern, indem Sie die folgenden Schritte ausführen. Schauen Sie sich Ihre Formeln in Zellen K-Z (letzte Formel Spalte bei Verwendung von 16 Formel Spalten). Bestimmen Sie, wie viele Zeilen der aktuellen Zeile 3 sie zurückverweisen. Wenn beispielsweise die Formeln nicht weiter als Zeile 12 referenzieren, muss die Spreadsheet-Studie nur 10 Zeilen von Daten an die Spreadsheet ausgeben. Reduzieren Sie die Anzahl der Zeilen, die im Fenster Studieneinstellungen für das Tabellenkalkulationssystem für Trading-Studie eingegeben werden, auf die erforderliche Mindestanzahl von Zeilen. Löschen Sie die Daten aus den Tabellenzeilen, die nun nicht mehr in der Tabellenkalkulation verwendet werden. Markieren Sie dazu die Zeilen, indem Sie die Zeilennummern auf der linken Seite des Tabellenblatts auswählen und die Löschtaste auf der Tastatur drücken oder die Option Spreadsheet gtgt löschen wählen. Entfernen Sie unbenutzte Tabellen in der Tabellenkalkulation. Wählen Sie oben links im Tabellenblatt das nicht verwendete Blatt aus, und wählen Sie Tabellenblatt gtgt Löschen. Wenn es auch eine Advanced Custom Study auf dem Diagramm, die Sie selbst entwickelt haben, stellen Sie sicher, dass es sc. FreeDLL auf 0 gesetzt ist. Dies ist wichtig für die Leistung. Führen Sie den Back-Test mit einer der auf dieser Seite beschriebenen Methoden durch. Der schnellste Backtest wird ein Bar Based Back Test sein. Unterschiede zwischen Back-Tests und Echtzeit-Auto Trade System Evaluation Die BuyEntry, BuyExit, SellEntry, SellExit Order Actions werden bewertet, wenn die Handelsstudie berechnet wird. Während der normalen Aktualisierung des Echtzeit-Diagramms erfolgt diese Berechnung im Diagramm-Aktualisierungsintervall, das unter Allgemeine Einstellungen gtgt Allgemeine Einstellungen festgelegt ist. Wenn jedoch das Chart-Aktualisierungsintervall abgelaufen ist, werden die Handelsstudien nur berechnet, wenn Daten aus dem Daten-Feed empfangen werden, oder es gibt neue Handelsaufträge oder Positionsdaten. Während eines Back-Tests gibt es definitive Regeln, die steuern, wenn Trading-Studien berechnet werden. Für einen Bar Based Back Test. Werden die Handelsstudien für jeden der Werte Open, High, Low, Close in der Leiste berechnet. Während eines Replay Back-Tests. Werden die Handelsstudien berechnet, wenn dem Diagramm eine neue Leiste hinzugefügt wird, und wenn die Daten über die Intraday-Diagrammdatendatei mit den High-, Low - und Close-Werten des letzten Balkens im Diagramm verarbeitet werden. Während der Echtzeitaktualisierung. Zwischen den Zeiten, in denen die Handelsstudien berechnet werden, die sich im Chartaktualisierungsintervall befinden. Gibt es möglicherweise mehr als ein Datensatz hinzugefügt, um das Diagramm. Dies trifft vor allem auf Häckchen durch Häkchen zu. Daher wird die Studie nicht bei jedem einzelnen Tick berechnet. Wenn Sie Ihre Order Actions während der Echtzeitaktualisierung so schnell wie möglich auswerten möchten, können Sie das Chart-Aktualisierungsintervall verringern. Wir empfehlen nicht, unter 50 bis 100 ms zu gehen. Der Punkt dieser Diskussion ist, dass es einige Inkonsistenzen zwischen einem Handelssystem, das in Echtzeit und während eines Back-Tests aufgrund der Bedingungen und Häufigkeit, wenn die Studien einschließlich der Handelsstudie berechnet werden. Sie haben die größte Übereinstimmung zwischen Back-Tests und Echtzeit-Auto Trade-System-Auswertung, wenn Sie einen replaybasierten Back-Test durchführen, indem Sie Tick-Daten ankreuzen. Um sicherzugehen, dass Sie in den Intraday-Datendokumenten über Tick-Daten verfügen, siehe Tick by Tick Data Configuration. Im Fall der Spreadsheet-System für Trading-Studie, wenn Sie Ihre Bedingungsformeln nur auf eine bar schließen auswerten möchten. Dann setzen Sie das entsprechende Signal nur auf einen Bar Close-Eingaben mit dem Spreadsheet-System für Trading-Studie auf Ja. Dies gibt Ihrem System größere Stabilität und nicht durch das Chart Update Interval betroffen sein. Im Fall eines ACSIL-Handelssystems sollten Sie sc. GetBarHasClosedStatus () verwenden. Im Falle eines Handelssystems, das mehrere Diagramme verwendet, während der Echtzeitaktualisierung von Diagrammen, um die Berechnungsreihenfolge der Diagramme basierend auf der Abhängigkeit zwischen ihnen zu steuern, müssen Sie die globalen Einstellungen aktivieren gtgt Allgemeine Einstellungen gtgt Verwenden Sie Kontrollierte Order Chartaktualisierung. Dies bietet eine höhere Konsistenz zwischen Back-Tests und Echtzeit-Handelssystem-Auswertung für Handelssysteme, die mehrere Charts verwenden. Back-Test - und Continuous-Futures-Kontraktcharts Es wird unterstützt, Back-Testing durchzuführen, wenn Sie eines der Chart gtgt-Diagrammeinstellungen gtgt Erweiterte Einstellungen gtgt Kontinuierliche Kontraktoptionen verwenden. Bei der Durchführung von Back-Tests in einem Continuous Futures-Kontraktdiagramm, obwohl die abgelaufenen Futures-Kontrakte in das Diagramm geladen werden, hat das Diagramm nur ein Symbol, das für den Handel verwendet wird, obwohl Sie Back-Testing über historische Daten sind. Die Trades sind also nach Ablauf der Vertragspreise, aber mit dem aktuellen Symbol angegeben. Daher sehen Sie nur ein Symbol, wenn Sie die Handelsergebnisse im Handelsaktivitätsprotokoll überprüfen. Konsistenz zwischen Backtests Wenn Sie Backtesting durchführen, müssen Sie eine der auf dieser Seite dokumentierten Methoden verwenden und den Vorgehensweisen folgen. Wenn Sie einen Replay-basierten Backtest durchführen, müssen Sie im Replay-Fenster den Accurate Trading System Back-Test-Modus auswählen, um Konsistenz zu erhalten, wenn Back-Test das gleiche automatisierte Handelssystem unter den gleichen Bedingungen. Während eines Backtests werden die Bid - und Ask-Preise aus den zugrunde liegenden Datensätzen in der Intraday-Datendatei festgelegt, wenn Sierra Chart über die zugrunde liegenden Datensätze für einen Replay-basierten Backtest oder die Bardaten für einen Bar Based Back Test verarbeitet Oder werden aus den Open High Low Close-Bardaten abgeleitet. Diese Bid - und Ask-Preise dienen dazu, die Aufträge, die von einem automatisierten Handelssystem eingereicht werden, auszufüllen. Es gibt immer eine Übereinstimmung mit der Einstellung der Bid - und Ask-Preise zwischen Back-Tests an den gleichen Diagrammdaten wie die Daten verarbeitet werden. Falls Ihr Trading-System zwischen den Back-Tests widersprüchliche Ergebnisse liefert, ohne irgendwelche Änderungen an den Chartdaten, den Charteinstellungen oder den Studieneinstellungen vorzunehmen, müssen Sie sich Ihre eigenen Handelssystem-Codeformeln für eine Ursache ansehen. Wenn Inkonsistenzen vorliegen, kann dies nur Ihrem eigenen Code zugeschrieben werden. Es ist sehr unwahrscheinlich, dass das Ergebnis davon ist, wie Sierra Chart den Rücktest verarbeitet. Inkonsistenzen zeigen, dass Ihr eigenes Handelssystem produziert inkonsistente Ergebnisse auf die Art, wie es konzipiert und funktioniert. Auch wenn Sie nicht bekommen ein konsistentes Ergebnis zwischen Back Tests, in der Regel bedeutet dies nicht unbedingt sehr viel, denn obwohl Sie vielleicht ein konsistentes Ergebnis sehen, jedes Mal, wenn Sie einen Back-Test, vorausgesetzt, dass Ihre Studie arbeitet konsequent und Sierra Chart tut Haben keine Kontrolle darüber, es ändert sich nicht die Tatsache, dass mit Live-Handel erhalten Sie noch ein anderes Ergebnis aus Ihrem Handelssystem. Versuchen Sie eine der Sierra Chart bereitgestellt Handelssysteme. Führen Sie es viele Male. Sie erhalten ein konsistentes Ergebnis jedes Mal. Wenn Sie ein konsistentes Ergebnis erhalten, jedes Mal, und mit Ihrem eigenen Handelssystem, das Sie nicht tun, dann beweist dies höchstwahrscheinlich das Inkonsistenz-Problem ist in Ihrem eigenen Handelssystem. Die Sierra Chart Beispiel Handelssysteme finden Sie in Analysis gtgt Studien gtgt Add Custom Study gtgt Sierra Chart Custom Studies und Beispiele gtgt Trading Beispiel:. Wenn Sie Back-Testing ein Handelssystem, die Wiederholung von mehreren Charts zur gleichen Zeit, dann ist dies etwas, was viel mehr Komplexität beinhaltet. Dies ist etwas zu beachten, wenn Sie Unstimmigkeiten zwischen Back Tests haben. Verwenden von Actual Bid und Ask-Preisen während des Back-Tests Sierra Chart unterstützt die Verwendung der tatsächlichen Bid - und Ask-Preise während eines Replay Based Back-Tests. Diese Bid - und Ask-Preise dienen dazu, Aufträge auszufüllen. Dies bietet eine sehr hohe Genauigkeit, wenn Back-Testing. Historische Bid - und Ask-Preise sind verfügbar, wenn Sie historische Daten der Sierra Chart Historical Data-Services verwenden. In den meisten Fällen wird dieser Dienst für historische Daten für Diagramme verwendet. Diese historischen Bid - und Ask-Preisdaten beginnen am 23. Juni 2014. Folgen Sie diesen Schritten, um die tatsächlichen Bid - und Ask-Preise während der Backtests zu verwenden. Setzen Sie Sierra Chart, um die Daten zu speichern, indem Sie ankreuzen. Siehe Tick by Tick Data Configuration. Dies ist ein wesentlicher Schritt. Führen Sie einen automatischen oder manuellen Replay Back Test durch. Es muss ein Replay Back Test sein. Letzte Änderung am Donnerstag, den 15. Dezember 2016.Spreadsheet-Systeme, Alarme und automatisierte Handel auf dieser Seite In den letzten Versionen von Sierra Chart haben wir Arbeitsmappe und Arbeitsblatt in Spreadsheet umbenannt. Die 3 Arbeitsblattstudien wurden jetzt umbenannt und beginnen mit dem Namen Spreadsheet. Worksheet Study wurde in Spreadsheet Study umbenannt. In dieser Dokumentation wird der Begriff Spreadsheet verwendet. In der Version von Sierra Chart, die ausgeführt wird, können Sie sich auf die Studiennamen beziehen, die mit dem alten Namen Worksheet beginnen. Allgemeine Informationen Die Spreadsheet SystemAlert-Studie und die Spreadsheet-System für Trading-Studie können verwendet werden, um ein Handelssystem oder eine Alert für Ihr Diagramm zu erstellen. Ein Handelssystem oder ein Alert bedeutet Regeln, die Sie definieren, die kaufen oder verkaufen Signale, wenn die Regeln für einen bestimmten Balken in der Tabelle wahr sind. Diese Signale werden als grafische Anzeigen auf dem Diagramm angezeigt, zeigen Warnhinweise und geben akustische Warnungen. Im Falle der Spreadsheet-System für Trading-Studie, werden auch tatsächliche Aufträge gegeben werden. Eine Warnung bezieht sich auf das Signal, das angegeben wird, wenn Ihre SystemAlert-Regeln auf der letzten Leiste wahr sind. All dies wird im folgenden genauer beschrieben. Wenn Sie nur daran interessiert sind, eine Warnung zu erhalten, wenn Ihre Bedingung am Ende des Diagramms zutrifft und Sie keine historischen grafischen Anzeigen auf dem Diagramm sehen müssen, dann können Sie in den meisten Fällen einfach die einfache Warnfunktion verwenden. Und nicht die Mühe mit den fortgeschrittenen Spreadsheet-Studien. Der Unterschied zwischen der Spreadsheet-System für Trading-Studie im Vergleich zu der Spreadsheet SystemAlert-Studie ist, dass die Spreadsheet-System für Trading-Studie hat viel erweiterte Logik für die Schaffung eines Handelssystems. Mit der Spreadsheet-System für Trading-Studie können Sie Back-Tests durchführen und generieren tatsächlichen Handel Signale, die entweder simuliert werden oder können an Ihren Handelsservice geschickt werden. Standardmäßig werden sie immer simuliert. Selbst wenn Sie nicht wirklich Live-Aufträge mit dem Spreadsheet-System für Trading-Studie platzieren möchten und nur ein System erstellen und es erneut testen möchten oder einfach nur Trades manuell von dort aus platzieren möchten, möchten Sie das Spreadsheet trotzdem verwenden System für Trading-Studie anstelle der Spreadsheet-SystemAlert-Studie. Wenn Sie einfach nur ein einfaches System oder einen erweiterten Alert erstellen möchten, um Ihnen einen Hinweis zu geben, wenn Ihre Regeln TRUE zurückgeben, dann möchten Sie die Spreadsheet SystemAlert-Studie verwenden. Das Erstellen einer SystemAlert wird durch die Eingabe einer Konditionsformel in die Formelspalten in der Kalkulationstabelle erreicht. Diese Bedingungsformel kann auf die Kurs - und Studiendaten zugreifen. Die Studiendaten werden standardmäßig beginnend bei Spalte AA ausgegeben und hängen von der Anzahl der Spalten für die Formelspalten ab. Diese Bedingungsformel wird über die gesamte Preisgrafik angewendet. Es wird kontinuierlich überwacht und kann auch gescannt werden (Sie sollten nicht automatisierten Handel von einem Scan). Diese Bedingungsformel wird verwendet, um anzuzeigen, wann eine bestimmte Bedingung für jede Diagrammsäulenleiste TRUE ist. Diese Indikationen werden verwendet, um ein Handelssystem oder eine Warnung zu erstellen. Es gibt keinen Unterschied zwischen der Art, wie Sierra Chart Systeme und Alerts macht. Beide geben grafische, textliche und hörbare Hinweise, wenn Ihre Bedingungsformel TRUE ist. Obgleich eine Textnachricht, ein hörbarer Ton und ein Handelszeichen im Fall der Spreadsheet System for Trading-Studie nur dann gegeben werden, wenn eine Bedingungsformel in der letzten Spalte der Tabelle TRUE zurückgibt. Auch wenn eine Bedingungsformel in der letzten Spalte der Tabelle WAHR ist, wird eine Markierung vor dem Studiennamen angezeigt und der Studienname wird rot markiert. Der Alarmmeldungstext und der akustische Alarmton stellen eine Warnmeldung dar. Im Fall der Spreadsheet-System für Handelsstudie werden ein Handelssignal und eine Warnung nicht unbedingt gegeben, wenn Ihre Bedingungsformel in einer der Spalten von BuySell EntryExit Formel in der letzten Spalte der Tabelle TRUE zurückgibt. Es gibt eine andere Logik, die angewandt wird und andere Bedingungen erfüllt werden müssen. All dies wird auf dieser Seite erklärt. Darüber hinaus wird in dem Fall der Tabelle Spreadsheet System for Trading, wenn Ihre Bedingungsformel in der letzten Spalte in dem Diagramm TRUE zurückgibt, ignoriert, wenn Daten in das Diagramm geladen werden oder wenn das Diagramm vollständig neu berechnet wird. Hierbei handelt es sich um Sicherheitsmethoden, die verhindern, dass Trades unbeabsichtigt gegeben wird, wenn Sierra Chart nicht im Handelssimulationsmodus ist. Sierra Chart stellt einen Textalarm für Ihre Bedingungsformel bereit, wenn er TRUE wird, indem Sie dem Alerts-Protokoll eine detaillierte Meldung hinzufügen. Um das Alarmprotokoll zu öffnen, wählen Sie Fenster gtgt Alerts Manager gtgt Alerts Anmelden im Menü. Wenn die Bedingung in einer anderen Tabellenspalte als der letzten Diagrammspalte TRUE ist, wird nur eine grafische Anzeige angegeben. Erstellen eines Systems oder Alerts Dieser Abschnitt gilt für die Spreadsheet-SystemAlert-Studie. Befolgen Sie die Schritt-für-Schritt-Tabellenkalkulation. Wenn Sie diese Anweisungen befolgen und den Schritt zum Hinzufügen der Studie zum Diagramm erhalten, stellen Sie sicher, dass Sie die Spreadsheet-Systemalert-Studie stattdessen hinzufügen. Wenn Sie zu dem Schritt gelangen, in dem Sie eine Formel eingeben, geben Sie stattdessen Ihre SystemAlert-Bedingungsformel ein. Weitere Informationen hierzu finden Sie im nachstehenden Beispiel-Beispiel: Spreadsheet-Systemalert-Bedingungsformeln. Im Fall der Spreadsheet SystemAlert-Studie wird die Formel aus dem Kalkulationstabelle im Hauptpreisgrafikbereich (Diagrammbereich 1) des Diagramms angezeigt und standardmäßig mit UpDown Arrow-Stilen gezeichnet. Der Zeichnungsstil kann durch die Untergrapheneinstellungen auf der Registerkarte "Untergraphen" des Fensters "Studieneinstellungen" für die Kalkulationstabelle "SystemAlert" geändert werden. Anweisungen hierzu finden Sie unter AddingModifying studies. Die Formeln auf dem Spreadsheet sollten entweder einen 1 (TRUE) oder 0 (FALSE) Wert zurückgeben. Ein Wert von 1 oder TRUE gibt an, dass die Bedingungen der SystemAlert-Formel erfüllt sind. Beispiel: Geben Sie ID0.SG43 lt 100 in Zeile 3 der Spalte K Formel ein, um einen Long-Eintrag-Alarm einzugeben, wenn der Schlusskurs kleiner als 100 ist. Long-Eintragspalte Die Spalte K ist die Spalte Long Entry. Wenn eine Zelle in dieser Spalte TRUE (1) ist, wird ein Aufwärtspfeil (abhängig vom Subgraph Draw Style) auf dem Chart mit dem niedrigen Wert des entsprechenden Balken gezeichnet, um einen Long-Eintrag für diesen Balken anzuzeigen. Long Exit Spalte Die Spalte L ist die Spalte Long Exit. Wenn eine Zelle in dieser Spalte TRUE (1) ist, wird ein Left Arrow (abhängig vom Subgraph Draw Style) auf dem Chart mit dem hohen Wert des entsprechenden Balken gezeichnet, um einen Long Exit für diesen Balken anzuzeigen. Kurze Erfassungsspalte Die Spalte M ist die Spalte Kurzeingabe. Wenn eine Zelle in dieser Spalte TRUE (1) ist, wird ein Downpfeil (abhängig vom Subgraph Draw Style) auf dem Chart mit dem hohen Wert des entsprechenden Balken gezeichnet, um einen Short-Eintrag anzuzeigen. Short Exit Spalte Die Spalte N ist die Spalte Short Exit. Wenn eine Zelle in dieser Spalte TRUE (1) ist, wird ein rechter Pfeil (abhängig vom Subgraph Draw Style) auf dem Diagramm mit dem niedrigen Wert der Leiste gezeichnet, um einen Short Exit anzuzeigen. Andere Spalten Wenn Sie andere Spalten als K. L M Oder N mit einem sichtbaren Zeichnungsstil, muss der Rückgabewert der Bedingungenformel innerhalb des Wertebereichs des Hauptpreisgraphen liegen, den Ihre Studie überlagert. Andernfalls wird die Anzeige des Diagramms nachteilig beeinflusst. Es gibt keine automatische Übersetzung von TRUE (1) oder FALSE (0) zu hohen und niedrigen Balkenwerten aus den Spalten O und höher. Eine Beispielformel, die Sie für Formelspalten O und höher verwenden können, ist IF (ID0.SG43 gt 100, C3, 0). Ändern der Spaltennamen Die oben genannten Spaltennamen der SystemAlert-Formel sind. Sie können die Spalten in Zeile 2 in der Tabelle umbenennen und für jede Art von Bedingung verwenden. Um eine Spalte umzubenennen, klicken Sie zweimal auf die Zelle mit dem Namen in Zeile 2 und geben einen neuen Namen ein. Steuern der Position von Pfeilen oder Untergraphenwerten Sie können in den SystemAlert-Bedingungsformeln auch andere Werte als TRUE (1) oder FALSE (0) zurückgeben. If the value returned by the formula is not TRUE (1) or FALSE (0), then the arrow will be drawn at the value the formula returns when using columns K . L . M . or N when using the Spreadsheet SystemAlert study. For formula columns O and higher, the Subgraph arrows or whatever the Draw Style is, will always be drawn at the value returned from the formula. When you are using the Spreadsheet SystemAlert study, you are able to scan for TRUE results from your System or Alert condition formulas among a list of symbols. For more information, refer to the Scan Menu commands documentation. Creating a Trading System for Automated Trading Halting Order Entry If you are using the Spreadsheet System for Trading study on a Live account and sending orders to the connected Trading service, and you wish to halt order entry for any reason, you can do any of the following: Enable Trade Simulation Mode by making sure that there is a check mark by Trade gtgt Trade Simulation Mode On . Set the Send Orders To Trade Service input with the Spreadsheet System for Trading study to NO . Set the Disable Auto Trading cell on the Sheet in the Spreadsheet used by the Spreadsheet System for Trading study, to TRUE. Disable the Trade gtgt Auto Trading Enabled command. Steps To Create a Trading System for Automated Trading First make certain that auto trading is enabled. Make certain there is a checkmark by Trade gtgt Auto Trading Enabled on the menu. Make sure there is a check mark by Trade gtgt Trade Simulation Mode On on the menu. This is so that orders will not be sent to your trading service. Instead all trades will be simulated. Additionally, the Send Orders To Trade Service input with the Spreadsheet System for Trading study must be set to No . This also prevents the orders from being sent to the connected Trading service. With these two settings, there are two layers of protection against sending actual orders. For complete details, refer to SendOrdersToTradeService. Go to an open chart or open a chart with File gtgt Find Symbol . Enable Trade gtgt Chart Trade Mode . Select Trade gtgt Attach Trade Window to Chart . When chart trading mode is activated on a chart, you will see the Orders and the Position from your automated trading system displayed on the chart. By attaching the Trade Window to the chart, you will have a complete trading control panel available to take any manual actions that you require and to set Attached Orders. More details can be found in the Chart Trading documentation. Select Analysis gtgt Studies on the menu. Select Spreadsheet System for Trading in the Studies Available list on the left. Do not confuse this study with the Spreadsheet Study or the Spreadsheet SystemAlert studies. Press the Add button to add the Spreadsheet System for Trading study to the Studies to Graph list. For this example, also add the study named Moving Average-Simple . You do not need to change the settings for this study, the defaults are acceptable. We will create a system that will Buy when the current price moves above a moving average and Sell when the current price moves below a moving average. This is only intended as an example in these instructions. This is not necessarily a practical trading system for actual use. If you want to make a system different than this example by using other studies, add them to the chart now if you have not already added them. Adjust the settings as you require them for each study. Highlight the Spreadsheet System for Trading study in the Studies to Graph list box. Press the Settings button. In the Technical Study Settings window on the Settings And Inputs tab, there is a text box for the Spreadsheet Name (lower left). Enter a name in the text box without a file extension. This is the name of the Spreadsheet that will be opened or created to contain the data and formulas. The name should be related to what your custom system will do. To have the orders sent to the Sierra Chart internal Trade Simulation system, the Send Orders To Trade Service input needs to be set to No . To send order signals to the connected Trading service, the Send Orders To Trade Service input needs to be set to Yes and you also need to disable Trade gtgt Trade Simulation Mode On on the menu. For complete details, refer to SendOrdersToTradeService . In the Input list, you will find in input named Maximum Position Allowed in Same Direction . Set this input as you require. It is the maximum Position in shares or contracts that is allowed. The other inputs are correct as they are for this example. For more information about all of the inputs, refer to Inputs That Are Specific to Systems, Alerts, and Automated Trading . In the list of available study Inputs you will see inputs named Column K-Z Alert . Set these to the Alert Sound Number you want to hear when your SystemAlert Condition Formula in the corresponding column becomes TRUE at the last bar. For more information, refer to Sound for Audible Alert and E-Mail Message Notifications . Press the OK button on the Technical Study Settings window. Press the OK button on the Chart Studies window. The Spreadsheet will be opened in the background. Go to it by selecting CW on the menu. The name of the spreadsheet will be listed and can be selected. The name will be what you have specified in the Study Settings window for the study. A Spreadsheet contains multiple Sheets . The Sheet number the data is outputted to, is the same Sheet number as the chart number. For example, chart 2 will be outputted to Sheet2 in the Spreadsheet. The Sheet can be selected with the list box at the top left of the Spreadsheet. All of the individual chart studies are also outputted to the same Sheet beginning at column AA (the default when using 16 formula columns). Select the Sheet from the list box at the top left of the Spreadsheet window that corresponds to the Chart Number that contains the Spreadsheet System for Trading study. Set the cell J26 ( Order Quantity ) to the number of shares or contracts you want to trade when an order is sent. This can also be set to 0 and the Order Quantity will be determined from the chart Trade Window. All new orders use the settings of the Trade Window for the chart. Go to the chart that contains the Spreadsheet System for Trading study. Select Trade gtgt Open Trade Window for Chart to see what the settings are set to. For example, if the Time in Force is set to Day . all new orders submitted from the Spreadsheet will automatically have a Time in Force of Day. The settings that you can set in the Trade Window also include Attached Orders. For complete instructions for Attached Orders, refer to the Attached Orders page. The following steps provide an example of a trading system using Spreadsheet formulas. Buy Entry and Sell Entry formulas are given. To Buy when the Last price crosses from below the moving average, type in cell K3 (labeled: Buy Entry ):CROSSFROMBELOW( ID0.SG43:ID0.SG44, ID2.SG13:ID2.SG14) Where ID0.SG43:ID0.SG44 refers to the current and previous last trade prices of the chart bars and ID2.SG13:ID2.SG14 refers to the current and previous Moving Average - Simple study values which are located in column AA . In all places in the example formulas on this page, ID2 may need to be changed to the actual ID number used by the Moving Average study. You can see the actual ID number in row 1 in the column that the study is outputted to. Refer to the image below: You can also optionally use: AND( CROSSFROMBELOW( ID0.SG43:ID0.SG44, ID2.SG13:ID2.SG14), J80) J8 is the current Trade Position quantity. This can be used to check the Position is flat before entering the market. The underlying automated trading logic checks this, but it can be checked in your formula to avoid unnecessary messages to the Trade gtgt Trade Service Log . The disadvantage is that you cannot see on the chart your historical buy and sell signal arrows without running a back test. For an understanding of references like ID2.SG43. refer to References to Study Subgraph Columns when using the Spreadsheet Study . To Sell when the Last price crosses from above the moving average, type in cell M3 (labeled: Sell Entry ):CROSSFROMABOVE( ID0.SG43:ID0.SG44, ID2.SG13:ID2.SG14) Where ID0.SG43:ID0.SG44 refers to the current and previous last trade prices of the chart bars and ID2.SG13:ID2.SG14 refers to the current and previous Moving Average - Simple values which are located in column AA . You can also optionally use: AND( CROSSFROMBELOW( ID0.SG43:ID0.SG44, ID2.SG13:ID2.SG14), J80) J8 is the current Trade Position quantity. This can be used to check the Position is flat before entering the market. The underlying automated trading logic checks this, but it can be checked in your formula to avoid unnecessary messages to the Trade gtgt Trade Service Log . The disadvantage is that you cannot see on the chart your historical buy and sell signal arrows without running a back test. Using these formulas, when the Last price crosses from below the moving average, K3 ( Buy Entry ) will trigger a Buy order, and when the Last price crosses from above the moving average, M3 ( Sell Entry ) will trigger a Sell order. By default, only one order can be sent until a corresponding Exit signal is given. Therefore, if there has already been a Buy Entry, then all other Buy Entry signals are ignored until the Buy Exit formula becomes TRUE and triggers a Sell or the Position is flattened by another method. If there has already been a Sell Entry, then all other Sell Entry signals are ignored until the Sell Exit formula becomes TRUE and triggers a Buy or the Short Position is flattened by another method. This behavior is controlled with the Allow Multiple Entries In Same Direction Input. If the Allow Opposite Entry with Opposing Position or Orders Input is set to Yes . which is the default, then if there currently is a Long Position, then a Sell Entry can exit that Position. The same with a Short Position and Buy Entry. If you have multiple conditions for your trading system, then you will need to use the AND() function. For example, if you have a RSI (Relative Strength Index) study on the chart and the data is outputted to column AC on the Sheet, and you want to combine that with the Moving Average study, use a formula similar to this for the Buy Entry: AND( CROSSFROMBELOW( ID0.SG43:ID0.SG44, ID2.SG13:ID2.SG14), ID3.SG13 lt 40). ID3.SG13 references the RSI study assuming it has a study ID of 3. For further information, refer to References to Study Subgraph Columns when using the Spreadsheet Study . In this example we will create a Buy Exit (Sell) that exits a Position when a Stop or Target value is reached. A Buy Exit is optional. A Sell Entry could close out a Position created by a Buy Entry . Or, the Position can be closed out manually or with an Attached Order. In this example, we are using a Buy Exit formula to show you an exit strategy managed completely by the Spreadsheet System for Trading study. In cell L3 (labeled: Buy Exit ), type OR( AND( J8 gt 0, ID0.SG43 lt J9-1), AND( J8 gt 0, ID0.SG43 gt J92)). ID0.SG43 refers to the Last price of the most recent chart bar, J8 refers to the current Position Quantity, and J9 refers to the current Position Average Price. When this formula in cell L3 returns TRUE, it will trigger a Sell order. What this formula means is that when there is a Long Position AND the last price is less than the price the Buy Entry was filled at minus 1 full point (Stop), OR there is a Long Position AND the last price is greater than the price the Buy Entry was filled at plus 2 full points (Limit), then return TRUE. This will cause a Sell order to be placed. This is just an example and you need to use what is appropriate in your specific case. Hinweis . It is essential that the formula contains a check that there is a Position gt 0. This is explained in more detail in the Buy Exit section. The means a cell reference refers to an absolute cell and the column and row will not be adjusted when the formula is automatically filled down. This formula is relevant only to the topmost row in the Spreadsheet (corresponds to the last bar in the chart), even though it is applied to historical bars as well. Refer to the Special Spreadsheet Outputted Values section for more information on the data in the J column. When entering numbers and formulas, keep in mind to use the proper delimiters in the numbers and formulas, according to the Global Settings gtgt Spreadsheet Settings gtgt Decimal and Function Delimiters setting. For more information, refer to the Decimal and Function Delimiters section. In this example we will create a Sell Exit (Buy) that exits a Position when a Stop or Target is reached. A Sell Exit is optional. A Buy Entry could close out a Position created by a Sell Entry . Or, the Position can be closed out manually or with an Attached Order. In this example, we are using a Sell Exit to show you an exit strategy managed completely by the Spreadsheet System for Trading study. In cell N3 (labeled: Sell Exit), type OR( AND( J8 lt 0, ID0.SG43 gt J91), AND( J8 lt 0, ID0.SG43 lt J9-2)). ID0.SG43 refers to the Last price of the most recent chart bar, J8 refers to the Position Quantity, and J9 refers to the Position Average Price. When this formula in cell N3 returns TRUE, it will send a Buy order. What this formula means is that when there is a short Position AND the last price is greater than the price the Sell Entry was filled at plus 1 full point (Stop), OR there is a short Position AND the last price is less than the price the Sell Entry was filled at minus 2 full points (Limit), then return TRUE. This will cause a Buy order to be placed. This is just an example and you need to use what is appropriate in your specific case. Hinweis . It is essential that the formula contains a check that there is a Position lt 0. This is explained in more detail in the Sell Exit section. The means a cell reference refers to an absolute cell and the column and row will not be adjusted when the formula is filled down. This formula is relevant only to the topmost row in the Spreadsheet (corresponds to the last bar in the chart), even though it is applied to historical bars as well. Refer to the Special Spreadsheet Outputted Values section for more information on the data in the J column. NOTE: In the case of actual live trading, these Stops and Targets are sent by Sierra Chart to the connected trading service when the conditions are met. This is necessary in order to accomplish advanced exit strategies. Although these are not advanced exit strategies, we demonstrate how you can do advanced exit strategies. In order for an order to be placed as fast as possible, it is a good idea to make sure the Chart Update Interval . which is set through Global Settings gtgt General Settings on the menu, is set to 1000 milliseconds or less. However, avoid making it very small unless your computer is very fast. You can also use Attached Orders for exiting a Position. Refer to Initiating Trades with Auto-Trading and Using Manual or Attached Orders Exits . Now that we have entered the Spreadsheet formulas on the Spreadsheet, it is necessary to go back to the chart. Select Window on the menu and select the chart that you applied the Spreadsheet System for Trading study to, or select it from the chart window tabs which are located at either the top or bottom of the main window. To ensure the formulas that have been entered are fully copied down the formula columns on the Spreadsheet, select Chart gtgt Recalculate on the menu. Refer to the buy and sell arrows on the chart. These arrows represent the TRUE values returned from the Buy Entry and Sell Entry Condition Formulas in the formula columns. By default the Subgraph Draw Style for the Exit columns (L and N) are set to Hidden . so they do not appear. In this example, we use exits which are based upon Position data which is only known for the current Position . so the BuySell arrows are not relevant historically. If your exits were based upon the price andor study data, then you could set the corresponding Exit columns to a visible Draw Style. Make certain there is a check mark by Trade gtgt Auto Trading Enabled so the TRUE results that your Condition Formulas provide, will be processed as trades. As the chart is updated, either with real-time streaming data received from the connected data feed, or during a replay, the Buy and Sell Entry and Exit signals will cause Trade orders to be generated and processed. These signals also produce alert messages and these can be viewed by selecting Window gtgt ShowHide Alerts Manager gtgt Alerts Log on the menu. To view your Trade orders, select Trade gtgt Trade Activity Log on the menu. To view the Trade Service Log, select Trade gtgt Trade Service Log on the menu. The Trade Service Log displays ignored signals from your Condition Formulas. The next step is to simply watch your system perform in real-time as your chart is updated or replay your chart to perform Back Testing. Back testing through replays is a very good way to test your system on historical data and get a good feel for it. To go from simulated trading to non-simulated (Live) trading, follow the instructions in Going From Simulated Trading to Non-Simulated (Live) Trading . Going From Simulated Trading to Non-Simulated (Live) Trading If and when you are ready to have your trading system submit real orders, you will need to go to non-simulated mode by making sure there is no check mark by Trade gtgt Trade Simulation Mode On . Next, go to the Study Settings for the Spreadsheet System for Trading study on your chart and set the Send Orders To Trade Service input to Yes . At this time any trading signals given will be sent as orders to your Trading service, assuming you are connected to a valid Trading service and you are connected to the Data and Trade server ( File gtgt Connect to Data Feed ). Keep in mind that if you are using a simulated account with your Trading service, then even though you are not in Sierra Chart Trade Simulation Mode and Send Orders To Trade Service is set to Yes, the orders will still be simulated. Sound for Audible Alert and E-Mail Message Notifications You can specify an alert sound to be played when the System or Alert condition in cells K3 through Z3 become TRUE. For the formulas in the Sheet to trigger sound alerts requires enabling them. Go to the Study Settings window for your Spreadsheet Study . For instructions, refer to Modifying Studies. Keep in mind, that after a Spreadsheet Study is applied to a chart it changes its name in the Studies to Graph list on the Chart Studies window to the name of the Spreadsheet file it references. On the Settings and Inputs tab of the Study Settings window you will see a list of all of the available study Inputs. You will see several inputs named Column K, L,M, N,O, P,Q, R,S, T,U, V-Z Alert that will let you select the Alert Sound Number to be used for each column. Select the Alert Sound Number that you want to use, or select No Alert to not play an alert sound when a formula becomes TRUE in cells K3 through Z3. Sheet columns W through Z use the same alert sound number as column V. To set the sound file that plays for each alert number, select Global Settings gtgt General Settings on the menu. You can also setup an email message to be sent when an alert sound is triggered. If the Draw Style for a Sheet column is set to Ignore . then no System or Alert signals can be triggered by the Sheet formulas. However, this does not apply to column K through N when using the Spreadsheet System for Trading study. With that study, Trade signals can always be triggered by the Sheet formulas regardless of the Draw Style setting. Initiating Trades with Auto-Trading and Using Manual or Attached Orders Exits It is not necessary to use the Buy Exit or Sell Exit Order Action formula cells in the Spreadsheet System for Trading study to exit a current Position. Exits can be done by manually entering an order through the Trade Window. through Chart Trading. or can be performed by using the Attached Orders feature (Targets and Stops). In any of these cases, you can then optionally leave the Buy Exit or Sell Exit Order Action formula cells blank. Targets and Stops are configured through the Trade Window on the Targets tab. For complete documentation, refer to the Attached Orders page. When using Attached Orders, make sure that Use Attached Orders is enabled on the Trade Window for the chart containing the Spreadsheet System for Trading study. Refer to Opening Trade Window for Chart to open the Trade Window. The set of Attached Orders which is entered on the Trade Window for a chart is saved when a Chartbook is saved. Orders that are given by the Buy Exit or Sell Exit Order Action formula cells will not use the Attached Orders configured in the Trade Window. Only Buy Entry and Sell Entry will use them when Use Attached Orders is enabled on the Trade Window. When you are using the automated trading functionality in Sierra Chart, it is recommended that you always enter and cancel any manual orders from within Sierra Chart to avoid any unexpected auto trade issues due to Sierra Chart not being aware of the Orders and Trade Position changes you do from other trading programs. For additional information about using Attached Orders with an automated trading system, refer to SupportAttachedOrdersForTrading. Using Both Attached Orders and Buy Exit and Sell Exit at the Same Time It is possible to define a set of Attached Orders to use with your Spreadsheet System for Trading study and also use the BuySell Exit columns at the same time. For this to work properly, you need to set Cancel All Working Orders On Exit input to Yes . Trade Window Order Quantity with Attached Orders When you are using Attached Orders with a Spreadsheet System for Trading study, then the Order Quantity on the Trade Window will change to the current Order Quantity specified on the Spreadsheet. This is because the Attached Orders are defined through the Trade Window Targets tab, and it is necessary to update the quantity of the Trade Window to match the order quantity from the trading system in order for the Attached Orders to have a matching quantity. For more information about setting the Order Quantity for the Spreadsheet System for Trading study, refer to Cell J26 (Order Quantity) . Automated Advanced Exit Strategies You may want to enter a Position manually and then have an automated Position exit based upon certain technical conditions which can be based upon the price and study data. This is accomplished by using the Spreadsheet System for Trading study. Refer to the Creating a Trading System for Automated Trading instructions on this page to use this study and define your exit conditions. The study will need to be applied to a chart of the same symbol that you are trading. When you use the Spreadsheet System for Trading study for this purpose, you will not use the Buy Entry and Sell Entry Order Action columns. These columns need to be left blank. Any steps in the instructions associated with them can be skipped. You will only use the Buy Exit and Sell Exit Order Action columns. Spreadsheet System for Trading study Inputs related to Buy Entry and Sell Entry will not apply for your automated exit strategy. When either the Buy Exit or Sell Exit Order Action columns become TRUE, an order will be submitted at that time. This can be any of the order types supported by the Spreadsheet System for Trading study. Only when your Exit condition is met, will the order be submitted, not before. Therefore, it is not possible to submit a Stop or Limit order ahead of time and modify it. Therefore, Sierra Chart needs to be running to monitor your current Position and submit the orders. It is possible to use the ACSIL Trading functions and modify an order that has been submitted. Spreadsheet Study Inputs that are Specific to Systems, Alerts, and Automated Trading This section lists Inputs for the Spreadsheet Studies which are specific to the Spreadsheet System for Trading and the Spreadsheet SystemAlert studies. These inputs can only be set through the Study Settings window for the Spreadsheet studies. For the other available Spreadsheet Study Inputs which are set through the Study Settings window, refer to the Spreadsheet Study Inputs page. A Read-only display of these Study Inputs is displayed on the Spreadsheet Sheet that the chart data is outputted to, in cell columns I and J . It is not possible to modify the value of these Inputs through the Sheet cells. They can only be set through the Study Settings window for the Spreadsheet study. Reset Condition On New Bar If this option is set to Yes . then a system or alert signal will be given when a new bar is added to the chart and the SystemAlert condition is TRUE at row 3 even though the SystemAlert condition was previously TRUE on the prior barrow. Normally, when a formula returns TRUE or a nonzero value in one of the Spreadsheet columns used for systems or alerts and a new bar is added, a new signal will not be given even if it still TRUE. It will have to go back to FALSE and then back to TRUE again, unless this input is set to Yes. AlertSignal Only Once per Bar If the AlertSignal Only Once Per Bar option is set to Yes . then an alert or trading signal will be given only once per Formula Column per bar in the chart. When an alert or trading is given once for a specific Spreadsheet Formula Column, then another will not be given until there is a new bar in the chart and the SystemAlert Condition Formula goes back to FALSE and then to TRUE. This applies to each formula column independently. For example, in the case of the Spreadsheet System for Trading study, if there is a Buy Entry at a particular bar, there can still be a Buy Exit given at the same bar. However, there cannot be 2 Buy Entries on the same bar when this option is enabled. It is recommended that if you have any trouble obtaining a trading signal when you normally would expect one, that you try setting this option to No . In the case of the Spreadsheet System for Trading study, when a signal is ignored because of this option, that ignored signal will be logged in the Trade gtgt Trade Service Log . This is very helpful for troubleshooting purposes. The message is: Signal ignored because Signal Only Once Per Bar is enabled and a signal was already given from formula column for bar. Allow Multiple Entries In Same Direction This input applies only to the Spreadsheet System for Trading study. Refer to the description on the Auto Trade Management page. Signal Only on Bar Close The Signal Only on Bar Close Inputs are specific to the Spreadsheet System for Trading study and the Spreadsheet SystemAlert study. There are two versions of this input, one for Sheet columns K and M and the other for columns L . N-Z . When this input is set to Yes . Sheet formulas that return a non-zero (TRUE) value at row 3 in the corresponding formula columns are ignored until the last bar closes. The way this is accomplished is row 4 is monitored instead of row 3. When this input is set to Yes . then anywhere in the documentation row 3 is mentioned, it is row 4 instead. In the same way that row 3 is continuously monitored for TRUE results from formulas in the corresponding formula columns, row 4 will be continuously monitored when this input is set to Yes. You may want to set Strict Signal Only On Bar Close Evaluation to Yes, when you set one of these inputs to Yes. There is one scenario that you should keep in mind about when using Signal Only on Bar Close . Consider you have a formula and one of the Sheet formula columns and it returns TRUE at row 3 (the last bar of the chart) in the column. You refer to the arrow on the chart. A new bar is added, the bar therefore is considered closed, the formula moves down to row 4, it is no longer TRUE and the arrow disappears. In this case when you are using Signal Only on Bar Close. you will not get a signal. Strict Signal Only On Bar Close Evaluation The Strict Signal Only On Bar Close Evaluation input applies a stricter method of evaluation when you have either of the Signal Only on Bar Close inputs set to Yes. When this input is set to Yes, then only at the moment when a bar closes when one or more new bars are added to the chart, will an evaluation of your Spreadsheet formulas from the corresponding Spreadsheet columns ( K . M . L . N-Z ) be evaluated for TRUE conditions. When this input is set to Yes, row 4 will not be continuously monitored as usual, only exactly at the moment when a bar closes and the chart is updated. Use Chase Orders This input only applies to the Spreadsheet System for Trading study. When this input is set to Yes and you have enabled limit orders for a particular BuySell column, then the limit order will be submitted as a Limit Chase Order. The chase amount is set through the J46 cell labelled Maximum Chase Amount for Limit Chase Orders . Enhanced Auto Trade Signal Related Logging This Input when set to Yes . will log additional messages indicating the reason why an order signal is ignored from formula columns K, L, M, N at rows 3 and 4 when using the Spreadsheet System for Trading study. This is helpful to troubleshoot problems with ignored signals. Set this Input to Yes only for a short period of time and only when necessary because it generates a large amount of messages and can create a very heavy and unnecessary CPU load when doing back testing to the point where a tick by tick back test becomes next to impossible to complete and extremely burdensome. BuyEntry (K), BuyExit (L), SellEntry (M), SellExit (N) Spreadsheet Order Action Columns The following Spreadsheet Order Action Columns only apply to the Spreadsheet System for Trading study. Note: For all of the below Order Actions: When an order is submitted, an Alert Sound will also be played if you selected an Alert Sound for the corresponding Spreadsheet column in the Input Settings in the Study Settings window. An alert message will also be added to the Window gtgt Alerts Manager gtgt Alerts Log . Buy Entry (column K) When your Condition Formula in row 3 of column K on the Spreadsheet returns a nonzero value or TRUE, then a Buy order will be given if certain conditions are met. For complete details, refer to the Auto Trade Management page. Buy Exit (column L) When your Condition Formula in row 3 of column L on the Spreadsheet returns a nonzero value or TRUE, then a Sell order will be given if certain conditions are met. For complete details, refer to the Auto Trade Management page. You need to code into your Exit formulas by using the AND() Spreadsheet function, a check that there is a Trade Position Quantity. An example would be: OR(AND(J8 gt 0, ID0.SG43 lt J9-1), AND(J8 gt 0, ID0.SG43 gt J92)). The reference to cell J8 refers to the current Trade Position Quantity . The dollar signs in J8 mean it is an absolute Spreadsheet reference. In the case of a Buy Exit formula, you must to check to make certain there is a long Trade Position by making certain that J8 is gt than 0. The purpose of this is so that the formula remains FALSE until such time that a Trade Position can be exited. Otherwise, the formula could become TRUE on a bar and give a signal even before there is a Trade Position. In this case it will be ignored as it should be. However, if it remains TRUE and then later on that very same bar or a different bar, when there finally is a Trade Position, there will no longer be an Exit signal because the prior TRUE state was already ignored and the formula remains TRUE and not giving a new signal. Sell Entry (column M) When your Condition Formula in row 3 of column M on the Spreadsheet returns a nonzero value or TRUE, then a Sell order will be given if certain conditions are met. For complete details, refer to the Auto Trade Management page. Sell Exit (column N) When your Condition Formula in row 3 of column N on the Spreadsheet returns a nonzero value or TRUE, then a Buy order will be given if certain conditions are met. For complete details, refer to the Auto Trade Management page. You need to code into your Exit formulas by using the AND() Spreadsheet function, a check that there is a Trade Position Quantity. An example would be: OR(AND(J8 lt 0, ID0.SG43 gt J91), AND(J8 lt 0, ID0.SG43 lt J9-2)). The reference to cell J8 refers to the current Trade Position Quantity . The dollar signs in J8 mean it is an absolute Spreadsheet reference. In the case of a Sell Exit formula, you must to check to make certain there is a short Trade Position by making certain that J8 is lt than 0. The purpose of this is so that the formula remains FALSE until such time that a Trade Position can be exited. Otherwise, the formula could become TRUE on a bar and give a signal even before there is a Trade Position. In this case it will be ignored as it should be. However, if it remains TRUE and then later on that very same bar or a different bar, when there finally is a Trade Position, there will no longer be an Exit signal because the prior TRUE state was already ignored and the formula remains TRUE and not giving a new signal. Ignored Signals With Spreadsheet Systems or Alerts Introduction There are many cases in which a Buy or Sell signal from the Entry and Exit formula columns (K, L, M, N) will be ignored. When a signal is ignored from a formula that returns a nonzero number or TRUE, then there will be no Alert Sound played, Alert Message logged, or a Trade Order sent . This section explains all of this. Enabling Auto Trading If Trade gtgt Auto Trading Enabled is unchecked, then Buy and Sell trade order signals from the Spreadsheet System for Trading study will be ignored. In this case you will see messages added to the Trade gtgt Trade Service Log indicating this. The Send Orders to Trade Service study Input setting needs to be set consistently with the Trade gtgt Trade Simulation Mode On setting on the menu. If it is not, then Buy and Sell trade order signals from the Spreadsheet System for Trading study will be ignored. In this case you will see messages added to the Trade gtgt Trade Service Log indicating this. For complete details, refer to SendOrdersToTradeService. Ignored Signals During Historical Data Downloading With the Spreadsheet System for Trading study and the Spreadsheet SystemAlert study, System and Alert signals from the Sheet formula columns are ignored on historical data and when historical data is being downloaded. They are monitored for when the chart is actually updating with new data. A chart will be updating with new data during real-time chart updating with live data, during replays, or during a Back Test. If you want to see the Back Test results from historical Buy and Sell signals from the BuySell formula columns in the case of when using the Spreadsheet System for Trading study, then refer to the Back Testing section. BuySell Arrows Do Not Mean Trade Signals When using the Spreadsheet System for Trading study and a formula returns TRUE in the Buy Entry (K3), Buy Exit (L3), Sell Entry (M3), or Sell Exit (N3) cell, a trade signal is not necessarily going to be given. You will see an arrow on the chart indicating a buy or sell signal, assuming the corresponding Subgraph Draw Style is set to a visible style. However, this does not necessarily mean that the formula TRUE result will be followed and a trade signal will be given. The BuyEntry (K), BuyExit (L), SellEntry (M), SellExit (N) Spreadsheet Order Action Columns rules must be met and the additional conditions imposed by the related study Input Settings must be met, for a trade signal to be actually given. If one is ignored, then a message will be added to the Trade gtgt Trade Service Log indicating the reason. Review the Trade Service Log for the reason. To see on the chart the actual filled orders from trades made, refer to Displaying Filled Orders. Reset Condition on New Bar When using either the Spreadsheet System for Trading or Spreadsheet SystemAlert studies, the TRUE signals given from cells K3 through Z3 may not always be followed and give an alert or trade signal, even though they still return TRUE or a non zero value and an arrow shows on the chart. If a cell is TRUE and there is a new bar added to the chart and the cell continues to be TRUE, because the state is already TRUE, you will not get a new signal unless the input Reset Condition on New Bar is set to Yes. Signal Only Once per Bar If a TRUE signal has been given by the formula in a particular cell and then it goes back to FALSE and back to TRUE on the same bar, you will not get a signal if the study Input Signal Only Once Per Bar is set to Yes . Signal Only on Bar Close If you have the Signal Only On Bar Close (Column K, M) input set to Yes, then a TRUE signal will be ignored on cells K3 and M3, and only the cells K4 and M4 will be monitored for signals. Likewise with the Signal Only On Bar Close (Column L, N-Z) input. In the case of when either Signal Only Once per Bar and Signal Only on Bar Close study Inputs have been set to Yes . when a signal is ignored by these restrictions, there is no message added to the Trade Service Log or the Alerts Log . except in the case of the Spreadsheet System for Trading study when the signal has been ignored as the result of Signal Only Once Per Bar being set to Yes . Troubleshooting In order to troubleshoot a problem with ignored signals, we recommend setting both of the Signal Only On Bar Close Inputs to No . Detailed logging can also be enabled which will add reasons for ignored signals in all cases . to the Trade gtgt Trade Service Log . When using the Spreadsheet System for Trading study, set the Enhanced Auto Trade Signal Related Logging Input to Yes . When using the Spreadsheet SystemAlert study, set the Enhanced System Signal Related Logging Input to Yes . Only set these Inputs to Yes when absolutely necessary because they will add a very large number of messages to the Trade Service Log and can cause Sierra Chart to be nonresponsive at times. SystemAlerts and Draw Style In the case of the Spreadsheet SystemAlert study, if the Draw Style for a Spreadsheet column is set to Ignore . then System or Alert signals in that column will be ignored. Nonzero Trade Position Quantity In the case of the Buy Exit or Sell Exit Order Action columns when using the Spreadsheet System for Trading study, if a BuySell Exit formula is TRUE and remains TRUE before there is a nonzero Trade Position Quantity and then a nonzero Trade Position Quantity later exists, then the Exit will be ignored it until it goes back to FALSE and then to TRUE. Therefore, you need to program the formula to remain FALSE until there is a Trade Position Quantity. This can be done by using the AND function and checking that cell J5 is nonzero. Delayed TRUE Result from Formulas Another thing to also consider is that you may see an arrow on the chart from one of the Order Action formula column cells indicating TRUE, but it is on the bar prior to the last bar in the chart and it appeared after a new bar was added to the chart. Therefore, unless the corresponding Signal Only On Bar Close Input is set to Yes, then that TRUE result going to be ignored as well. You cannot make an assumption that when you see a 1TRUE in a cell, that at the moment the cell is evaluated for an orderalert signal that the 1TRUE was present at that time. It may have been 0 and could have went to 1 quickly after. Spreadsheet System for Trading Test Procedure To get an understanding of how the TRUE signals in K3, L3, M3, N3 are processed follow the test procedures on the Spreadsheet System for Trading Test Procedure page. After you go through this test procedure, and you are still having difficulty troubleshooting your Spreadsheet System for Trading study implementation, we recommend changing the formulas to simple TRUE1 values temporarily during a replay just like explained in the test procedure, and then gradually add to the complexity of them until you can determine the source of the problem. Disappearing Arrows or Signals When using either the Spreadsheet System for Trading study or the Spreadsheet SystemAlert study, when a formula in a cell in one of the Spreadsheet columns that is graphed on the chart, typically this is going to be Spreadsheet columns K, L, M, N, returns a nonzero or TRUE value, you will see an arrow on the corresponding bar on the chart representing the TRUE condition. You also need to make certain that the Draw Style for the particular Spreadsheet formula column you want to see arrows for, is set to one of the Arrow UpDownLeftRight Draw Styles or other similar style. These TRUE formula signals can trigger an Alert Sound as well and also a Trade signal (in the case of the Spreadsheet System for Trading study) if these signals are given in row 3, or row 4 if have set the study Input Signal Only On Bar Close (Columns K, M)(Columns L, N-Z) to Yes . If the formula no longer is returning a nonzero or TRUE value and instead returning FALSE (0), then the arrow will disappear even though the Alert and the Trade signal was previously given. So it is important to understand that your formula could go to TRUE momentarily and then FALSE. In summary, the standard Up and Down arrows on a chart displayed by these Spreadsheet studies, indicate the present state of the formulas. During the formation of a bar or after new bars are added to the chart, a formula could go from TRUE to FALSE based upon the logic of the formula and changing data in the cells that it references. It is up to you to determine specifically what is happening and why. To actually see where the trades were made, you need to display Order Fills on the chart. If you are using the Spreadsheet System for Trading study and you wish to visibly see where trades have been made on the chart in the case of when the arrows on the chart disappear, then enable Trade gtgt Show Order Fills . Various options affecting the display of order fills can be set by enabling Trade gtgt Chart Trade Settings on the menu. When a cell that can trigger an Alert Sound or Trade signal becomes TRUE and an Alert Sound andor a Trade signal is actually given, then an alert message will be added to the Window gtgt ShowHide Alerts Manager gtgt Alerts Log . All of these events are logged in the Alerts Log tab. Not only can you experience the condition where the arrows disappear, you could also have the condition where the state of your formulas change, based upon how they are programmed and the data they are referencing, and you see an arrow later appear on a bar where a signal was not previously given when it was evaluated for an alert or trade signal. You may also see that the arrow direction does not correspond to an order fill displayed on a bar due to changes with the formula results during processing of a bar. For example, initially a bar may have given a Buy signal, a Buy fill is displayed on the chart for the bar, but then later the bar gives a Sell signal which is ignored based upon the auto trade logic. So at the present moment you see a Down Arrow, but a Buy fill for the bar. In order to create more stability when it comes to generating orders when using the Spreadsheet System for Trading study, you may want to set the Signal Only On Bar Close (Columns K, M) (Columns L, N-Z) input to Yes. All of what is described in this section is something that you need to be aware of when you are looking at the final results of your trading system and comparing them to the current FALSETRUE state of the Spreadsheet formulas that you visually see at the present moment. The Effect of the Number of Rows Input The Number of Rows input with the Spreadsheet studies, affects the standard Up and Down arrows displayed on a chart by the Spreadsheet studies. You will need to increase this input value to see arrows going back more bars. Arrows that were placed on bars further back than the Number of Rows input during real-time updating and chart replays, can disappear, or if they have not been removed because there has not been a full recalculation of the study, they may no longer be valid. Special Spreadsheet Outputted Values The Spreadsheet studies will output additional values in the I and J Spreadsheet columns for information and calculation purposes. This is in addition to the main price graph data outputted to columns A through G and the study data outputted beginning at column AA. The following is a list of all the additional values that are outputted. Special Spreadsheet System for Trading Values These values are outputted for the Spreadsheet System for Trading study only. These values can be used in Spreadsheet formulas. Below is a description of what each Row means. Working Orders Quantity Cell J3 This is the combined quantity for all the Working orders for the chart symbol. This is positive for Buy orders and negative for Sell orders. If there is one Buy working order with a quantity of 5, it will be 5. If there is one Buy order and one Sell order, each with the same quantity, it will be 0. Position with Working Orders Quantity Cell J4 This is the Position quantity combined with the quantities from Working orders. BuyEntry and SellEntry depend on this number to determine whether or not another entry should be allowed. For more information, refer to Trade Positions. Position Quantity Cell J5 or J8 Cells J5 and J8 contain the Quantity of the current Trade Position for the chart symbol. This Quantity can either be a quantity from the Trade Simulation Mode system or the quantity from the external trading service. This depends upon whether the Spreadsheet System for Trading study is in Simulation Mode or not. For instructions to control this, refer to Going From Simulated Trading to Non-Simulated (Live) Trading . This value can be negative (a Short quantity) or positive (a Long quantity). Both of these cells, J5 or J8, contain the same Position data and either one can be used. In the case of a Trade Position Quantity when in Trade Simulation Mode, for information about how that is determined, refer to Simulated Trade Positions. For information about non-simulated Trade Positions, refer to Trade Positions Tab. Position with Working Exit Orders Quantity Cell J6 This is the Position quantity for the symbol combined with the quantity of working orders that can potentially exit the current Position. Therefore, if the Position quantity is 5 and there is a Sell order with a quantity of 4, this will be 1. For more information, refer to Trade Positions . Prior Position Quantity Cell J7 The Prior Position Quantity cell indicates the Position Quantity right before a new order fill is processed. If a trade order fills with multiple fills, then this field will be updated for each of those fills. Prior Position Quantity is calculated using the available order fill data in the Trade gtgt Trade Activity Log gtgt Trade Activity tab for the symbol. The Global Settings gtgt General Trade Settings gtgt Number of Days to Save in Trade Activity Log controls how many days of data are saved in the log. You may need to adjust that to meet your requirements. Position Average Price Cell J9 This is the average of the fill prices of the currently open Trade Position for the Symbol and Trade Account the chart is set to. For more information, refer to Trade Positions . Open ProfitLoss Cell J10 This is the profit or loss of the currently open Trade Position for the Symbol and Trade Account the chart is set to. For more information, refer to Trade Positions . This value is outputted as a Currency Value. Refer to Position ProfitLoss for the calculation method for Currency Value . Cumulative Closed ProfitLoss Cell J11 This is the profit or loss of the closed out trades for the Symbol and Trade Account the chart is set to and is based upon the available order fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . This value is outputted as a Currency Value. Refer to Position ProfitLoss for the calculation method for Currency Value . If the order fills from Trades made, are not available in the Trade Activity Log, then the Cumulative Closed ProfitLoss value will not consider those trades. The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . To reset this value, you will need to clear the order fill data from the Trade Activity Log for the Symbol and Trade Account. For instructions to do this, refer to Clearing Trade Activity Log. The order fill data for replays and back tests, when you initiate a replay or back test will be automatically cleared. At that time you will receive a prompt to clear this data. When you press Yes, the data will be automatically cleared and therefore the Cumulative Closed ProfitLoss will be reset back to 0. Maximum Open Position Profit Cell J31 The Maximum Open Position Profit is what the maximum profit of the current Position has been. This is reset whenever the Position Quantity changes. For more information, refer to Trade Positions . Maximum Open Position Loss Cell J32 The Maximum Open Position Loss is what the maximum loss of the current Position has been. This is reset whenever the Position Quantity changes. For more information, refer to Trade Positions . Win Trades Cell J33 The total number of winning trades based upon the available fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . A winning trade is defined as a trade that reduces or closes out a Position while the Open ProfitLoss is positive or flat. The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . Lose Trades Cell J34 The total number of losing trades based upon the available fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . A losing trade is defined as a trade that reduces or closes out a Position while the Open ProfitLoss is negative. The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . Total Trades Cell J35 The total number of closed trades based upon the available fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . A trade is defined as a trade that reduces or closes out a Position. This is going to be an individual fill. Not necessarily an entire order. The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . Seconds Per Bar - Intraday (read-only) Cell J36 This cell contains the number of seconds that the chart bars are set to ( Chartgtgt Chart Settings ). This will always be a nonzero number. Even when one of the Number of Trades Per Bar, Volume Per Bar, Range Per Bar cells are nonzero. Number of Trades Per Bar - Intraday (read-only) Cell J37 The cell contains the number of trades per bar setting in Chartgtgt Chart Settings . It will be zero if the chart bars are not set to be based upon a number of trades. Volume Per Bar - Intraday (read-only) Cell J38 The cell contains the volume per bar setting in Chartgtgt Chart Settings . It will be zero if the chart bars are not set to be based upon a specified volume. Range Per Bar (in ticks) - Intraday (read-only) Cell J39 The cell contains the range per bar setting in Chartgtgt Chart Settings . It will be zero if the chart bars are not set to be based upon a specified price range. Symbol Cell J40 The cell contains the symbol of the chart. In the case where a Trade and Current Quote Symbol is set on the chart, that symbol will be returned. Last Bar End DateTime Cell J41 This cell contains the latest date and time of the last bar in the chart in a Serial DateTime format. This number can be used for various comparisons within formulas that are based on times. To ensure you see this value formatted as a Date-Time, right-click on the cell and select Number Format from the menu or Spreadsheet gtgt Number Format . Change the Number Format to Date-Time . This cell data is outputted with all of the Spreadsheet studies. Last Entry Trade Date-Time Cell J42 This cell displays a number that represents the Date and Time of the bar at which the last Entry trade was triggered and processed. This number can be used for various comparisons within formulas that are based on times. This data is maintained by the internal Trades list in the chart. Last Exit Trade Date-Time Cell J43 This cell displays a number that represents the Date and Time of the bar at which the last Exit trade was triggered and processed. This number can be used for various comparisons within formulas that are based on times. This data is maintained by the internal Trades list in the chart. Last Trade ProfitLoss Cell J44 This is the Profit or Loss of the last completed trade for the symbol. This uses a Fill to Fill order fill grouping method for Trades. This is calculated from the order fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . Closed Daily ProfitLoss Cell J45 This is the Profit or Loss of Trades made that have been closed during the day for the symbol. This uses a Fill to Fill order fill grouping method for Trades. This is calculated from the order fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . By default it resets at midnight according to the Time Zone setting in Sierra Chart. The reset time can be changed through Global Settings gtgt General Trade Settings gtgt Daily Stats Reset Time . Trade Service Account Balance Cell J47 This is the current cash balance for the selected Trade Account on the Trade Window for the chart when not in Trade Simulation Mode. This data is from the external connected Trading service. Not all Trading services provide this data. This is not a simulated account balance. To select the Trade Account on the Trade Window for the chart, refer to Selecting Trade Account . Last Entry Fill Price Cell J48 This cell displays the fill price of the order for the last Entry trade. If your trading system is in simulation mode, then this data is from a simulated order. Otherwise, it is from a non-simulated order. This data is maintained by the internal Trades list in the chart. Last Exit Fill Price Cell J49 This cell displays the fill price of the order for the last Exit trade. If your trading system is in simulation mode, then this data is from a simulated order. Otherwise, it is from a non-simulated order. This data is maintained by the internal Trades list in the chart. Daily Win Trades Cell J50 This the number of trades that have completed and had a profit or were breakeven during the trading day. This uses a Fill to Fill order fill grouping method for Trades. This is calculated from the order fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . By default this field reset at midnight according to the Time Zone setting in Sierra Chart. The reset time can be changed through Global Settings gtgt General Trade Settings gtgt Daily Stats Reset Time . Daily Lose Trades Cell J51 This the number of trades that have completed and had a loss during the trading day. This uses a Fill to Fill order fill grouping method for Trades. This is calculated from the order fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . By default this field resets at midnight according to the Time Zone setting in Sierra Chart. The reset time can be changed through Global Settings gtgt General Trade Settings gtgt Daily Stats Reset Time . Daily Total Trades Cell J52 This the number of Trades that have completed during the trading day. This uses a Fill to Fill order fill grouping method for Trades. This is calculated from the order fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . By default this field resets at midnight according to the Time Zone setting in Sierra Chart. The reset time can be changed through Global Settings gtgt General Trade Settings gtgt Daily Stats Reset Time . This field can be used to limit the number of automated trades during the trading day. For example, in the Disable Auto Trading (J28) cell, enter the following: J52 1. This will limit your automated trading to 1 trade per day. Daily Total Quantity Filled Cell J53 This is the total quantity of the order fill quantities for the trading day. For example, if you have a buy order fill during the trading day of quantity 5 and a sell order fill of quantity 5, then this will be 10, assuming these are the only 2 fills during the trading day. This is calculated from the order fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . By default this field resets at midnight according to the Time Zone setting in Sierra Chart. The reset time can be changed through Global Settings gtgt General Trade Settings gtgt Daily Stats Reset Time . Daily Number of Long Trades Cell J54 This the number of Long Trades that have completed during the trading day. This uses a Fill to Fill order fill grouping method for Trades. This is calculated from the order fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . By default this field resets at midnight according to the Time Zone setting in Sierra Chart. The reset time can be changed through Global Settings gtgt General Trade Settings gtgt Daily Stats Reset Time . Daily Number of Short Trades Cell J55 This the number of Short Trades that have completed during the trading day. This uses a Fill to Fill order fill grouping method for Trades. This is calculated from the order fill data in Trade gtgt Trade Activity Log gtgt Trade Activity . The number of days saved in the Trade Activity Log is set through Global Settings gtgt General Trade Settings . By default this field resets at midnight according to the Time Zone setting in Sierra Chart. The reset time can be changed through Global Settings gtgt General Trade Settings gtgt Daily Stats Reset Time . Current Quote Values Cells J12 through J20 Cells J12 through J20 display the Current Quote Values for the chart symbol. These are always displayed on the Spreadsheet used by the Spreadsheet System for Trading study, and will only be displayed if the Output Current Quote Data input is set to Yes for the other Spreadsheet studies. The Daily Open, Daily High, Daily Low, Daily Net (Daily Price Change), and Daily Volume are only going to be set when connected to the data feed ( File gtgt Connect to Data Feed ) and the associated chart is not replaying. Otherwise, they will be 0. The data that you see is the same data displayed in Window gtgt Current Quote Window . The Current Quote Window contains the daily quote data for the symbol of the active chart. Tick Size Cell J21 This cell contains the Tick Size of the symbol. This is the minimum increment that the symbol trades in. This data is outputted for all of the Spreadsheet studies. Special Spreadsheet Trading Inputs on the Spreadsheet The following is a list of special Spreadsheet inputs in columns I and J used by the Spreadsheet System for Trading study. These are actual inputs that will use the values you type into the corresponding row in the J column. Limit or Stop Prices J22, J23, J24, J25 Cells J22 through J25 allow you to set the Limit or Stop order prices for each of the 4 different Spreadsheet Order Actions. These apply when you have set to use a Limit or Stop order for a particular Order Action in cells J71 through J74. Refer to Buy Entry: Order Type J71. You are able to set a Limit or Stop price to either the Bid or Ask prices by using these formulas: J12 (Bid price) or J14 (Ask Price). This allows you to buy at the Bid or sell at the Ask respectively. Order Quantity J26 Cell J26 controls the Order Quantity for orders that are submitted from the Spreadsheet System for Trading study. This quantity can be dynamically controlled by a formula. If the cell is empty or 0, the Order Quantity will be set to 1 for Buy Entry and Sell Entry . If the cell is empty or 0 during a Buy Exit or Sell Exit . then the quantity is determined by the automated trading logic and the end result will be that the Trade Position for the Symbol and Trade Account is flattened. Negative order quantities are converted to positive numbers. Use Separate Exit Order Quantity J82 When this cell is set to TRUE or a nonzero value, then a Buy Exit or Sell Exit Order Action will use the quantity specified by the Exit Order Quantity J83 cell. Exit Order Quantity J83 This cell is only used when Use Separate Exit Order Quantity J82 is set to TRUE or a nonzero value. This cell controls the Order Quantity for Buy Exit or Sell Exit Order Actions from the Spreadsheet System for Trading study. This quantity can be dynamically controlled by a formula. If the cell is empty or 0 during a Buy Exit or Sell Exit . then the quantity is determined by the automated trading logic and the end result is that the Trade Position for the Symbol and Trade Account the automated trading system is for will be flattened. Negative order quantities are converted to positive numbers. Maximum Chase Amount for Limit Chase Orders Cell J46 This cell is used to specify the maximum chase amount for limit chase orders. For more information, refer to the Use Chase Orders input. Cancel Working Orders J27 Cell J27 allows you to cancel all working orders for the Symbol and Trade Account of the chart that the Spreadsheet System for Trading study is currently applied to. Setting this cell to TRUE or any non-zero number (such as 1 ) will trigger the canceling of orders. You can also input a formula into this cell to cancel all working orders when certain conditions are met. The canceling of orders occurs before any of the Entry and Exit signal cells are evaluated. However, these cancellations in the case of non-simulated trading do take time to occur and they will be pending during the evaluation of the Entry and Exit signal cells. When this cell is set to a nonzero or TRUE value, additional cancellations will not occur until it is set back to zero or FALSE and then back to a nonzero or TRUE value. If you wish to cancel working orders at a specific time, then you can use a formula like this: (J41-INT(J41)) gt TIMEVALUE(16:15:00). This example will return TRUE when the time is 16:15 or greater. Cell J41 is the latest time in the last bar in the chart. It is best to use that cell, since NOW() always refers to the current time, and that will not work during back testing. Cancel All Orders except working Attached Orders J78 Cell J78 allows you to cancel all working orders except for working Attached Orders for the Symbol and Trade Account of the chart that the Spreadsheet System for Trading study is currently applied to. Attached Orders that have a Pending Child - ClientServer status will still be canceled. Only Attached Orders that have an OpenPending OpenPending Modify status will not be canceled. Setting this cell to TRUE or any non-zero number (such as 1 ) will trigger the canceling of orders. You can also input a formula into this cell to cancel all working orders when certain conditions are met. The canceling of orders occurs before any of the Entry and Exit signal cells are evaluated. However, these cancellations in the case of non-simulated trading do take time to occur and they will be pending during the evaluation of the Entry and Exit signal cells. When this cell is set to a nonzero or TRUE value, additional cancellations will not occur until it is set back to zero or FALSE and then back to a nonzero or TRUE value. Flatten Position and Cancel Working Orders J29 Cell J29 flattens the existing Trade Position that the Spreadsheet System for Trading study is reporting on the Sheet. So this will be for the Symbol and Trade Account that the chart is set to. All Working orders will also be canceled for the symbol and Trade Account. Simply setting this cell to TRUE or any non-zero number (such as 1 ) will trigger the flattening of the Position and canceling of orders. You can also input a formula here to perform the action when certain conditions are met. The flattening of the Position and canceling of orders occurs before any of the Entry and Exit signal cells are evaluated. When this cell is set to a nonzero or TRUE value, additional flattening of the Position and canceling of orders will not occur until it is set back to zero or FALSE and then back to a nonzero or TRUE value. If you want to flatten the Trade Position and cancel working orders at a specific time, then you can use a formula like this: (J41-INT(J41)) gt TIMEVALUE(16:15:00). This example will return TRUE when the time is 16:15 or greater. Cell J41 is the latest time in the last bar in the chart. It is best to use that cell, since NOW() always refers to the current time, and that will not work during back testing. Disable Auto Trading J28 When Cell J28 is set to TRUE it disables all trading from the Spreadsheet. When this cell is set to TRUE . all Spreadsheet BuySell entries and exits, flatten Position and cancel order commands are ignored . However, if this cell is set to TRUE at the same time that a cell like Flatten Position and Cancel Working Orders is set to TRUE, then the Flatten Position and Cancel Working Orders action will still occur and then automated trading will be disabled after that. This paragraph applies to versions 1463 and higher. You can enter a formula in this cell to disable trading when certain conditions are met or even when the latest Date-Time of the last bar in the chart meets some specified time condition. Manually setting this input to TRUE or any non-zero number will simply disable all auto trading until the cell is set back to FALSE . If you want to disable automated trading at a specific time, then you can use a formula like this: (J41-INT(J41)) gt TIMEVALUE(16:15:00). This example returns TRUE when the time is 16:15 or greater. Cell J41 is the latest time in the last bar in the chart. It is best to use that cell, since NOW() always refers to the current time, and that will not work during back testing. For documentation for the particular Spreadsheet functions used, refer to Spreadsheet Functions . To limit trading to the day session only, use this formula: OR(J41-INT(J41) lt TIMEVALUE(09:30:00), J41-INT(J41) gt TIMEVALUE(16:00:00) ). This formula assumes your time zone in Sierra Chart is set to New York, and the symbol of the chart is a stock or stock index. Buy Entry: Order Type J71 This Spreadsheet input is for specifying the order type for the Buy Entry Order Action column. The corresponding Limit or Stop price is set in cell J22 . If the Limit or Stop price cell is set to 0 or is blank, then the Limit or Stop price will be set to the current Ask price. If the Order Type is blank, it will be set to M (Market). The order type can be programmatically set with a formula. Here is an example: IF(J5 0, L, M). Buy Exit: Order Type J72 This Spreadsheet input is for specifying the order type for the Buy Exit Order Action column. The corresponding Limit or Stop price is set in cell J23 . If the Limit or Stop price cell is set to 0 or is blank, then the Limit or Stop price will be set to the current Bid price. If the Order Type is blank, it will be set to M (Market). The order type can be programmatically set with a formula. Here is an example: IF(J5 0, L, M). Sell Entry: Order Type J73 This Spreadsheet input is for specifying the order type for the Sell Entry Order Action column. The corresponding Limit or Stop price is set in cell J24 . If the Limit or Stop price cell is set to 0 or is blank, then the Limit or Stop price will be set to the current Bid price. If the Order Type is blank, it will be set to M (Market). The order type can be programmatically set with a formula. Here is an example: IF(J5 0, L, M). Sell Exit: Order Type J74 This Spreadsheet input is for specifying the order type for the Sell Exit Order Action column. The corresponding Limit or Stop price is set in cell J25 . If the Limit or Stop price cell is set to 0 or is blank, then the Limit or Stop price will be set to the current Ask price. If the Order Type is blank, it will be set to M (Market). The order type can be programmatically set with a formula. Here is an example: IF(J5 0, L, M). Attached Order Target Offset (write only) J80 When this is set to a nonzero value, this will replace any existing defined Attached Orders on the Trade Window for the chart with a Target Limit order with the Offset specified in this cell. The purpose of using a Spreadsheet cell to set the Target Attached Order Offset is so that it can be set according to a formula rather than hardcoded at a particular value on the Trade Window for the chart. The Offset is relative to the parent order price. This Offset needs to be specified as an actual price value . If a Stop order is also set through cell J81 . then this will be added to the Attached Orders at the same time as well. For more information, refer to Attached Orders . For the Attached Orders to actually be used when submitting a BuySell Entry order, the Use Attached Orders option needs to be enabled on the Trade Window for the chart. Attached Order Stop Offset (write only) J81 When this is set to a nonzero value, this will replace any existing defined Attached Orders on the Trade Window for the chart with a Stop order with the Offset specified in this cell. The purpose of using a Spreadsheet cell to set the Stop Attached Order Offset is so that it can be set according to a formula rather than hardcoded at a particular value on the Trade Window for the chart. The Offset is relative to the parent order price. This Offset needs to be specified as an actual price value . If a Target order is also set through cell J80 . then this will be added to the Attached Orders at the same time as well. For more information, refer to Attached Orders . For the Attached Orders to actually be used when submitting a BuySell Entry order, the Use Attached Orders option needs to be enabled on the Trade Window for the chart. Working Orders Exist (read-only) J84 This is set to TRUE when there are orders which currently have a Status indicating they are working and can be filled. This also includes Pending Child orders. Otherwise, this is set to FALSE. This cell is read-only. Allow Trading Only During Time Range (readwrite) J85 This can be set to TRUE to only allow automated trading by the Spreadsheet System for Trading study during the time range specified in the Start Time For Allowed Time Range and End Time For Allowed Time Range cells. Start Time For Allowed Time Range (readwrite) J86 When the Allow Trading Only During Time Range cell has been set to TRUE, then this cell specifies the starting time in the charts time zone that automated trading is allowed to begin at. End Time For Allowed Time Range (readwrite) J87 When the Allow Trading Only During Time Range cell has been set to TRUE, then this cell specifies the ending time in the charts time zone that automated trading will no longer be allowed after. Flatten Positions And Cancel Orders At Set Time (readwrite) J88 When this cell is set to TRUE, then the current Trade Position will be flattened and any working Orders will be canceled for the Symbol and Trade Account of the chart the Spreadsheet System for Trading study is applied to, at the time specified by the Time For Flatten Positions And Cancel Orders cell. Time For Flatten Positions And Cancel Orders (readwrite) J89 When the Flatten Positions And Cancel Orders At Set Time cell is set to TRUE, then this cell specifies the time to flatten the Trade Position and cancel the Orders at. Last EntryExit Order Date-Time (read-only) J90 This is the Date-Time in the charts time zone, of the last entry or exit order which was submitted whether it has filled or not. This is useful to use in formulas to determine the amount of time elapsed since an order was submitted and it has not yet filled. Back Testing Spreadsheet Calculations and Spreadsheet Study Processing of Spreadsheet Data This section describes the calculations of formulas on a Sheet in a Spreadsheet window and the subsequent reading and processing of values and formula results from a particular Sheet being referenced by one of the Spreadsheet studies. There is a difference between these two operations and this needs to be understood. The general method by which a Spreadsheet study interacts with a particular Sheet in a Spreadsheet window (also known as a Sheet Collection), is that first the chart data and study values are outputted to the Sheet, the Sheet is calculated, and then the Spreadsheet study gets the results from the formula columns K through Z (last formula column by default) and processes those results and puts them into internal chart arrays for graphing on the chart. In the case of the Spreadsheet System for Trading study, if there is a full recalculation of the chart, the Sheet will be updated and calculated, however there will not be processing of any of the Sheet formula columns during that full recalculation, by the Spreadsheet System for Trading study. A full recalculation will occur when the chart is opened as part of its Chartbook opening, studies are modified through the Chart Studies window, or if the chart has been tagged for a full recalculation by a chart it is referencing. This last case is not a common case. After a full recalculation occurs, it is normal for the last bar in the chart to be calculated again. At this time it is normal for any of the Spreadsheet studies to process the formula columns for the last bar in the Sheet. In the case of the Spreadsheet System for Trading study, if 100 or more bars are added at once to the chart when the chart is updated, then there will not be processing of the Sheet formula columns. This kind of event will be indicated in the Trade gtgt Trade Service Log when it happens. The below sections explain how the K through Z formula columns that contain formula results are processed based on the Signal Only on Bar Close inputs. There are two of these inputs and this section applies to both of them. For example, if you use the Signal Only on Bar Close (Columns K, M) input, then this description would apply to columns K and M . The time at which formula results are processed by any of the Spreadsheet studies is after all the Sheets within the Spreadsheet have been calculated and all cells are reporting their current values. If Signal Only on Bar Close is set to No . then the following occurs: If there are no new bars added to the chart during a chart update, then only Sheet row 3 is checked for TRUEFALSE values that are returned by formulas in the Spreadsheet signal columns (K-Z). If there are new bars added to the chart during a chart update, then the first row in the Sheet that is examined for TRUEFALSE values that are returned by the formulas, is the previous topmost row during the prior update (the data previously at row 3). The reason the previous topmost row is examined, is because there could be changes with the price data and studies at that row during the chart update. In other words, the examination continues where it left off. Next, the Spreadsheet study processing function moves up the rows all the way up to 3, examining for TRUEFALSE conditions row by row. For example, if there is one new bar added, then first row 4 is examined and then row 3 is examined for TRUEFALSE conditions. One potential issue to be aware of with this processing logic is that if a formula in a particular column is TRUE at row 3 and then a new bar is added and it becomes FALSE at row 4, then the internal state maintained by Sierra Chart for the Spreadsheet column goes to FALSE and can then go back to TRUE if the formula is TRUE at row 3 during that update. The potential issue with this is an unexpected signal due to a state change. If Signal Only on Bar Close is set to Yes . then the following occurs: If there are no new bars added to the chart during a chart update, then only Sheet row 4 is checked for TRUEFALSE values that are returned by formulas in the Spreadsheet signal columns (K-Z). If there are new bars added to the chart during a chart update, then the first row in the Sheet that is examined for TRUEFALSE values that are returned by the formulas, is the previous second topmost row during the prior update (the data previously at row 4). The reason the previous second topmost row is examined, is because there could be changes with the price data and studies at that row during the chart update. Although, usually not in this case since the data was previously at row 4. In other words, the examination continues where it left off. Next, the Spreadsheet study processing function moves up the rows all the way up to 4, examining for TRUEFALSE conditions row by row. For example, if there is one new bar added, then first row 5 is examined and then row 4 is examined for TRUEFALSE conditions. One potential issue to be aware of with this processing logic is that if a formula in a particular column is TRUE at row 4 and then a new bar is added and it becomes FALSE at row 5, then the internal state maintained by Sierra Chart for the Spreadsheet column goes to FALSE and can then go back to TRUE if the formula is TRUE at row 4 during that update. The potential issue with this is an unexpected signal due to a state change. Although, this kind of scenario is highly unlikely with Signal Only on Bar Close set to Yes because data other than at the last bar in the chart is not likely to change. Order of Formula Column Processing and Internal Calculation Order When the formula results in columns K through Z (last formula column by default) are processed for Trade Order or Alert signals by the Spreadsheet System for Trading or Spreadsheet SystemAlert studies, column K is evaluated first, then L, then M, and so on through and including the last formula column (by default column Z). The last formula column is set by the Number of Formula Columns Input. Therefore in the case of the Spreadsheet System for Trading study, the following columns are evaluated in the order in which they are listed left to right: Buy Entry, Buy Exit, Sell Entry, Sell Exit . The order of calculation for the formulas in cells within a Spreadsheet is based upon the dependency they have to each other. A cell dependent on another cell is always going to be calculated after the cell it is dependent on. In the case where 2 cells refer to each other, this is known as a circular reference. In the version of Sierra Chart with New Spreadsheets, there is no special handling of a circular reference, the result can be unpredictable, and an error may be given. Circular references are not supported as they simply make no mathematical sense and have an absolute impossibility to resolve accurately. Multiple Exit Automated Trading Example This is an example of an automated trading exit which utilizes two targets. This example applies to the Spreadsheet System for Trading study. A stop is not used in this example. There are three formulas involved in this strategy and they are used in the following cells: Buy Exit, Sell Exit, and Custom Order Quantity. In this example, these formulas set a price target of 3 points and 5 points away from the Position Average Price (Cell J9 ). It is assumed that there is a Position quantity of 5. For the first target, two contracts will be exited. For the second target, three contracts will be exited. Order Quantity Formula (Cell J26 ): IF( ABS(J8) 5, 2, IF( ABS(J8) 3, 3, 0)) . Buy Exit Formula (Cell L3): OR( AND( J8 5, ID0.SG43 - J9 gt 3), AND( J8 3, ID0.SG43 - J9 5)) Sell Exit Formula (Cell N3): OR( AND( J8 -5, J9 - ID0.SG43 gt 3), AND( J8 -3, J9-ID0.SG43 gt 5)) This is merely a simple example and this will need to be tested and modified to be certain it will work for you. Limiting Trading to Certain Time Ranges This section uses the GETTIMEFROMDATETIMEVALUE function which is going to be available in an upcoming release at the time of this writing. To restrict trading during only a certain time range, you can use the Disable Auto Trading cell. Here is an example formula to limit trading during a specific time range: AND((GETTIMEFROMDATETIMEVALUE(J41)) gt TIME(9,30,0), GETTIMEFROMDATETIMEVALUE(J41) lt TIME(16,15,0)). J41 contains the Last Bar End DateTime . Or this formula could be combined into a Buy Entry and Sell Entry formula by using the AND function. Last modified Wednesday, 14th December, 2016.

No comments:

Post a Comment