Registrierung Kalender FAQ & Boardregeln Suche Mitgliederliste Moderatoren und Administratoren Linkdatenbank Startseite
Tradestation User Group Germany » freie Foren » Newbies » conditions Problem » Hallo Gast [registrieren|anmelden]
« Vorheriges Thema Nächstes Thema » Druckvorschau | An Freund senden | Thema zu Favoriten hinzufügen
Neues Thema erstellen Antwort erstellen
Autor
Beitrag
awill
Star Member



Dabei seit: 02 2003
Herkunft:
Beiträge: 23

awill ist offline
conditions ProblemAntwort mit Zitat Beitrag editieren/löschen Nach weiteren Beiträge von  suchen Diesen Beitrag einem Moderator melden        IP Adresse Zum Anfang der Seite springen

Hallo,

ich habe das Problem das ich jeweils paarweise zwei conditions testen möchte. ALso 1 mit 2, dann 1 mit 3 usw.

Ich habe geschrieben :

If durchlauf=1 then begin if condition1=true and condition2=true and condition33 =true then buy at market; end

else if durchlauf=2 then begin if condition1=true and condition3=true and condition33=true then buy at market; end

else If durchlauf=3 then begin if condition1=true and condition4=true and condition33=true then buy at market; end

else if durchlauf=4 then begin if condition1=true and condition5=true and condition33=true then buy at market; end

else If durchlauf=5 then begin if condition1=true and condition6=true and condition33=true then buy at market; end

else if durchlauf=6 then begin if condition1=true and condition7=true and condition33=true then buy at market; end

Allerdings klappt das nicht, es kommt als net profit immer 0 heraus. Ich frage mich nur wieso ?

Durchlauf ist mein Input, der numeriert wird.

Was soll ich denn machen ?

08.02.2003, 16:54 Profil von Füge  deiner Freunde-Liste hinzu Email an awill senden
Uwe
Super Moderator



Dabei seit: 12 2001
Herkunft:
Beiträge: 718

Uwe ist offline
  Antwort mit Zitat Beitrag editieren/löschen Nach weiteren Beiträge von  suchen Diesen Beitrag einem Moderator melden        IP Adresse Zum Anfang der Seite springen

Zitat:
Original von awill
Hallo,

ich habe das Problem das ich jeweils paarweise zwei conditions testen möchte. ALso 1 mit 2, dann 1 mit 3 usw.

Ich habe geschrieben :

If durchlauf=1 then begin if condition1=true and condition2=true and condition33 =true then buy at market; end

else if durchlauf=2 then begin if condition1=true and condition3=true and condition33=true then buy at market; end

else If durchlauf=3 then begin if condition1=true and condition4=true and condition33=true then buy at market; end

else if durchlauf=4 then begin if condition1=true and condition5=true and condition33=true then buy at market; end

else If durchlauf=5 then begin if condition1=true and condition6=true and condition33=true then buy at market; end

else if durchlauf=6 then begin if condition1=true and condition7=true and condition33=true then buy at market; end

Allerdings klappt das nicht, es kommt als net profit immer 0 heraus. Ich frage mich nur wieso ?

Durchlauf ist mein Input, der numeriert wird.

Was soll ich denn machen ?



Wie hast Du den Deine Varible "Durchlauf" belegt bzw. wie wird sie hochgezählt? Hat sie den Wert 0, dann ist das Ergebniss nicht verwunderlich.

Ansonsten bitte EsayLanguage-Problembesprechnungen und -Fragen bitte im entsprechendem Unterboard stellen, um, wie bereits erwähnt, eine Zersplitterung der Themenbereiche zu vermeiden.

Gruß,
Uwe

08.02.2003, 19:31 Profil von Füge  deiner Freunde-Liste hinzu Email an Uwe senden
awill
Star Member



Dabei seit: 02 2003
Herkunft:
Beiträge: 23

awill ist offline
conditions Problem - Bitte um HilfeAntwort mit Zitat Beitrag editieren/löschen Nach weiteren Beiträge von  suchen Diesen Beitrag einem Moderator melden        IP Adresse Zum Anfang der Seite springen

Villeicht kann mir jemand helfen. Ich möchte das folgende kürzer schreiben als bisher. Der Code lautet:

If durchlauf=1 then begin if condition1=true and condition2=true and condition33 =true then buy at market; end
else if durchlauf=2 then begin if condition1=true and condition3=true and condition33=true then buy at market; end
else If durchlauf=3 then begin if condition1=true and condition4=true and condition33=true then buy at market; end
else if durchlauf=4 then begin if condition1=true and condition5=true and condition33=true then buy at market; end
else If durchlauf=5 then begin if condition1=true and condition6=true and condition33=true then buy at market; end
else if durchlauf=6 then begin if condition1=true and condition7=true and condition33=true then buy at market; end
else If durchlauf=7 then begin if condition1=true and condition8=true and condition33=true then buy at market; end
else if durchlauf=8 then begin if condition1=true and condition9=true and condition33=true then buy at market; end
else if durchlauf=9 then begin if condition1=true and condition10=true and condition33=true then buy at market; end
else If durchlauf=10 then begin if condition1=true and condition11=true and condition33=true then buy at market; end
else if durchlauf=11 then begin if condition1=true and condition12=true and condition33=true then buy at market; end
else If durchlauf=12 then begin if condition1=true and condition13=true and condition33=true then buy at market; end
else if durchlauf=13 then begin if condition1=true and condition14=true and condition33=true then buy at market; end
else If durchlauf=14 then begin if condition1=true and condition15=true and condition33=true then buy at market; end
else if durchlauf=15 then begin if condition1=true and condition16=true and condition33=true then buy at market; end
else if durchlauf=16 then begin if condition1=true and condition17=true and condition33=true then buy at market; end
else If durchlauf=17 then begin if condition1=true and condition18=true and condition33=true then buy at market; end
else if durchlauf=18 then begin if condition1=true and condition19=true and condition33=true then buy at market; end
else If durchlauf=19 then begin if condition1=true and condition20=true and condition33=true then buy at market; end
else if durchlauf=20 then begin if condition1=true and condition21=true and condition33=true then buy at market; end
else If durchlauf=21 then begin if condition1=true and condition22=true and condition33=true then buy at market; end
else if durchlauf=22 then begin if condition1=true and condition23=true and condition33=true then buy at market; end
else if durchlauf=23 then begin if condition1=true and condition24=true and condition33=true then buy at market; end
else If durchlauf=24 then begin if condition1=true and condition25=true and condition33=true then buy at market; end
else if durchlauf=25 then begin if condition1=true and condition26=true and condition33=true then buy at market; end
else If durchlauf=26 then begin if condition1=true and condition27=true and condition33=true then buy at market; end
else if durchlauf=27 then begin if condition1=true and condition28=true and condition33=true then buy at market; end
else If durchlauf=28 then begin if condition1=true and condition29=true and condition33=true then buy at market; end
else if durchlauf=29 then begin if condition1=true and condition30=true and condition33=true then buy at market; end
else if durchlauf=30 then begin if condition1=true and condition31=true and condition33=true then buy at market; end
else If durchlauf=31 then begin if condition1=true and condition32=true and condition33=true then buy at market; end
else If durchlauf=32 then begin if condition2=true and condition1=true and condition33 =true then buy at market; end
else if durchlauf=33 then begin if condition2=true and condition3=true and condition33=true then buy at market; end
else If durchlauf=34 then begin if condition2=true and condition4=true and condition33=true then buy at market; end
else if durchlauf=35 then begin if condition2=true and condition5=true and condition33=true then buy at market; end
else If durchlauf=36 then begin if condition2=true and condition6=true and condition33=true then buy at market; end
else if durchlauf=37 then begin if condition2=true and condition7=true and condition33=true then buy at market; end
else If durchlauf=38 then begin if condition2=true and condition8=true and condition33=true then buy at market; end
else if durchlauf=39 then begin if condition2=true and condition9=true and condition33=true then buy at market; end
else if durchlauf=40 then begin if condition2=true and condition10=true and condition33=true then buy at market; end
else If durchlauf=41 then begin if condition2=true and condition11=true and condition33=true then buy at market; end
else if durchlauf=42 then begin if condition2=true and condition12=true and condition33=true then buy at market; end
else If durchlauf=43 then begin if condition2=true and condition13=true and condition33=true then buy at market; end
else if durchlauf=44 then begin if condition2=true and condition14=true and condition33=true then buy at market; end
else If durchlauf=45 then begin if condition2=true and condition15=true and condition33=true then buy at market; end
else if durchlauf=46 then begin if condition2=true and condition16=true and condition33=true then buy at market; end
else if durchlauf=47 then begin if condition2=true and condition17=true and condition33=true then buy at market; end
else If durchlauf=48 then begin if condition2=true and condition18=true and condition33=true then buy at market; end
else if durchlauf=49 then begin if condition2=true and condition19=true and condition33=true then buy at market; end
else If durchlauf=50 then begin if condition2=true and condition20=true and condition33=true then buy at market; end
else if durchlauf=51 then begin if condition2=true and condition21=true and condition33=true then buy at market; end
else If durchlauf=52 then begin if condition2=true and condition22=true and condition33=true then buy at market; end
else if durchlauf=53 then begin if condition2=true and condition23=true and condition33=true then buy at market; end
else if durchlauf=54 then begin if condition2=true and condition24=true and condition33=true then buy at market; end
else If durchlauf=55 then begin if condition2=true and condition25=true and condition33=true then buy at market; end
else if durchlauf=56 then begin if condition2=true and condition26=true and condition33=true then buy at market; end
else If durchlauf=57 then begin if condition2=true and condition27=true and condition33=true then buy at market; end
else if durchlauf=58 then begin if condition2=true and condition28=true and condition33=true then buy at market; end
else If durchlauf=59 then begin if condition2=true and condition29=true and condition33=true then buy at market; end
else if durchlauf=60 then begin if condition2=true and condition30=true and condition33=true then buy at market; end
else if durchlauf=61 then begin if condition2=true and condition31=true and condition33=true then buy at market; end
else If durchlauf=62 then begin if condition2=true and condition32=true and condition33=true then buy at market; end
else if durchlauf=63 then begin if condition3=true and condition1=true and condition33 =true then buy at market; end
else if durchlauf=64 then begin if condition3=true and condition2=true and condition33=true then buy at market; end
else If durchlauf=65 then begin if condition3=true and condition4=true and condition33=true then buy at market; end
else if durchlauf=66 then begin if condition3=true and condition5=true and condition33=true then buy at market; end
else If durchlauf=67 then begin if condition3=true and condition6=true and condition33=true then buy at market; end
else if durchlauf=68 then begin if condition3=true and condition7=true and condition33=true then buy at market; end
else If durchlauf=69 then begin if condition3=true and condition8=true and condition33=true then buy at market; end
else if durchlauf=70 then begin if condition3=true and condition9=true and condition33=true then buy at market; end
else if durchlauf=71 then begin if condition3=true and condition10=true and condition33=true then buy at market; end
else If durchlauf=72 then begin if condition3=true and condition11=true and condition33=true then buy at market; end
else if durchlauf=73 then begin if condition3=true and condition12=true and condition33=true then buy at market; end
else If durchlauf=74 then begin if condition3=true and condition13=true and condition33=true then buy at market; end
else if durchlauf=75 then begin if condition3=true and condition14=true and condition33=true then buy at market; end
else If durchlauf=76 then begin if condition3=true and condition15=true and condition33=true then buy at market; end
else if durchlauf=77 then begin if condition3=true and condition16=true and condition33=true then buy at market; end
else if durchlauf=78 then begin if condition3=true and condition17=true and condition33=true then buy at market; end
else If durchlauf=79 then begin if condition3=true and condition18=true and condition33=true then buy at market; end
else if durchlauf=80 then begin if condition3=true and condition19=true and condition33=true then buy at market; end
else If durchlauf=81 then begin if condition3=true and condition20=true and condition33=true then buy at market; end
else if durchlauf=82 then begin if condition3=true and condition21=true and condition33=true then buy at market; end
else If durchlauf=83 then begin if condition3=true and condition22=true and condition33=true then buy at market; end
else if durchlauf=84 then begin if condition3=true and condition23=true and condition33=true then buy at market; end
else if durchlauf=85 then begin if condition3=true and condition24=true and condition33=true then buy at market; end
else If durchlauf=86 then begin if condition3=true and condition25=true and condition33=true then buy at market; end
else if durchlauf=87 then begin if condition3=true and condition26=true and condition33=true then buy at market; end
else If durchlauf=88 then begin if condition3=true and condition27=true and condition33=true then buy at market; end
else if durchlauf=89 then begin if condition3=true and condition28=true and condition33=true then buy at market; end
else If durchlauf=90 then begin if condition3=true and condition29=true and condition33=true then buy at market; end
else if durchlauf=91 then begin if condition3=true and condition30=true and condition33=true then buy at market; end
else if durchlauf=92 then begin if condition3=true and condition31=true and condition33=true then buy at market; end
else If durchlauf=93 then begin if condition3=true and condition32=true and condition33=true then buy at market; end

Wie man sieht, gibt es für jede Kondition 32 weitere Konditionen, das geht so weiter bis alle 32 Konditionen mit den anderen 32 Konditionen paarweise verknüpft sind. Insgesamt sind das hier 992 Zeilen. Das müsste sich doch kürzer schreiben lassen. Ich frage mich nur wie ?

MFG
Andreas

09.02.2003, 13:56 Profil von Füge  deiner Freunde-Liste hinzu Email an awill senden
awill
Star Member



Dabei seit: 02 2003
Herkunft:
Beiträge: 23

awill ist offline
  Antwort auf FrageAntwort mit Zitat Beitrag editieren/löschen Nach weiteren Beiträge von  suchen Diesen Beitrag einem Moderator melden        IP Adresse Zum Anfang der Seite springen

Hallo,

ich habe den durchlauf nie auf 0 sondern ab 1 hochgezählt bis zur letzten Zeile von 992. Ich will das kürzer schreiben, weiss aber nicht wie ?

MFG

09.02.2003, 13:57 Profil von Füge  deiner Freunde-Liste hinzu Email an awill senden
Klaus
Administrator



Dabei seit: 12 2001
Herkunft: Herdecke
Beiträge: 1087

Klaus ist offline
  Antwort mit Zitat Beitrag editieren/löschen Nach weiteren Beiträge von  suchen Diesen Beitrag einem Moderator melden        IP Adresse Zum Anfang der Seite springen

Hallo Andreas,

ein paar "dumme" Ratschläge für Dich:

  • Besuche einen EasyLanguage Kurs
  • Lese ein gutes Buch über Easy Language
  • Lade Dir den Easy Language Reference Guide aus dem Netz und studiere ihn sorgfältig
  • Sei nicht zu ungeduldig. Easy Language ist nicht wirklich "easy". ich habe (als Informatiker) ca. 1 Jahr benötigt bis ich alles konnte und ab und zu lerne ich auch heute (nach 2,5 Jahren) noch Dinge dazu.
Dein Signal von oben kann man übrigens deutlich verkürzen und flexibler machen, wenn man die Conditions alle in ein Array schreibt und dann als Parameter nur noch die Indizes des Arrays übergibt (so viele verschiedene Parameter, wie man Bedingungen verknüpfen möchte - in Deinem Beispiel oben also 3 Parameter).

Ansonsten sollte das Thema ins Easy Language Forum - wie Uwe oben ja auch schon geschrieben hat.

Gruss
-Klaus

09.02.2003, 16:27 Profil von Füge  deiner Freunde-Liste hinzu Email an Klaus senden
awill
Star Member



Dabei seit: 02 2003
Herkunft:
Beiträge: 23

awill ist offline
  Antwort mit Zitat Beitrag editieren/löschen Nach weiteren Beiträge von  suchen Diesen Beitrag einem Moderator melden        IP Adresse Zum Anfang der Seite springen

Hallo,

ich habe noch keine Trad-User ID daher kann ich dies auch nicht ins ELA Forum stellen.
Ein Beispiel für ein Array wäre sehr gut. Ich könnte mir dann Gedanken machen, und so richtig ausprobieren. Danke.

MFG

09.02.2003, 19:58 Profil von Füge  deiner Freunde-Liste hinzu Email an awill senden
Klaus
Administrator



Dabei seit: 12 2001
Herkunft: Herdecke
Beiträge: 1087

Klaus ist offline
  Antwort mit Zitat Beitrag editieren/löschen Nach weiteren Beiträge von  suchen Diesen Beitrag einem Moderator melden        IP Adresse Zum Anfang der Seite springen

Hallo Andreas,

Warum liest Du nicht erst mal das Kapitel zu Arrays im Easy Language Reference Manual und stellst dann eine konkrete Frage (falls Du dann noch Fragen hast)?

Aber Du sollst Dein Beispiel bekommen:

code:
Inputs: idx1(1), idx2(2), idx3(33);

Array: cond[40](False);

cond[1] = condition1;
cond[2] = condition2;
{ ... }
cond[40] = condition40;


if cond[idx1] and cond[idx2] and cond[idx3] then
buy;
Jetzt kannst Du durch entsprechendes Setzen bzw. Optimieren von idx1, idx2 und idx3 alle gewünschten Kombinationen austesten.

War doch gar nicht so schwer, oder?

Gruss
-Klaus

10.02.2003, 00:19 Profil von Füge  deiner Freunde-Liste hinzu Email an Klaus senden
awill
Star Member



Dabei seit: 02 2003
Herkunft:
Beiträge: 23

awill ist offline
  Antwort mit Zitat Beitrag editieren/löschen Nach weiteren Beiträge von  suchen Diesen Beitrag einem Moderator melden        IP Adresse Zum Anfang der Seite springen

Hallo,

villeicht kannst Du mir ein paar Bücher empfehlen, mit möglichst genauer Angabe und wo ich diese kaufen kann. Das wäre freundlich.

MFG

10.02.2003, 11:43 Profil von Füge  deiner Freunde-Liste hinzu Email an awill senden
Klaus
Administrator



Dabei seit: 12 2001
Herkunft: Herdecke
Beiträge: 1087

Klaus ist offline
  Antwort mit Zitat Beitrag editieren/löschen Nach weiteren Beiträge von  suchen Diesen Beitrag einem Moderator melden        IP Adresse Zum Anfang der Seite springen

Hallo Andreas,

den Easy Language Reference Guide findest du hier bei Tradersworld.

Zu Literatur siehe diesen Beitrag. Die dort erwähnte STAD-CD habe ich übrigens letztens auch im Netz entdeckt. Falls Dir Programme wie eDonkey etwas sagen, dann kannst Du Dir die CD mit diesem Link: STAD on CD (der Link funktioniert nur mit besagtem Programm) downloaden.

Gruss
-Klaus

10.02.2003, 13:50 Profil von Füge  deiner Freunde-Liste hinzu Email an Klaus senden
  « Vorheriges Thema Nächstes Thema »
Neues Thema erstellen Antwort erstellen
Gehe zu:

Powered by: Burning Board 1.1.1 © 2001 WoltLab GbR