Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Conversation

@cakasuma
Copy link
Contributor

fix dialog overlapping and end time not drawn intermittenly


if (is_sold_before_expiry) drawXLine({ line_time: sell_time, label: 'end_time', dashStyle: 'Dash' });
if (!is_path_dependent) drawXLine({ line_time: date_expiry, label: 'end_time', dashStyle: 'Dash' });
if (!is_path_dependent) drawXLine({ line_time: date_expiry && exit_tick_time, label: 'end_time', dashStyle: 'Dash' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be if (!is_path_dependent && date_expiry)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed. when i debug it the problem was, every tick should have date_expiry carry along. but then some ticks are not consistent when it stops and date expiry is not exist. thats when the problem happens. it depends on internet connection, sometime i got all date expiry carry along, sometimes some tick dont have date expiry. but by default, they should have date expiry. so i made a fallback if date expiry is not exist then use exit tick time instead. what do you think


if (is_sold_before_expiry) drawXLine({ line_time: sell_time, label: 'end_time', dashStyle: 'Dash' });
if (!is_path_dependent) drawXLine({ line_time: date_expiry, label: 'end_time', dashStyle: 'Dash' });
if (!is_path_dependent) drawXLine({ line_time: (date_expiry || exit_tick_time), label: 'end_time', dashStyle: 'Dash' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we always want to use the exit_tick_time as basis for end_time, if response doesn't have exit_tick_time then better to wait with drawing the end time until exit_tick_time is received

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drawXLines is always executed when the tick comes. for days contract, we need to use date_expiry as end time

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's drawn based on the proposal_open_contract stream / response, I think days also have exit_tick_time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, they have exit tick time, but, i dont think we can draw exit tick time for end time except path dependent contract. bcause in binary static, its totally the date expiry. i think i have to find a way. to make it draw the date_expiry regardless it exist or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one solution might be triggering to draw chart after the contract finish

@OskarAhl OskarAhl merged commit bcfbc21 into binary-com:development Feb 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants