请版主指导,怎样在已知的100个数据中选取两个较大的峰值,谢谢! [通达信]
-
咨询内容:
版主,你好!这是自编的筹码每1%的获利筹码量(现已统计100个峰值数据),现在要统计在收盘价(或者最低价)以下的最大的两个筹码量峰值,请指导,热烈欢迎版主的观临指导,谢谢!
F1:=COST(1);F2:=COST(2);F3:=COST(3);F4:=COST(4);F5:=COST(5);
F6:=COST(6);F7:=COST(7);F8:=COST(8);F9:=COST(9);F10:=COST(10);
F11:=COST(11);F12:=COST(12);F13:=COST(13);F14:=COST(14);F15:=COST(15);
F16:=COST(16);F17:=COST(17);F18:=COST(18);F19:=COST(19);F20:=COST(20);
F21:=COST(21);F22:=COST(22);F23:=COST(23);F24:=COST(24);F25:=COST(25);
F26:=COST(26);F27:=COST(27);F28:=COST(28);F29:=COST(29);F30:=COST(30);
F31:=COST(31);F32:=COST(32);F33:=COST(33);F34:=COST(34);F35:=COST(35);
F36:=COST(36);F37:=COST(37);F38:=COST(38);F39:=COST(39);F40:=COST(40);
F41:=COST(41);F42:=COST(42);F43:=COST(43);F44:=COST(44);F45:=COST(45);
F46:=COST(46);F47:=COST(47);F48:=COST(48);F49:=COST(49);F50:=COST(50);
F51:=COST(51);F52:=COST(52);F53:=COST(53);F54:=COST(54);F55:=COST(55);
F56:=COST(56);F57:=COST(57);F58:=COST(58);F59:=COST(59);F60:=COST(60);
F61:=COST(61);F62:=COST(62);F63:=COST(63);F64:=COST(64);F65:=COST(65);
F66:=COST(66);F67:=COST(67);F68:=COST(68);F69:=COST(69);F70:=COST(70);
F71:=COST(71);F72:=COST(72);F73:=COST(73);F74:=COST(74);F75:=COST(75);
F76:=COST(76);F77:=COST(77);F78:=COST(78);F79:=COST(79);F80:=COST(80);
F81:=COST(81);F82:=COST(82);F83:=COST(83);F84:=COST(84);F85:=COST(85);
F86:=COST(86);F87:=COST(87);F88:=COST(88);F89:=COST(89);F90:=COST(90);
F91:=COST(91);F92:=COST(92);F93:=COST(93);F94:=COST(94);F95:=COST(95);
F96:=COST(96);F97:=COST(97);F98:=COST(98);F99:=COST(99);F100:=COST(100);
R1:=WINNER(F1);R2:=WINNER(F2);R3:=WINNER(F3);R4:=WINNER(F4);R5:=WINNER(F5);
R6:=WINNER(F6);R7:=WINNER(F7);R8:=WINNER(F8);R9:=WINNER(F9);R10:=WINNER(F10);
R11:=WINNER(F11);R12:=WINNER(F12);R13:=WINNER(F13);R14:=WINNER(F14);R15:=WINNER(F15);
R16:=WINNER(F16);R17:=WINNER(F17);R18:=WINNER(F18);R19:=WINNER(F19);R20:=WINNER(F20);
R21:=WINNER(F21);R22:=WINNER(F22);R23:=WINNER(F23);R24:=WINNER(F24);R25:=WINNER(F25);
R26:=WINNER(F26);R27:=WINNER(F27);R28:=WINNER(F28);R29:=WINNER(F29);R30:=WINNER(F30);
R31:=WINNER(F31);R32:=WINNER(F32);R33:=WINNER(F33);R34:=WINNER(F34);R35:=WINNER(F35);
R36:=WINNER(F36);R37:=WINNER(F37);R38:=WINNER(F38);R39:=WINNER(F39);R40:=WINNER(F40);
R41:=WINNER(F41);R42:=WINNER(F42);R43:=WINNER(F43);R44:=WINNER(F44);R45:=WINNER(F45);
R46:=WINNER(F46);R47:=WINNER(F47);R48:=WINNER(F48);R49:=WINNER(F49);R50:=WINNER(F50);
R51:=WINNER(F51);R52:=WINNER(F52);R53:=WINNER(F53);R54:=WINNER(F54);R55:=WINNER(F55);
R56:=WINNER(F56);R57:=WINNER(F57);R58:=WINNER(F58);R59:=WINNER(F59);R60:=WINNER(F60);
R61:=WINNER(F61);R62:=WINNER(F62);R63:=WINNER(F63);R64:=WINNER(F64);R65:=WINNER(F65);
R66:=WINNER(F66);R67:=WINNER(F67);R68:=WINNER(F68);R69:=WINNER(F69);R70:=WINNER(F70);
R71:=WINNER(F71);R72:=WINNER(F72);R73:=WINNER(F73);R74:=WINNER(F74);R75:=WINNER(F75);
R76:=WINNER(F76);R77:=WINNER(F77);R78:=WINNER(F78);R79:=WINNER(F79);R80:=WINNER(F80);
R81:=WINNER(F81);R82:=WINNER(F82);R83:=WINNER(F83);R84:=WINNER(F84);R85:=WINNER(F85);
R86:=WINNER(F86);R87:=WINNER(F87);R88:=WINNER(F88);R89:=WINNER(F89);R90:=WINNER(F90);
R91:=WINNER(F91);R92:=WINNER(F92);R93:=WINNER(F93);R94:=WINNER(F94);R95:=WINNER(F95);
R96:=WINNER(F96);R97:=WINNER(F97);R98:=WINNER(F98);R99:=WINNER(F99);R100:=WINNER(F100);
A100:=(R100-R99)*100;A99:=(R99-R98)*100;A98:=(R98-R97)*100;A97:=(R97-R96)*100;
A96:=(R96-R95)*100;A95:=(R95-R94)*100;A94:=(R94-R93)*100;A93:=(R93-R92)*100;
A92:=(R92-R91)*100;A91:=(R91-R90)*100;A90:=(R90-R89)*100;A89:=(R89-R88)*100;
A88:=(R88-R87)*100;A87:=(R87-R86)*100;A86:=(R86-R85)*100;A85:=(R85-R84)*100;
A84:=(R84-R83)*100;A83:=(R83-R82)*100;A82:=(R82-R81)*100;A81:=(R81-R80)*100;
A80:=(R80-R79)*100;A79:=(R79-R78)*100;A78:=(R78-R77)*100;A77:=(R77-R76)*100;
A76:=(R76-R75)*100;A75:=(R75-R74)*100;A74:=(R74-R73)*100;A73:=(R73-R72)*100;
A72:=(R72-R71)*100;A71:=(R71-R70)*100;A70:=(R70-R69)*100;A69:=(R69-R68)*100;
A68:=(R68-R67)*100;A67:=(R67-R66)*100;A66:=(R66-R65)*100;A65:=(R65-R64)*100;
A64:=(R64-R63)*100;A63:=(R63-R62)*100;A62:=(R62-R61)*100;
A61:=(R61-R60)*100;A60:=(R60-R59)*100;A59:=(R59-R58)*100;A58:=(R58-R57)*100;
A57:=(R57-R56)*100;A56:=(R56-R55)*100;A55:=(R55-R54)*100;A54:=(R54-R53)*100;
A53:=(R53-R52)*100;A52:=(R52-R51)*100;A51:=(R51-R50)*100;A50:=(R50-R49)*100;
A49:=(R49-R48)*100;A48:=(R48-R47)*100;A47:=(R47-R46)*100;A46:=(R46-R45)*100;
A45:=(R45-R44)*100;A44:=(R44-R43)*100;A43:=(R43-R42)*100;A42:=(R42-R41)*100;
A41:=(R41-R40)*100;A40:=(R40-R39)*100;A39:=(R39-R38)*100;A38:=(R38-R37)*100;
A37:=(R37-R36)*100;A36:=(R36-R35)*100;A35:=(R35-R34)*100;A34:=(R34-R33)*100;
A33:=(R33-R32)*100;A32:=(R32-R31)*100;A31:=(R31-R30)*100;A30:=(R30-R29)*100;
A29:=(R29-R28)*100;A28:=(R28-R27)*100;A27:=(R27-R26)*100;A26:=(R26-R25)*100;
A25:=(R25-R24)*100;A24:=(R24-R23)*100;A23:=(R23-R22)*100;A22:=(R22-R21)*100;
A21:=(R21-R20)*100;A20:=(R20-R19)*100;A19:=(R19-R18)*100;A18:=(R18-R17)*100;
A17:=(R17-R16)*100;A16:=(R16-R15)*100;A15:=(R15-R14)*100;A14:=(R14-R13)*100;
A13:=(R13-R12)*100;A12:=(R12-R11)*100;A11:=(R11-R10)*100;A10:=(R10-R9)*100;
A9:=(R9-R8)*100;A8:=(R8-R7)*100;A7:=(R7-R6)*100;A6:=(R6-R5)*100;A5:=(R5-R4)*100;
A4:=(R4-R3)*100;A3:=(R3-R2)*100;A2:=(R2-R1)*100;
WX100:MAX(A100,A99);WX99:MAX(A99,A98);WX98:MAX(A98,A97);WX97:MAX(A97,A96);
WX96:MAX(A96,A95);WX95:MAX(A95,A94);WX94:MAX(A94,A93);WX93:MAX(A93,A92);
WX92:MAX(A92,A91);WX91:MAX(A91,A90);WX90:MAX(A90,A89);WX89:MAX(A89,A88);
WX88:MAX(A88,A87);WX87:MAX(A87,A86);WX86:MAX(A86,A85);WX85:MAX(A85,A84);
WX84:MAX(A84,A83);WX83:MAX(A83,A82);WX82:MAX(A82,A81);WX81:MAX(A81,A80);
WX80:MAX(A80,A79);WX79:MAX(A79,A78);WX78:MAX(A78,A77);WX77:MAX(A77,A76);
WX76:MAX(A76,A75);WX75:MAX(A75,A74);WX74:MAX(A74,A73);WX73:MAX(A73,A72);
WX72:MAX(A72,A71);WX71:MAX(A71,A70);WX70:MAX(A70,A69);WX69:MAX(A69,A68);
WX68:MAX(A68,A67);WX67:MAX(A67,A66);WX66:MAX(A66,A65);WX65:MAX(A65,A64);
WX64:MAX(A64,A63);WX63:MAX(A63,A62);WX62:MAX(A62,A61);WX61:MAX(A61,A60);
WX60:MAX(A60,A59);WX59:MAX(A59,A58);WX58:MAX(A58,A57);WX57:MAX(A57,A56);
WX56:MAX(A56,A55);WX55:MAX(A55,A54);WX54:MAX(A54,A53);WX53:MAX(A53,A52);
WX52:MAX(A52,A51);WX51:MAX(A51,A50);WX50:MAX(A50,A49);WX49:MAX(A49,A48);
WX48:MAX(A48,A47);WX47:MAX(A47,A46);WX46:MAX(A46,A45);WX45:MAX(A45,A44);
WX44:MAX(A44,A43);WX43:MAX(A43,A42);WX42:MAX(A42,A41);WX41:MAX(A41,A40);
WX40:MAX(A40,A39);WX39:MAX(A39,A38);WX38:MAX(A38,A37);WX37:MAX(A37,A36);
WX36:MAX(A36,A35);WX35:MAX(A35,A34);WX34:MAX(A34,A33);WX33:MAX(A33,A32);
WX32:MAX(A32,A31);WX31:MAX(A31,A30);WX30:MAX(A30,A29);WX29:MAX(A29,A28);
WX28:MAX(A28,A27);WX27:MAX(A27,A26);WX26:MAX(A26,A25);WX25:MAX(A25,A24);
WX24:MAX(A24,A23);WX23:MAX(A23,A22);WX22:MAX(A22,A21);WX21:MAX(A21,A20);
WX20:MAX(A20,A19);WX19:MAX(A19,A18);WX18:MAX(A18,A17);WX17:MAX(A17,A16);
WX16:MAX(A16,A15);WX15:MAX(A15,A14);WX14:MAX(A14,A13);WX13:MAX(A13,A12);
WX12:MAX(A12,A11);WX11:MAX(A11,A10);WX10:MAX(A10,A9);WX9:MAX(A9,A8);
WX8:MAX(A8,A7);WX7:MAX(A7,A6);WX6:MAX(A6,A5);WX5:MAX(A5,A4);WX4:MAX(A4,A3);
WX3:MAX(A3,A2);
-
通达信技术部:
F100:COST(99.9);
WINNER(F100)*100;我真觉得你折腾 你这么做有意义吗 获得获利100的价格是多少 然后又 来去 这个价格的获利比是多少 ,不又回到100了 这是干啥呢
自己精简了再说
-
通达信客服:
版主说得对。理论上,Ri=i/100, Ai=1, 如果不是,是因为误差。你想做什么?
从100个数中找最大值,要写99次max()。如果你把这100个数,分别放到100根K线上(也要写100次比较),你可使用 hhv()或FindHigh()函数求max。
-
网友交流:
你要用(100*99)/2 次的max 你自己不写 谁帮你写呢 现在不支持统计同一天的很多变量 找最大值的功能 如果支持 倒是好弄 祝投资愉快!
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容