Advertisement
Guest User

PlotTe

a guest
Sep 3rd, 2021
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 20.90 KB | None | 0 0
  1.  
  2. package PtestForDummies;
  3.  
  4. import com.motivewave.platform.sdk.common.*;
  5. import com.motivewave.platform.sdk.common.Enums.MAMethod;
  6. import com.motivewave.platform.sdk.common.desc.*;
  7. import com.motivewave.platform.sdk.draw.Label;
  8. import com.motivewave.platform.sdk.draw.Line;
  9. import com.motivewave.platform.sdk.draw.Marker;
  10. import com.motivewave.platform.sdk.study.Plot;
  11. import com.motivewave.platform.sdk.study.RuntimeDescriptor;
  12. import com.motivewave.platform.sdk.study.StudyHeader;
  13.  
  14. import java.awt.*;
  15.  
  16.  
  17.  
  18. @StudyHeader(
  19.         namespace="com.none",
  20.         id="TestPlots",
  21.         name="Plot Testing for Dummies",
  22.         desc="I still believe something is wrong",
  23.         menu="VB6.systems",
  24.         label="Plot testing for Dummies",
  25.         overlay=false,
  26.         studyOverlay=false,
  27.         signals=true,
  28.         secured=false,
  29. //    requiresBarUpdates = true,
  30.         underlayByDefault = true)
  31.  
  32.  
  33.  
  34. public class testPlots_for_Forum extends com.motivewave.platform.sdk.study.Study {
  35.     enum Values {
  36.         TOP, MIDDLE, BOTTOM, FAST, SLOW, FILTER, HHH_TUNNEL, XXX_OSC, XXX_SIGNAL,
  37.         YYY1, YYY1_K, YYY2, YYY2_K, YYY3, YYY3_K, YYY4, YYY4_K, WWWWR, ZZZ, ZZZ_UP, ZZZ_DOWN
  38.     }
  39.  
  40.  
  41.     enum zzMarkers {
  42.         XXXZZZ1, XXXZZZ2, XXXZZZ3, XXXZZZ4, XXXZZZ5
  43.     }
  44.  
  45.     enum EntrySignals {
  46.         FILTER_CROSS_ABOVE_TUNNEL, FILTER_CROSS_BELOW_TUNNEL,
  47.         TOP_CROSS_ABOVE_TUNNEL, TOP_CROSS_BELOW_TUNNEL,
  48.         BOTTOM_CROSS_ABOVE_TUNNEL, BOTTOM_CROSS_BELOW_TUNNEL
  49.     }
  50.  
  51.     ;
  52.  
  53.     // Cleared
  54.     final static String TOP_PATH = "topPath";
  55.     final static String TOP_IND = "topInd";
  56.     final static String MIDDLE_PATH = "middlePath";
  57.     final static String MIDDLE_IND = "middleInd";
  58.     final static String BOTTOM_PATH = "bottomPath";
  59.     final static String BOTTOM_IND = "bottomInd";
  60.     // Filter
  61.     final static String FILTER_PATH = "filterPath";
  62.     final static String FILTER_IND = "filterInd";
  63.     // Tunnel
  64.     final static String FAST_PATH = "fastPath";
  65.     final static String FAST_IND = "fastInd";
  66.     final static String SLOW_PATH = "slowPath";
  67.     final static String SLOW_IND = "slowInd";
  68.  
  69.     //HHH Tunnel
  70.     final static String HHHTUNNEL_PATH = "HHHTunnelPath";
  71.     final static String HHHTUNNEL_IND = "HHHTunnelInd";
  72.     final static String HHHTUNNEL_PERIOD = "HHHTunnelPeriod";
  73.  
  74.     // XXX_some Oscillator
  75.     final static String SIGNAL_PATH = "signalPath";
  76.     final static String SIGNAL_IND = "signalInd";
  77.     final static String UP_COLOR = "upColor";
  78.     final static String DOWN_COLOR = "downColor";
  79.     final static String XXX_IND = "XXXInd";
  80.     // BBBBBBB Plus
  81.     final static String YYY1_PATH = "YYY1Path";
  82.     final static String YYY1_IND = "YYY1Ind";
  83.     final static String YYY2_PATH = "YYY2Path";
  84.     final static String YYY2_IND = "YYY2Ind";
  85.     final static String YYY3_PATH = "YYY3Path";
  86.     final static String YYY3_IND = "YYY3Ind";
  87.     final static String YYY4_PATH = "YYY4Path";
  88.     final static String YYY4_IND = "YYY4Ind";
  89.     final static String WWWWR_PATH = "WWWWrPath";
  90.     final static String WWWWR_IND = "WWWWrInd";
  91.     final static String ZZZ_PATH = "ZZZPath";
  92.     final static String ZZZ_IND = "ZZZInd";
  93.  
  94.     // Markers
  95.     final static String FILTER_UP_MARKER = "filterUpMarker";
  96.     final static String FILTER_DOWN_MARKER = "filterDownMarker";
  97.     final static String TOP_WAVE_UP_MARKER = "topWaveUpMarker";
  98.     final static String TOP_WAVE_DOWN_MARKER = "topWaveDownMarker";
  99.     final static String BOTTOM_WAVE_UP_MARKER = "bottomWaveUpMarker";
  100.     final static String BOTTOM_WAVE_DOWN_MARKER = "bottomWaveDownMarker";
  101.     //XXXZZZ
  102.     final static String ZZ_MARKER1 = "zzMarker1";
  103.     final static String ZZ_MARKER2 = "zzMarker2";
  104.     final static String ZZ_MARKER3 = "zzMarker3";
  105.     final static String ZZ_MARKER4 = "zzMarker4";
  106.     final static String ZZ_MARKER5 = "zzMarker5";
  107.  
  108.     final static String MMM_MARKER_1 = "MMMMarker1";
  109.     final static String MMM_MARKER_2 = "MMMMarker2";
  110.     final static String MMM_MARKER_3 = "MMMMarker3";
  111.  
  112.  
  113.     final static String DEPTH1 = "depth1";
  114.     final static String NUMBER_PIPS1 = "numberPips1";
  115.     final static String BACK_STEP1 = "backStep1";
  116.     final static String DEPTH2 = "depth2";
  117.     final static String NUMBER_PIPS2 = "numberPips2";
  118.     final static String BACK_STEP2 = "backStep2";
  119.     final static String DEPTH3 = "depth3";
  120.     final static String NUMBER_PIPS3 = "numberPips3";
  121.     final static String BACK_STEP3 = "backStep3";
  122.     final static String DEPTH4 = "depth4";
  123.     final static String NUMBER_PIPS4 = "numberPips4";
  124.     final static String BACK_STEP4 = "backStep4";
  125.     final static String DEPTH5 = "depth5";
  126.     final static String NUMBER_PIPS5 = "numberPips5";
  127.     final static String BACK_STEP5 = "backStep5";
  128.     final static String STACK = "stack";
  129.  
  130.     final static String First_PLOT = "FirstPlot";
  131.     final static String Second_PLOT = "SecondPlot";
  132.     final static String Third_PLOT = "ThirdPlot";
  133.  
  134.  
  135.     public static final Color GOLD = new Color(255, 215, 0);
  136.     public static final Color RED = new Color(255, 0, 0);
  137.     public static final Color BLUE = new Color(0, 255, 255);
  138.     public static final Color MAGENTA = new Color(255, 0, 255);
  139.     public static final Color BrGreen = new Color(0, 255, 0);
  140.     public static final Color Violet = new Color(238, 130, 238);
  141.     public static final Color Purple = new Color(136, 64, 190);
  142.  
  143.     public Coordinate draw = null;
  144.     public Line l = null;
  145.  
  146.     protected final static String TOTAL_FONT = "totalFont";
  147.  
  148.  
  149.     public Marker mark = new Marker(null, null, null);
  150.  
  151.  
  152.  
  153.  
  154.     @Override
  155.     public void initialize(Defaults defaults) {
  156.         SettingsDescriptor sd = new SettingsDescriptor();
  157.         setSettingsDescriptor(sd);
  158.  
  159.         addSettingTabs(sd, defaults);
  160.         RuntimeDescriptor desc = new RuntimeDescriptor();
  161.  
  162.         desc.exportValue(new ValueDescriptor(Values.TOP, "Something", null));
  163.         desc.exportValue(new ValueDescriptor(Values.MIDDLE, "Something", null));
  164.         desc.exportValue(new ValueDescriptor(Values.BOTTOM, "Something", null));
  165.         desc.exportValue(new ValueDescriptor(Values.FAST, "Something", null));
  166.         desc.exportValue(new ValueDescriptor(Values.SLOW, "Something", null));
  167.         desc.exportValue(new ValueDescriptor(Values.FILTER, "Something", null));
  168.         desc.exportValue(new ValueDescriptor(Values.HHH_TUNNEL, "Something", null));
  169.         desc.exportValue(new ValueDescriptor(Values.XXX_OSC, "Something", null));
  170.         desc.exportValue(new ValueDescriptor(Values.XXX_SIGNAL, "Something", null));
  171.         desc.exportValue(new ValueDescriptor(Values.YYY1, "Something", null));
  172.         desc.exportValue(new ValueDescriptor(Values.YYY2, "Something", null));
  173.         desc.exportValue(new ValueDescriptor(Values.YYY3, "Something", null));
  174.         desc.exportValue(new ValueDescriptor(Values.YYY4, "Something", null));
  175.         desc.exportValue(new ValueDescriptor(Values.WWWWR, "Something", null));
  176.         desc.exportValue(new ValueDescriptor(Values.ZZZ, "Something", null));
  177.         desc.exportValue(new ValueDescriptor(zzMarkers.XXXZZZ1, "Something", null));
  178.         desc.exportValue(new ValueDescriptor(zzMarkers.XXXZZZ2, "Something", null));
  179.         desc.exportValue(new ValueDescriptor(zzMarkers.XXXZZZ3, "Something", null));
  180.         desc.exportValue(new ValueDescriptor(zzMarkers.XXXZZZ4, "Something", null));
  181.         desc.exportValue(new ValueDescriptor(zzMarkers.XXXZZZ5, "Something", null));
  182.  
  183.         desc.declareSignal(EntrySignals.FILTER_CROSS_ABOVE_TUNNEL, "Filter Crosses Above Tunnel");
  184.         desc.declareSignal(EntrySignals.FILTER_CROSS_BELOW_TUNNEL, "Filter Crosses Below Tunnel");
  185.         desc.declareSignal(EntrySignals.TOP_CROSS_ABOVE_TUNNEL, "Top Crosses Above Tunnel");
  186.         desc.declareSignal(EntrySignals.TOP_CROSS_BELOW_TUNNEL, "Top Crosses Below Tunnel");
  187.         desc.declareSignal(EntrySignals.BOTTOM_CROSS_ABOVE_TUNNEL, "Bottom Crosses Above Tunnel");
  188.         desc.declareSignal(EntrySignals.BOTTOM_CROSS_BELOW_TUNNEL, "Bottom Crosses Below Tunnel");
  189.  
  190.         // Price plot
  191.         desc.getPricePlot().declarePath(Values.TOP, TOP_PATH);
  192.         desc.getPricePlot().declareIndicator(Values.TOP, TOP_IND);
  193.         desc.getPricePlot().declarePath(Values.MIDDLE, MIDDLE_PATH);
  194.         desc.getPricePlot().declareIndicator(Values.MIDDLE, MIDDLE_IND);
  195.         desc.getPricePlot().declarePath(Values.BOTTOM, BOTTOM_PATH);
  196.         desc.getPricePlot().declareIndicator(Values.BOTTOM, BOTTOM_IND);
  197.  
  198.         desc.getPricePlot().declarePath(Values.FAST, FAST_PATH);
  199.         desc.getPricePlot().declareIndicator(Values.FAST, FAST_IND);
  200.         desc.getPricePlot().declarePath(Values.SLOW, SLOW_PATH);
  201.         desc.getPricePlot().declareIndicator(Values.SLOW, SLOW_IND);
  202.         desc.getPricePlot().declarePath(Values.FILTER, FILTER_PATH);
  203.         desc.getPricePlot().declareIndicator(Values.FILTER, FILTER_IND);
  204.  
  205.         desc.getPricePlot().declarePath(Values.HHH_TUNNEL, HHHTUNNEL_PATH);
  206.         desc.getPricePlot().declareIndicator(Values.HHH_TUNNEL, HHHTUNNEL_IND);
  207.         desc.getPricePlot().setMinTick(0.0000001);
  208.  
  209.         // Some Plot
  210.         Plot firstPlot = new Plot();
  211.         desc.addPlot(First_PLOT, firstPlot);
  212.  
  213.         firstPlot.setLabelPrefix("Something");
  214.         firstPlot.declarePath(Values.XXX_SIGNAL, SIGNAL_PATH);
  215.         firstPlot.declareBars(Values.XXX_OSC);
  216.         firstPlot.declareIndicator(Values.XXX_SIGNAL, SIGNAL_IND);
  217.         firstPlot.declareIndicator(Values.XXX_OSC, XXX_IND);
  218.         firstPlot.setRangeKeys(Values.XXX_OSC, Values.XXX_SIGNAL);
  219.         firstPlot.addHorizontalLine(new LineInfo(0, null, 1.0f, new float[] {3,3}));
  220.  
  221.         // Some other Plot
  222.         Plot secondPlot = new Plot();
  223.         desc.addPlot(Second_PLOT, secondPlot);
  224.  
  225.         secondPlot.setLabelPrefix("Something Else ");
  226.         secondPlot.declarePath(Values.YYY1, YYY1_PATH);
  227.         secondPlot.declarePath(Values.YYY2, YYY2_PATH);
  228.         secondPlot.declarePath(Values.YYY3, YYY3_PATH);
  229.         secondPlot.declarePath(Values.YYY4, YYY4_PATH);
  230.         secondPlot.declarePath(Values.WWWWR, WWWWR_PATH);
  231.         secondPlot.declarePath(Values.ZZZ, ZZZ_PATH);
  232.         secondPlot.declareIndicator(Values.YYY1, YYY1_IND);
  233.         secondPlot.declareIndicator(Values.YYY2, YYY2_IND);
  234.         secondPlot.declareIndicator(Values.YYY3, YYY3_IND);
  235.         secondPlot.declareIndicator(Values.YYY4, YYY4_IND);
  236.         secondPlot.declareIndicator(Values.WWWWR, WWWWR_IND);
  237.         secondPlot.declareIndicator(Values.ZZZ, ZZZ_IND);
  238.         secondPlot.setRangeKeys(Values.YYY1 , Values.YYY2, Values.YYY3, Values.YYY4, Values.WWWWR, Values.ZZZ);
  239.         secondPlot.declareGuide(Inputs.TOP_GUIDE);
  240.         secondPlot.declareGuide(Inputs.MIDDLE_GUIDE);
  241.         secondPlot.declareGuide(Inputs.BOTTOM_GUIDE);
  242.  
  243.  
  244.         // MMM Plot
  245.         Plot thirdPlot = new Plot();
  246.         desc.addPlot(Third_PLOT, thirdPlot);
  247. //        MMMPlot.setTabName("MMM");
  248.         thirdPlot.setLabelPrefix("Something Else too");
  249.         thirdPlot.setMaxBottomValue(0);
  250.         thirdPlot.setMinTopValue(100);
  251.         thirdPlot.setMinTick(0.1);
  252.  
  253.     desc.setRangeKeys(Values.YYY1, Values.YYY2, Values.YYY3, Values.YYY4, Values.WWWWR, Values.ZZZ);
  254.         desc.setMaxBottomValue(10);
  255.         desc.setMinTopValue(90);
  256.         desc.setMinTick(0.00001);
  257.         setRuntimeDescriptor(desc);
  258.         setMinBars(158 * 8);
  259.     }
  260.  
  261.     protected void addSettingTabs(SettingsDescriptor sd, Defaults defaults) {
  262.         // Wave Settings
  263.         SettingTab tab = new SettingTab("Cleared");
  264.         sd.addTab(tab);
  265.  
  266.         SettingGroup group = new SettingGroup("Display");
  267.         tab.addGroup(group);
  268.         group.addRow(new PathDescriptor(TOP_PATH, "Upper Line", defaults.getPurple(), 1.0f, null, true, true, true));
  269.         group.addRow(new IndicatorDescriptor(TOP_IND, "Upper Ind", defaults.getPurple(), null, false, false, true));
  270.         group.addRow(new PathDescriptor(MIDDLE_PATH, "Middle Line", defaults.getPurple(), 1.0f, null, true, true, true));
  271.         group.addRow(new IndicatorDescriptor(MIDDLE_IND, "Middle Ind", defaults.getPurple(), null, false, false, true));
  272.         group.addRow(new PathDescriptor(BOTTOM_PATH, "Upper Line", defaults.getPurple(), 1.0f, null, true, true, true));
  273.         group.addRow(new IndicatorDescriptor(BOTTOM_IND, "Lower Ind", defaults.getPurple(), null, false, false, true));
  274.  
  275.         // Tunnel Settings
  276.         tab = new SettingTab("Tunnel");
  277.         sd.addTab(tab);
  278.  
  279.         group = new SettingGroup("Display");
  280.         tab.addGroup(group);
  281.         group.addRow(new PathDescriptor(FAST_PATH, "Fast Line", defaults.getLineColor(), 1.0f, null, true, true, true));
  282.         group.addRow(new IndicatorDescriptor(FAST_IND, "Fast Ind", null, null, false, false, true));
  283.         group.addRow(new PathDescriptor(SLOW_PATH, "Slow Line", defaults.getLineColor(), 1.0f, null, true, true, true));
  284.         group.addRow(new IndicatorDescriptor(SLOW_IND, "Slow Ind", null, null, false, false, true));
  285.         group.addRow(new PathDescriptor(FILTER_PATH, "Filter Line", BrGreen, 1.0f, null, true, true, true));
  286.         group.addRow(new IndicatorDescriptor(FILTER_IND, "Filter Ind", BrGreen, null, false, false, true));
  287.         group.addRow(new PathDescriptor(HHHTUNNEL_PATH, "HHH Tunnel Line", defaults.getLineColor(), 2.0f, null, true, true, true));
  288.         group.addRow(new IndicatorDescriptor(HHHTUNNEL_IND, "HHH Tunnel Ind", defaults.getTextColor(), defaults.getBackgroundColor(), false, false, true));
  289.         group.addRow(new IntegerDescriptor(HHHTUNNEL_PERIOD, "HHH Tunnel Period", 20, 1, 9999, 1));
  290.         group.addRow(new FontDescriptor(TOTAL_FONT, get("HFT Label Font"), defaults.getFont()));
  291.  
  292.         // XXX_some Oscillator Settings
  293.         tab = new SettingTab("XXX_some Osc");
  294.         sd.addTab(tab);
  295.  
  296.         group = new SettingGroup("Display");
  297.         tab.addGroup(group);
  298.         group.addRow(new PathDescriptor(SIGNAL_PATH, "Signal Line", defaults.getRedLine(), 1.0f, null, true, true, true));
  299.         group.addRow(new IndicatorDescriptor(SIGNAL_IND, "Signal Ind", defaults.getRed(), null, false, false, true));
  300.         group.addRow(new IndicatorDescriptor(XXX_IND, "Indicator", null, null, false, false, true));
  301.         group.addRow(new ColorDescriptor(UP_COLOR, "Up Color", defaults.getGreen()));
  302.         group.addRow(new ColorDescriptor(DOWN_COLOR, "Down Color", defaults.getRed()));
  303.  
  304.  
  305.         // BBBBBBB Plus Settings
  306.         tab = new SettingTab("BBBBBBB");
  307.         sd.addTab(tab);
  308.  
  309.         group = new SettingGroup("Display");
  310.         tab.addGroup(group);
  311.         group.addRow(new PathDescriptor(YYY1_PATH, "YYY 1", defaults.getYellowLine(), 2.0f, null, true, true, true));
  312.         group.addRow(new IndicatorDescriptor(YYY1_IND, "YYY 1 Ind", defaults.getYellow(), null, false, false, true));
  313.         group.addRow(new PathDescriptor(YYY2_PATH, "YYY 2", defaults.getGreenLine(), 2.0f, null, true, true, true));
  314.         group.addRow(new IndicatorDescriptor(YYY2_IND, "YYY 2 Ind", defaults.getGreen(), null, false, false, true));
  315.         group.addRow(new PathDescriptor(YYY3_PATH, "YYY 3", defaults.getBlueLine(), 2.0f, null, true, true, true));
  316.         group.addRow(new IndicatorDescriptor(YYY3_IND, "YYY 3 Ind", defaults.getBlue(), null, false, false, true));
  317.         group.addRow(new PathDescriptor(YYY4_PATH, "YYY 4", defaults.getRedLine(), 2.0f, null, true, true, true));
  318.         group.addRow(new IndicatorDescriptor(YYY4_IND, "YYY 4 Ind", defaults.getRed(), null, false, false, true));
  319.         group.addRow(new PathDescriptor(WWWWR_PATH, "WWWW ", defaults.getPurple(), 2.0f, null, true, true, true));
  320.         group.addRow(new IndicatorDescriptor(WWWWR_IND, "WWWW  Ind", defaults.getPurple(), null, false, false, true));
  321.         group.addRow(new PathDescriptor(ZZZ_PATH, "ZZZ ", defaults.getLineColor(), 2.0f, null, true, true, true));
  322.         group.addRow(new IndicatorDescriptor(ZZZ_IND, "ZZZ Ind", defaults.getLineColor(), null, false, false, true));
  323.  
  324.         sd.addInvisibleSetting(new GuideDescriptor(Inputs.TOP_GUIDE, "Top Guide", 80, 1, 100, 1, true));
  325.         GuideDescriptor mg = new GuideDescriptor(Inputs.MIDDLE_GUIDE, "Middle Guide", 50, 1, 100, 1, true);
  326.         mg.setDash(new float[]{3, 3});
  327.         sd.addInvisibleSetting(mg);
  328.         sd.addInvisibleSetting(new GuideDescriptor(Inputs.BOTTOM_GUIDE, "Bottom Guide", 20, 1, 100, 1, true));
  329.  
  330.         //XXXZZZ Settings
  331.         tab = new SettingTab("XXXZZZ");
  332.         sd.addTab(tab);
  333.         setSettingsDescriptor(sd);
  334.         SettingGroup inputs = new SettingGroup("XXXZZZ Inputs");
  335.         inputs.addRow(new IntegerDescriptor(DEPTH1, "1 Depth", 1, 1, 9999, 1),
  336.                 new IntegerDescriptor(NUMBER_PIPS1, "Deviation", 1, 1, 9999, 1),
  337.                 new IntegerDescriptor(BACK_STEP1, "Backstep", 1, 1, 9999, 1));
  338.  
  339.         inputs.addRow(new IntegerDescriptor(DEPTH2, "2 Depth", 1, 1, 9999, 1),
  340.                 new IntegerDescriptor(NUMBER_PIPS2, "Deviation", 1, 1, 9999, 1),
  341.                 new IntegerDescriptor(BACK_STEP2, "Backstep", 1, 1, 9999, 1));
  342.  
  343.         inputs.addRow(new IntegerDescriptor(DEPTH3, "3 Depth", 1, 1, 9999, 1),
  344.                 new IntegerDescriptor(NUMBER_PIPS3, "Deviation", 1, 1, 9999, 1),
  345.                 new IntegerDescriptor(BACK_STEP3, "Backstep", 1, 1, 9999, 1));
  346.  
  347.         inputs.addRow(new IntegerDescriptor(DEPTH4, "4 Depth", 1, 1, 9999, 1),
  348.                 new IntegerDescriptor(NUMBER_PIPS4, "Deviation", 1, 1, 9999, 1),
  349.                 new IntegerDescriptor(BACK_STEP4, "Backstep", 1, 1, 9999, 1));
  350.  
  351.         inputs.addRow(new IntegerDescriptor(DEPTH5, "5 Depth", 1, 1, 9999, 1),
  352.                 new IntegerDescriptor(NUMBER_PIPS5, "Deviation", 1, 1, 9999, 1),
  353.                 new IntegerDescriptor(BACK_STEP5, "Backstep", 1, 1, 9999, 1));
  354.         inputs.addRow(new BooleanDescriptor(STACK, "Stack XXXZZZ Markers", true));
  355.         tab.addGroup(inputs);
  356.  
  357.  
  358.         // Markers
  359.         tab = new SettingTab("Markers");
  360.         sd.addTab(tab);
  361.  
  362.         group = new SettingGroup("Stuff");
  363.         tab.addGroup(group);
  364.         group.addRow(new MarkerDescriptor(FILTER_UP_MARKER, "Filter Above Tunnel",
  365.                 Enums.MarkerType.LINE_ARROW, Enums.Size.LARGE, BrGreen, BrGreen, false, true));
  366.         group.addRow(new MarkerDescriptor(FILTER_DOWN_MARKER, "Filter Below Tunnel",
  367.                 Enums.MarkerType.LINE_ARROW, Enums.Size.LARGE, BrGreen, BrGreen, false, true));
  368.  
  369.         group.addRow(new MarkerDescriptor(TOP_WAVE_UP_MARKER, "Top Wave Above Tunnel",
  370.                 Enums.MarkerType.LINE_ARROW, Enums.Size.LARGE, Violet, Violet, false, true));
  371.         group.addRow(new MarkerDescriptor(TOP_WAVE_DOWN_MARKER, "Top Wave Below Tunnel",
  372.                 Enums.MarkerType.LINE_ARROW, Enums.Size.LARGE, Violet, Violet, false, true));
  373.  
  374.         group.addRow(new MarkerDescriptor(BOTTOM_WAVE_UP_MARKER, "Bottom Wave Above Tunnel",
  375.                 Enums.MarkerType.LINE_ARROW, Enums.Size.LARGE, Purple, Purple, false, true));
  376.         group.addRow(new MarkerDescriptor(BOTTOM_WAVE_DOWN_MARKER, "Bottom Wave Below Tunnel",
  377.                 Enums.MarkerType.LINE_ARROW, Enums.Size.LARGE, Purple, Purple, false, true));
  378.  
  379.         //XXXZZZ
  380.         group.addRow(new MarkerDescriptor(ZZ_MARKER1, "XXXZZZ Marker", Enums.MarkerType.DIAMOND, Enums.Size.MEDIUM,
  381.                 X11Colors.DEEP_SKY_BLUE, X11Colors.DEEP_SKY_BLUE, true, true));
  382.         group.addRow(new MarkerDescriptor(ZZ_MARKER2, "XXXZZZ Marker", Enums.MarkerType.DIAMOND, Enums.Size.LARGE,
  383.                 X11Colors.ORANGE_RED, X11Colors.ORANGE_RED, true, true));
  384.         group.addRow(new MarkerDescriptor(ZZ_MARKER3, "XXXZZZ Marker", Enums.MarkerType.DIAMOND, Enums.Size.VERY_LARGE,
  385.                 X11Colors.ORANGE, X11Colors.ORANGE, true, true));
  386.         group.addRow(new MarkerDescriptor(ZZ_MARKER4, "XXXZZZ Marker", Enums.MarkerType.LINE_ARROW, Enums.Size.LARGE,
  387.                 X11Colors.GRAY, X11Colors.GRAY, true, true));
  388.         group.addRow(new MarkerDescriptor(ZZ_MARKER5, "XXXZZZ Marker", Enums.MarkerType.LINE_ARROW, Enums.Size.LARGE,
  389.                 X11Colors.PURPLE, X11Colors.PURPLE, true, true));
  390.  
  391.         // Markers
  392.         tab = new SettingTab("More Stuff");
  393.         sd.addTab(tab);
  394.  
  395.         group = new SettingGroup("More Markers");
  396.         tab.addGroup(group);
  397.  
  398.         group.addRow(new MarkerDescriptor(MMM_MARKER_1, "Var1",
  399.                 Enums.MarkerType.CIRCLE, Enums.Size.LARGE, defaults.getGreen(), defaults.getLineColor(), true, true));
  400.         group.addRow(new MarkerDescriptor(MMM_MARKER_2, "Var2",
  401.                 Enums.MarkerType.CIRCLE, Enums.Size.LARGE, defaults.getGreen(), defaults.getLineColor(), true, true));
  402.         group.addRow(new MarkerDescriptor(MMM_MARKER_3, "Var3",
  403.                 Enums.MarkerType.CIRCLE, Enums.Size.LARGE, defaults.getPurple(), defaults.getLineColor(), true, true));
  404.  
  405.     }
  406.  
  407. //
  408.  
  409.     @Override
  410.     protected void calculateValues(DataContext ctx) {
  411.         DataSeries series = ctx.getDataSeries();
  412.  
  413.         long barTime = series.getStartTime();
  414.         int index = series.findIndex(barTime);
  415.  
  416.     }
  417.  
  418.  
  419.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement