Zum Inhalt springen
View in the app

A better way to browse. Learn more.

#T/N/X/T

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Close zu bestimmten Datum, aber wie?

Geschrieben

Hallo,

ich hab mir da ein nettes script gebastelt, dass mir eine Trendlinie mittels WindowTimeOnDropped() ab einem best. Bar bei dessen Close einzeichnet, nur hab ich festgestellt, dass das mit dem iClose & der Sommerzeit und dem WE nicht immer besonders gut funktioniert,

eigentlich nur in der aktuellen Woche fehlerfrei ist :(

 

hat jemand eine Idee, wie ich OHNE iClose zum Close-Wert von einem best. Datum komme, das muss doch möglich sein,

WindowPriceOnDropped() ist leider keine Lösung, da das ja nicht der Close-Wert ist, und die TL somit am falschen Ort platziert werden würde...

datetime drop_time = WindowTimeOnDropped();
double wert1 = iClose(Symbol(),Period(),((TimeCurrent()-drop_time)/60/Period()); //wie gesagt, spätestens nach 5 Tagen ungenau
ObjectCreate(ObjName, OBJ_TREND, 0,drop_time, wert1, Time[0], wert1);

 

SONST WÄRE ES EINE TOLLE SACHE !-)

Featured Replies

Geschrieben

hat jemand eine Idee, wie ich OHNE iClose zum Close-Wert von einem best. Datum komme, das muss doch möglich sein,

Das geht auch MIT iClose :tongue:

datetime drop_time = WindowTimeOnDropped();
double wert1 = iClose(Symbol(),Period(),iBarShift(NULL, 0, drop_time); 
ObjectCreate(ObjName, OBJ_TREND, 0,drop_time, wert1, Time[0], wert1);

Geschrieben

Im Prinzip ist iClose da eh schon ein Overkill. Wozu extra nochmal angeben das es das aktuelle Symbol und der aktuelle TimeFrame sein soll? Dafür gibts doch "Close[]" ;)

Der Knackpunkt ist (wie WOGO schon gezeigt hat) das "iBarShift".

 

Deine Variante würde nur funktionieren wenn der Markt nie zu wäre, denn du zählst einfach die tehoretisch vergangenen Bars in der Zeit zurück.

Geschrieben
  • Autor

Danke euch, werd's morgen ausprobieren, inzwischen hab ich die umständliche variante mit export / import genutzt, aber das ist, auch wenn's funktioniert dann doch schon mehr als overkilled :)

 

Danke nochmals ! ;-)

Dein Kommentar

Du kannst jetzt schreiben und Dich später registrieren. Wenn Du ein Konto hast, melde Dich jetzt an, um unter Deinem Benutzernamen zu schreiben.

Gast
Auf dieses Thema antworten...

Account

Navigation

Suche

Suche

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.