金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
查看: 158|回复: 1

老师,请帮忙改动态跟踪止损

[复制链接]

5

主题

11

帖子

11

积分

Rank: 1

等级: 新手上路

注册:
2025-2-9
曾用名:
发表于 2025-3-5 10:51 | 显示全部楼层 |阅读模式
老师,请帮忙改动态跟踪止损,并且下单后划出场线:
1. 下多单后合约最高价-30跳点的动态跟踪止损,在屏幕输出下单后合约最高价-30跳点的动态跟踪止损出场线,
2. 下空单后合约最低价+30跳点的动态跟踪止损,在屏幕输出下单后合约最低价+30跳点的动态跟踪止损出场线,

ma400:ma(c,400);
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),NOAXIS;
DEA  : EMA(DIFF,9);
MACD1 : 2*(DIFF-DEA);

if c> ma400 and cross(DIFF,DEA) AND DIFF >0   then
begin
        sellshort(1,holding,marketr);
        buy(holding=0,1,marketr);
end

if c< ma400 and cross(DEA,DIFF) AND DIFF <0  then
begin
        sell(1,holding,marketr);
        buyshort(holding=0,1,marketr);
END

if (close <  enterprice-30*mindiff  )  and holding>0 then sell(1,holding,marketr);
if ( close > enterprice+30*mindiff  ) and holding<0 then sellshort(1,holding,marketr);

回复

使用道具 举报

38

主题

9989

帖子

9999

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
发表于 2025-3-5 11:02 | 显示全部楼层
ma400:ma(c,400);
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),NOAXIS;
DEA  : EMA(DIFF,9);
MACD1 : 2*(DIFF-DEA);

if c> ma400 and cross(DIFF,DEA) AND DIFF >0   then
begin
        sellshort(1,holding,marketr);
        buy(holding=0,1,marketr);
end

if c< ma400 and cross(DEA,DIFF) AND DIFF <0  then
begin
        sell(1,holding,marketr);
        buyshort(holding=0,1,marketr);
END

if (close <  hhv(close,enterbars)-30*mindiff  )  and holding>0 then sell(1,holding,marketr);
if ( close > hhv(close,enterbars)+30*mindiff  ) and holding<0 then sellshort(1,holding,marketr);


这个线无法绘制,仓位平了就没了
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 微信登录

本版积分规则

手机版|小黑屋|上海金之塔信息技术有限公司 ( 沪ICP备13035422号 )

GMT+8, 2025-4-19 03:57 , Processed in 0.254505 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表