Label Sizes
This commit is contained in:
1 parent
46c733b872
commit
78146c6ca4
2 files changed
+29
-32
No files matched your search
+7
-10
@@ -987,11 +987,11 @@
|
||||
|
||||
if (record.type === 'Buy@StopLoss') {
|
||||
|
||||
line1 = 'Stop';
|
||||
line1 = 'STOP';
|
||||
|
||||
} else {
|
||||
|
||||
line1 = 'PT';
|
||||
line1 = 'TP';
|
||||
}
|
||||
|
||||
if (record.lastProfit < 0) {
|
||||
@@ -1068,15 +1068,12 @@
|
||||
|
||||
/* Send the current record to the panel */
|
||||
|
||||
if (datetime !== undefined) {
|
||||
let dateValue = datetime.valueOf();
|
||||
if (dateValue >= record.begin && dateValue <= record.end) {
|
||||
if (userPositionDate >= record.begin && userPositionDate <= record.end) {
|
||||
|
||||
let currentRecord = {
|
||||
innerRecord: record
|
||||
};
|
||||
thisObject.container.eventHandler.raiseEvent("Current Record Changed", currentRecord);
|
||||
}
|
||||
let currentRecord = {
|
||||
innerRecord: record
|
||||
};
|
||||
thisObject.container.eventHandler.raiseEvent("Current Record Changed", currentRecord);
|
||||
}
|
||||
|
||||
/* This is how we write the text */
|
||||
|
||||
+22
-22
@@ -97,87 +97,87 @@ function newAAMastersPlottersTradingSimulationTradingSimulationTradingSimulation
|
||||
y = y + increment;
|
||||
printLabel('Balance A', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.balanceA, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.balanceA, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Balance B', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.balanceB, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.balanceB, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Profit', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.profit, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.profit, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Last Profit', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.lastProfit, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.lastProfit, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Last Profit %', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel((currentRecord.innerRecord.lastProfitPercent).toFixed(2) + ' % ', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel((currentRecord.innerRecord.lastProfitPercent).toFixed(2) + ' % ', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Sell Rate', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
printLabel('Rate', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.sellRate, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.sellRate, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Stop Loss', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
printLabel('Stop', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.stopLoss, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.stopLoss, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Buy Order', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
printLabel('Take Profit', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.buyOrder, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.buyOrder, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Roundtrips', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
printLabel('Trades', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.roundtrips, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.roundtrips, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Hits', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.hits, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.hits, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Fails', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.fails, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.fails, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Hit Ratio', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel((currentRecord.innerRecord.hitRatio * 100).toFixed(2) + ' %', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel((currentRecord.innerRecord.hitRatio * 100).toFixed(2) + ' %', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('ROI', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel((currentRecord.innerRecord.ROI * 100).toFixed(2) + ' %', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel((currentRecord.innerRecord.ROI * 100).toFixed(2) + ' %', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Periods', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.periods, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.periods, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Days', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel(currentRecord.innerRecord.days, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel(currentRecord.innerRecord.days, X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
y = y + increment;
|
||||
printLabel('Anualized Rate of Return', X_AXIS, frameTitleHeight + frameBodyHeight * y, '1');
|
||||
y = y + increment;
|
||||
printLabel((currentRecord.innerRecord.anualizedRateOfReturn * 100).toFixed(2) + ' %', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50');
|
||||
printLabel((currentRecord.innerRecord.anualizedRateOfReturn * 100).toFixed(2) + ' %', X_AXIS, frameTitleHeight + frameBodyHeight * y, '0.50',16);
|
||||
|
||||
function printLabel(labelToPrint, x, y, opacity) {
|
||||
function printLabel(labelToPrint, x, y, opacity, fontSize) {
|
||||
|
||||
let labelPoint;
|
||||
let fontSize = 10;
|
||||
if (fontSize === undefined) { fontSize = 10 };
|
||||
|
||||
browserCanvasContext.font = fontSize + 'px ' + UI_FONT.SECONDARY + ' Saira';
|
||||
|
||||
|
||||
Reference in new issue
Block a user