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.
Jan 15
版本注释: Updated to Pine version 4.
从收藏脚本中删除 添加到收藏脚本

评论

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
回复
Adding to my reading list, thnx
回复
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 回复
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?
回复
@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.
+2 回复
Samweis CryptoRox
@CryptoRox,

Thanks for the update.

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

So thanks again.
kind regards
回复
首页 股票筛选器 外汇筛选器 加密货币筛选器 财经日历 如何运作 图表功能 价格 推荐朋友 网站规则 帮助中心 网站 & 经纪商解决方案 插件 图表解决方案 轻量图表库 博客 & 新闻 Twitter
概览 个人资料设置 账户和账单 推荐朋友