Changes

Jump to navigation Jump to search

Why an Order Was or Was Not Executed

9 bytes removed, 12:42, 15 June 2017
==Monitoring from Script==
This method is extremely useful not only for backtesting, since the Order and Position Tracker has nothing in common with the historical calculation process, but also for live auto trading because you can see the strategy logic printed out in real-time.
Adding the following line under the same conditions right before the line, when generating your buy/sell orders, it will help you to understand at what particular bar, when, and at what price, your order is triggered in the code:
<br>
<br>
'''If MinMove < 10 then''' <br>
'''Scale = 1;'''<br>
'''If MinMove > 99 and MinMove > < 1000 then''' <br>
'''Scale = 2;'''<br>
'''If MinMove > 999 and MinMove > < 10000 then'''<br>
'''Scale = 3;'''<br>
'''If MinMove > 9999 and MinMove > < 100000 then'''<br>
'''Scale = 4;'''<br>
'''If MinMove > 99999 and MinMove > < 1000000 then'''<br>
'''Scale = 5;'''
<br>
'''"The date is ", DateToString(DateToJulian(Date)), ",", NewLine,<br>
'''"time is ", TimeToString(ELTimeToDateTime(Time)), ",", NewLine,<br>
'''"bar # is ", maxbarsback+currentbarsymbol_currentbar, ",", NewLine,<br>
'''"current bar open is ", open, ",", NewLine,<br>
'''"current bar high is ", high, ",", NewLine,<br>

Navigation menu