Kommastellen bei Kurswerten

Post Reply
Jophi
Posts: 5
Joined: 02 Dec 2021 18:13

Kommastellen bei Kurswerten

Post by Jophi »

Sehr geehrtes WH Selfinvest Team, liebe Community,

ich habe inzwischen mehrfach das Handbuch gewälzt und vergangene Einträge in diesem Forum geprüft konnte daraus leider keiner Lösung für meine Idee ableiten. Daher wende ich mich nun vertrauensvoll an Sie.

Die Idee meiner Stoplogik ist, dass ab einem Bestimmten Kurswert ein anderer Stop genutzt wird. Den ich über Input $Value1 (x,xxx,x) gerne eingeben möchte.

Mein problem ist, dass ich für die Schwelle des Kurswertes gerne Kommastellen nutzen würde, dies habe ich nicht selbstständig hin bekommen. Express nimmt nur ganze Zahlen (Siehe Anhang).

(Ich hab es auch schon versucht mit Ticks * TickSize leider ohne Erfolg).

Mir würde es schon reichen, wenn ich .25,.5,.75 vergeben könnte.

Vielen Dank im Voraus.

Gruß JoPhi
You do not have the required permissions to view the files attached to this post.
philippeB
Posts: 16
Joined: 02 Jan 2018 05:10

Re: Kommastellen bei Kurswerten

Post by philippeB »

$Stop(1.0,100.0,30.0,0.1,1)

1.0 to 100.0 range for parameters
30.0 default value
0.1 increment step you can change to 0.2 or whatever
1 number of decimal

If you want more decimal you have to change for all:
$Stop(1.00,100.00,30.00,0.01,2) you can change increment to be 0.25 instead of 0.01 so value will be 0.00 0.25 0.50 0.75 1.00
$Stop(1.000,100.000,30.000,0.001,3)
Jophi
Posts: 5
Joined: 02 Dec 2021 18:13

Re: Kommastellen bei Kurswerten

Post by Jophi »

Hey philippeB,

Works perfectly fine.

Thank you very much!!!
Jophi
Posts: 5
Joined: 02 Dec 2021 18:13

Re: Kommastellen bei Kurswerten

Post by Jophi »

Liebes WH Sefinvest Team und Comunity,

an dieser Stelle habe ich noch eine Frage:

Und zwar möchte ich gerne dass der Stop Trailt. Wie könnte das Machbar sein?

Anbei finden Sie das Script und die Aufnahme:
You do not have the required permissions to view the files attached to this post.
philippeB
Posts: 16
Joined: 02 Jan 2018 05:10

Re: Kommastellen bei Kurswerten

Post by philippeB »

The condition you write is working fine for the breakeven as you move only once the stop and it will stay at this level at all time.
For the Trailing you need to move the stop every time you have a change in value after you cross above your level2.
you have to use a new serie stoplevel and at each bar stoplevel=stoplevel[1] before you evaluate your new trailing condition
Then when you have a change you use stoplevel=max(stoplevel,StopLong) for the short side you use stoplevel=min(stoplevel,StopShort)

See on the attached screen the two level breakeven and then trailing stop working well.

You have the modified code in the attached file
You do not have the required permissions to view the files attached to this post.
Jophi
Posts: 5
Joined: 02 Dec 2021 18:13

Re: Kommastellen bei Kurswerten

Post by Jophi »

Hey Philippe,

i am Sorry. But somehow it is not working :?

Find a attached the result I got.

Maybe it has something to do with the input $Startstop?

(or that I am Trading Stocks?)

Thanks first of all for your help.

best regards.
You do not have the required permissions to view the files attached to this post.
philippeB
Posts: 16
Joined: 02 Jan 2018 05:10

Re: Kommastellen bei Kurswerten

Post by philippeB »

Look inside the code I made a modification from your original code this is why it does not work:
Value1=entrypriceoriginal()+$Value1; instead of your original code Value1=$Value1;
Value2=entrypriceoriginal()+$Value2; instead of Value2=$Value2;
With this you can use the stop for whatever market, you do not need to adjust to your specific stock value.

In your case try with $value1=1 and $value2=2 or you can make the modification back to your original code
Jophi
Posts: 5
Joined: 02 Dec 2021 18:13

Re: Kommastellen bei Kurswerten

Post by Jophi »

Now finally its Doing what I want!

Thanks my Friend.

Best Regards.
philippeB
Posts: 16
Joined: 02 Jan 2018 05:10

Re: Kommastellen bei Kurswerten

Post by philippeB »

Be careful of one thing, your trailing stop is very tight and you may have a red card if the stop move too close than the current close with effect that the stop is rejected.

ll=lowest(low,1);
hh=highest(high,2);
longstop=(((hh-ll)/2)+ll);

Normally with a high/low stop we use a look back period of 2 or 3. In your case you use period 1 and you take 1/2 of it.

Maybe use this set-up when the trend is strong and linear. When you reach the small range/flag after a linear trend you can use a period 2 or 3 to stay in the market with a stop under the lowest point of the range.
Post Reply

Return to “WHS NANOTRADER - EXPRESS PROGRAMMING”