1.精选通达信主指标之最佳画线(源码分享)
2.ä¸ä¸ªç»ç´çº¿çJAVAå°ç¨åº
3.文华财经期货波浪高低点画线指标公式源码
精选通达信主指标之最佳画线(源码分享)
精选通达信主图最佳画线源码分享,源码解析关键指标配置。源码 趋势射线配置如下:趋势射线3X: DRAWLINE(L=LLV(L,源码3),L,C=HHV(C,3),L,0),COLOR9AFF;
趋势射线7: DRAWLINE(H=HHV(H,7),H,L=LLV(L,7),L,0),COLOR9AFF;
射线7X: DRAWLINE(L=LLV(L,7),L,H=HHV(H,7),L,0),COLOR9AFF;
趋势射线: DRAWLINE(H=HHV(H,),H,L=LLV(L,),L,0),COLORCFF;
射线X: DRAWLINE(L=LLV(L,),L,H=HHV(H,),L,0),COLORCFF;
趋势射线: DRAWLINE(H=HHV(H,),H,L=LLV(L,),L,0),COLORCB;
射线X: DRAWLINE(L=LLV(L,),L,H=HHV(H,),L,0),COLORCB;
趋势射线: DRAWLINE(H=HHV(H,),H,L=LLV(L,),L,0),COLORYELLOW;
射线X: DRAWLINE(L=LLV(L,),L,H=HHV(H,),L,0),COLORYELLOW;
上述配置通过计算历史最高价、最低价与当前价格之间的源码关系,形成多条趋势线,源码用于辅助分析趋势强度。源码源码精灵星光源码蛋兑换码 关键点识别逻辑如下:A1至D1、源码D定义了高点识别逻辑,源码通过比较当前价格与历史价格的源码高低点,绘制蓝色高点线。源码
A2至D2、源码T、源码U定义了低点识别逻辑,源码彩票合买源码类似地,源码绘制蓝色低点线。源码
M参数用于计算更长周期的高点和低点识别,绘制红色高点线和红色低点线,以提供更长远的趋势指引。
最后的安卓 内核 源码VAR至VAR部分使用了比较与交叉逻辑,通过计算历史最高价与最低价,并与当前收盘价进行比较,确定压力位与支撑位,以辅助交易决策。 以上代码展示了通达信主图的高级画线技巧,通过综合多条趋势线与关键点识别,eclipse 导入android源码为投资者提供了直观且丰富的市场分析工具。在实际应用中,需结合具体市场情况和交易策略进行调整与优化。ä¸ä¸ªç»ç´çº¿çJAVAå°ç¨åº
è¿æ¯æ以ååçä¸ä¸ªå¯ä»¥ç»å¤é¢è²å¤å¾å½¢çä¸è¥¿ï¼ç»ä½ çç..
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.Map;
import javax.swing.*;
public class DrawBorder extends JFrame implements MouseListener,
MouseMotionListener {
// private JComboBox;
private JLabel label;
private JLabel labelColor;
private JLabel labelShape;
private String[] colors = { "Black", "Blue", "Green", "Cyan", "Gray",
"Orange", "Red" };
private String[] shapes = { "Line", "Rectangle", "Oval", "TDRectangle" };
private Map mpColor;
private JComboBox comboboxColor;
private JComboBox comboboxShape;
ArrayList lstShape;
protected int x1;
protected int y1;
protected int x2;
protected int y2;
protected String color;
private String shape;
public void display() {
shape = "Line";
comboboxShape = new JComboBox(shapes);
comboboxShape.setMaximumRowCount(shapes.length);
comboboxShape.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent event) {
// determine whether check box selected
if (event.getStateChange() == ItemEvent.SELECTED) {
shape = shapes[comboboxShape.getSelectedIndex()];
}
}
});
color = "BLACK";
comboboxColor = new JComboBox(colors);
comboboxColor.setMaximumRowCount(colors.length);
comboboxColor.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent event) {
if (event.getStateChange() == ItemEvent.SELECTED) {
color = colors[comboboxColor.getSelectedIndex()];
}
}
});
label = new JLabel();
labelShape = new JLabel("å¾å½¢:");
labelColor = new JLabel("é¢è²:");
label.setText(shape);
// getContentPane().add(label);
lstShape = new ArrayList();
Container container = getContentPane();
container.setLayout(new FlowLayout());
container.add(labelShape);
container.add(comboboxShape);
container.add(labelColor);
container.add(comboboxColor);
container.add(label);
getContentPane().setBackground(Color.WHITE);
addMouseListener(this);
addMouseMotionListener(this);
setSize(, );
setVisible(true);
}
public void mouseClicked(MouseEvent e) {
label.setText("åå»é¼ æ å¨: [" + e.getX() + ", " + e.getY() + "]");
}
public void mouseEntered(MouseEvent e) {
label.setText("é¼ æ å¨: [" + e.getX() + ", " + e.getY() + "]");
}
public void mouseExited(MouseEvent e) {
label.setText("é¼ æ å¨: [çªå£å¤]");
}
public void mousePressed(MouseEvent e) {
label.setText("æä½é¼ æ å¨: [" + e.getX() + ", " + e.getY() + "]");
x1 = e.getX();
y1 = e.getY();
}
public void mouseReleased(MouseEvent e) {
label.setText("æ¾å¼é¼ æ å¨: [" + e.getX() + ", " + e.getY() + "]");
// å¤ææ¯å¦æä½é¼ æ 并æå¨è¿ï¼å¦æä¸åä¸äº§çå¾å½¢
if (((x1 == 0 && y1 == 0) || (x2 == 0 && y2 == 0)) == false) {
if (this.shape.equals("Line")) {
lstShape.add(new Line(x1, y1, x2, y2, color));
}
else if (this.shape.equals("Rectangle")) {
if (x2 > x1 && y2 > y1) {
lstShape.add(new Rectangle(x1, y1, x2 - x1, y2 - y1, color));
}
else if (x2 < x1 && y2 > y1) {
lstShape.add(new Rectangle(x2, y1, x1 - x2, y2 - y1, color));
}
else if (x2 > x1 && y2 < y1) {
lstShape.add(new Rectangle(x1, y2, x2 - x1, y1 - y2, color));
}
else if (x2 < x1 && y2 < y1) {
lstShape.add(new Rectangle(x2, y2, x1 - x2, y1 - y2, color));
}
}
else if (this.shape.equals("Oval")) {
if (x2 > x1 && y2 > y1) {
lstShape.add(new Oval(x1, y1, x2 - x1, y2 - y1, color));
}
else if (x2 < x1 && y2 > y1) {
lstShape.add(new Oval(x2, y1, x1 - x2, y2 - y1, color));
}
else if (x2 < x1 && y2 < y1) {
lstShape.add(new Oval(x2, y2, x1 - x2, y1 - y2, color));
}
else if (x2 > x1 && y2 < y1) {
lstShape.add(new Oval(x1, y2, x2 - x1, y1 - y2, color));
}
}
else if (this.shape.equals("TDRectangle")) {
if (x2 > x1 && y2 > y1) {
lstShape.add(new TDRectangle(x1, y1, x2 - x1, y2 - y1, color));
}
else if (x2 < x1 && y2 > y1) {
lstShape.add(new TDRectangle(x2, y1, x1 - x2, y2 - y1, color));
}
else if (x2 > x1 && y2 < y1) {
lstShape.add(new TDRectangle(x1, y2, x2 - x1, y1 - y2, color));
}
else if (x2 < x1 && y2 < y1) {
lstShape.add(new TDRectangle(x2, y2, x1 - x2, y1 - y2, color));
}
}
}
// åå§åå¾å½¢åæ
x1 = y1 = x2 = y2 = 0;
repaint();
}
public void mouseDragged(MouseEvent e) {
label.setText("æå¨é¼ æ å¨: [" + e.getX() + ", " + e.getY() + "]");
x2 = e.getX();
y2 = e.getY();
label.setText("å¾å½¢:" + shape);
repaint();
}
public void mouseMoved(MouseEvent e) {
label.setText("移å¨å¨é¼ æ å¨: [" + e.getX() + ", " + e.getY() + "]");
}
public void paint(Graphics g) {
super.paint(g);
g.setColor(this.toColor());
if (this.shape.equals("Line")) {
g.drawLine(x1, y1, x2, y2);
}
else if (this.shape.equals("Rectangle")) {
if (x2 > x1 && y2 > y1) {
g.drawRect(x1, y1, x2 - x1, y2 - y1);
}
else if (x2 < x1 && y2 > y1) {
g.drawRect(x2, y1, x1 - x2, y2 - y1);
}
else if (x2 < x1 && y2 < y1) {
g.drawRect(x2, y2, x1 - x2, y1 - y2);
}
else if (x2 > x1 && y2 < y1) {
g.drawRect(x1, y2, x2 - x1, y1 - y2);
}
}
else if (this.shape.equals("Oval")) {
if (x2 > x1 && y2 > y1) {
g.drawOval(x1, y1, x2 - x1, y2 - y1);
}
else if (x2 < x1 && y2 > y1) {
g.drawOval(x2, y1, x1 - x2, y2 - y1);
}
else if (x2 < x1 && y2 < y1) {
g.drawOval(x2, y2, x1 - x2, y1 - y2);
}
else if (x2 > x1 && y2 < y1) {
g.drawOval(x1, y2, x2 - x1, y1 - y2);
}
}
else if (this.shape.equals("TDRectangle")) {
if (x2 > x1 && y2 > y1) {
g.draw3DRect(x1, y1, x2 - x1, y2 - y1, true);
}
else if (x2 < x1 && y2 > y1) {
g.draw3DRect(x2, y1, x1 - x2, y2 - y1, true);
}
else if (x2 < x1 && y2 < y1) {
g.draw3DRect(x2, y2, x1 - x2, y1 - y2, true);
}
else if (x2 > x1 && y2 < y1) {
g.draw3DRect(x1, y2, x2 - x1, y1 - y2, true);
}
}
// ç»åºåæ¾å¨listä¸çå¾å½¢
for (Object object : lstShape) {
if (object.getClass().toString().equals("class DrawBorder$Line")) {
Line line = (Line) object;
g.setColor(line.toColor());
g.drawLine(line.x1, line.y1, line.x2, line.y2);
}
else if (object.getClass().toString()
.equals("class DrawBorder$Rectangle")) {
Rectangle rectangle = (Rectangle) object;
g.setColor(rectangle.toColor());
g.drawRect(rectangle.x1, rectangle.y1, rectangle.x2, rectangle.y2);
}
else if (object.getClass().toString().equals("class DrawBorder$Oval")) {
Oval oval = (Oval) object;
g.setColor(oval.toColor());
g.drawOval(oval.x1, oval.y1, oval.x2, oval.y2);
}
else if (object.getClass().toString().equals(
"class DrawBorder$TDRectangle")) {
TDRectangle tDRectangle = (TDRectangle) object;
g.setColor(tDRectangle.toColor());
g.draw3DRect(tDRectangle.x1, tDRectangle.y1, tDRectangle.x2,
tDRectangle.y2, false);
}
}
}
public static void main(String[] args) {
DrawBorder db = new DrawBorder();
db.display();
db.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public Color toColor() {
if (this.color.equals("Blue")) {
return Color.BLUE;
}
else if (this.color.equals("Green")) {
return Color.GREEN;
}
else if (this.color.equals("Cyan")) {
return Color.CYAN;
}
else if (this.color.equals("Gray")) {
return Color.GRAY;
}
else if (this.color.equals("Orange")) {
return Color.ORANGE;
}
else if (this.color.equals("Red")) {
return Color.RED;
}
else
return Color.BLACK;
}
class Line extends DrawBorder {
Line(int x1, int y1, int x2, int y2, String color) {
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
this.color = color;
}
}
class Rectangle extends DrawBorder {
Rectangle(int x1, int y1, int x2, int y2, String color) {
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
this.color = color;
}
}
class Oval extends DrawBorder {
Oval(int x1, int y1, int x2, int y2, String color) {
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
this.color = color;
}
}
class TDRectangle extends DrawBorder {
TDRectangle(int x1, int y1, int x2, int y2, String color) {
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
this.color = color;
}
}
}
文华财经期货波浪高低点画线指标公式源码
文华财经期货波浪高低点画线指标公式源码
为捕捉期货市场的波浪高低点,以下源码提供了一种实用的指标计算方式。
首先,android 源码导入eclipse我们定义了窗口大小N为。
接下来,我们通过HHX变量检查当前最高价是否在过去N天中最高,若成立则HHX变为真。
NH表示HHX变为真后的天数累计。
类似地,我们定义了LLX和NL变量,用于检查最低价的相对位置。
AH和AL变量根据特定逻辑判断波浪高低点,并使用BACKSET函数记录。
TT变量用于判断是否为最后一天的交易。
使用DRAWLINE1函数绘制交叉点时的线条,当AH等于1且TT为真时,绘制从最高价到计算结果的绿色线;当AL等于1且TT为真时,绘制从最低价到计算结果的红色线。
我们还定义了HH2和LL2变量,以及AH2和AL2变量,用于在N+1天窗口内的波浪高低点检查。
最后,我们使用DRAWLINE3函数绘制特定条件下的线段,确保了代码逻辑的完整性和准确性。