CryptoRox

Incremental Order size +

This is an old and incomplete script that is being pulled up and dusted off as per request.

The sole purpose of this script was to provide code snippets allowing one to easily convert their own script/strategy to include incremental order sizes. More control over your pyramiding orders.

**It may repaint, and was not intended for trading but more as an attempt to provide examples for more control with pyramiding.
Notes de version: Updated to Pine version 4.
Script open-source

Dans le plus pur esprit de TradingView, l'auteur de ce texte l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur ! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par les règles internes. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Commentaires

very nice,
is it may repaint?
+1 Répondre
coralgoal TradeBattlefield
.
Répondre
Sweet dude. Thanks
Répondre
Thanks !!!! i was looking for how to solve my problem and after looking yyour code now its clear for me what i need to do. Thankss! You really helped me a lot
Répondre
Adding to my reading list, thnx
Répondre
CryptoRox syrinxflunki
@syrinxflunki, I hope you enjoy it.

It may look like a lot to read, but once you get into it, you'll see that most of it is simply cutting and pasting while changing some numbers.
+3 Répondre
Very nice,
i have a script with similar structure in parts of the code.
Sometimes I want to run the script in version v4, but unfortunately I can't.

I think this line of code is the problem:
It causes problems when compiling in V4

last_long = long ? time : nz(last_long)
last_short = short ? time : nz(last_short)

Do you know a way to write your code in v4?
Can you encode the same function in v4 and share it as well?
Répondre
CryptoRox Samweis
@Samweis,
Hello Samweis,

Thanks for the great question.

These variables refer to themselves. In the later versions of Pine, we need now need to use mutable variables and declare it something first.

last_long = 0
last_short = 0
last_long := long? time : nz(last_long)
last_short := short ? time : nz(last_short)

I hope that helps.

PS. Shame on me for notupdating tit o Version 4. Just published the update now.
+3 Répondre
Samweis CryptoRox
@CryptoRox,

Thanks for the update.

Ah, such a simple change. I should have thought of it myself ;)

So thanks again.
kind regards
Répondre