689
edits
No edit summary |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 13: | Line 13: | ||
==Monitoring from Script== | ==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. | 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, | Adding the following line under the same conditions right before the line, when generating your buy/sell orders, will help you to understand at what particular bar, when, and at what price your order is triggered in the code: | ||
<br> | <br> | ||
<br> | <br> | ||
Line 24: | Line 24: | ||
'''If MinMove < 10 then''' <br> | '''If MinMove < 10 then''' <br> | ||
'''Scale = 1;'''<br> | '''Scale = 1;'''<br> | ||
'''If MinMove > 99 and MinMove | '''If MinMove > 99 and MinMove < 1000 then''' <br> | ||
'''Scale = 2;'''<br> | '''Scale = 2;'''<br> | ||
'''If MinMove > 999 and MinMove | '''If MinMove > 999 and MinMove < 10000 then'''<br> | ||
'''Scale = 3;'''<br> | '''Scale = 3;'''<br> | ||
'''If MinMove > 9999 and MinMove | '''If MinMove > 9999 and MinMove < 100000 then'''<br> | ||
'''Scale = 4;'''<br> | '''Scale = 4;'''<br> | ||
'''If MinMove > 99999 and MinMove | '''If MinMove > 99999 and MinMove < 1000000 then'''<br> | ||
'''Scale = 5;''' | '''Scale = 5;''' | ||
<br> | <br> | ||
Line 53: | Line 53: | ||
'''"The date is ", DateToString(DateToJulian(Date)), ",", NewLine,<br> | '''"The date is ", DateToString(DateToJulian(Date)), ",", NewLine,<br> | ||
'''"time is ", TimeToString(ELTimeToDateTime(Time)), ",", NewLine,<br> | '''"time is ", TimeToString(ELTimeToDateTime(Time)), ",", NewLine,<br> | ||
'''"bar # is ", | '''"bar # is ", symbol_currentbar, ",", NewLine,<br> | ||
'''"current bar open is ", open, ",", NewLine,<br> | '''"current bar open is ", open, ",", NewLine,<br> | ||
'''"current bar high is ", high, ",", NewLine,<br> | '''"current bar high is ", high, ",", NewLine,<br> |