How Scripts Work: Difference between revisions
From MultiCharts
→How Orders Are Sent Depending on the Last Bar Status
(One intermediate revision by the same user not shown) | |||
Line 198: | Line 198: | ||
'''Examples'''<br> | '''Examples'''<br> | ||
''Situation 1''<br> | ''Situation 1''<br> | ||
''2 and 2, where the number stands for the bar status from the script.''<br> | ''2 and 2, where the number stands for the bar status from the script.''<br> | ||
Only This Bar Close orders are sent if there are no new bars on the chart by this moment.<br> | Only This Bar Close orders are sent if there are no new bars on the chart by this moment.<br> | ||
If there is the new | If there is the new bar on the chart by this moment, Next Bar Market, Next Bar Price orders will be sent next.<br> | ||
''Situation 2''</br> | ''Situation 2''</br> | ||
''2 and 1''<br> | ''2 and 1''<br> | ||
Only This Bar Close orders are sent if there are no new bars on the chart by this moment.<br> | Only This Bar Close orders are sent if there are no new bars on the chart by this moment.<br> | ||
If there is the new | If there is the new bar on the chart by this moment, Next Bar Market, Next Bar Price orders will be sent next.<br> | ||
''1 and 2''<br> | ''1 and 2''<br> | ||
Nothing is sent until the bar of the base data series is closed.<br> | Nothing is sent until the bar of the base data series is closed.<br> | ||
''Situation 3''<br> | ''Situation 3''<br> | ||
''1 and 2''<br> | ''1 and 2''<br> | ||
Line 214: | Line 216: | ||
''2 and 1''<br> | ''2 and 1''<br> | ||
Only This Bar Close orders are sent if there are no new bars on the chart by this moment.<br> | Only This Bar Close orders are sent if there are no new bars on the chart by this moment.<br> | ||
If there is the new | If there is the new bar on the chart by this moment, Next Bar Market, Next Bar Price orders will be sent next.<br> | ||
''Situation 4''<br> | ''Situation 4''<br> | ||
''1 and 2''<br> | ''1 and 2''<br> | ||
Line 220: | Line 223: | ||
''2 and -1''<br> | ''2 and -1''<br> | ||
Only This Bar Close orders are sent if there are no new bars on the chart by this moment.<br> | Only This Bar Close orders are sent if there are no new bars on the chart by this moment.<br> | ||
If there is the new | If there is the new bar on the chart by this moment, Next Bar Market, Next Bar Price orders will be sent next.<br> | ||
[[Category:PowerLanguage]] | [[Category:PowerLanguage]] |