Changes

Jump to navigation Jump to search

Why an Order Was or Was Not Executed

192 bytes added, 12:34, 7 August 2019
<br>
<br>
'''Var: Scale(0);''' <br><br>
'''Condition1 = close > close[1];'''
<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 = 4;'''<br>
'''If MinMove > 99999 and MinMove < 1000000 then'''<br>
'''Scale = 5;'''<br><br>
'''If Condition1 = true then begin'''<br>
'''print( "======================", NewLine,'''<br> '''"The date is :", DateToString(DateToJulian(Date)), ",", NewLine,'''<br> '''"time is : ", TimeToString(ELTimeToDateTime(TimeTime_s)), ",", NewLine,'''<br> '''"bar # is : ", maxbarsback+currentbar, ",", NewLine,'''<br> '''"current bar open is : ", open, ",", NewLine,'''<br> '''"current bar high is : ", high, ",", NewLine,'''<br> '''"current bar low is : ", low, ",", NewLine,'''<br> '''"current bar close is : ", close, ",", NewLine,'''<br> '''"market position on chart is: ", MarketPosition, ",", NewLine,'''<br> '''"market position at broker is: ", MarketPosition_at_Broker, ",", NewLine,'''<br> '''"Condition1 is true, so at close of this bar the limit order to buy at : ", NumToStr(close,scale), " is generated by the script", NewLine, '''<br> '''"to be executed at bar # : ", maxbarsback+currentbar+1, NewLine,'''<br>'''"Bar Status is: ", barstatus(1));'''<br> '''Buy next bar at close limit;'''<br> '''end else begin'''<br>'''print( "======================", NewLine,'''<br>'''"The date is: ", DateToString(DateToJulian(Date)), ",", NewLine,'''<br>'''"time is: ", TimeToString(ELTimeToDateTime(Time)), ",", NewLine,'''<br>'''"bar # is: ", symbol_currentbar, ",", NewLine,'''<br>'''"current bar open is: ", open, ",", NewLine,'''<br>'''"current bar high is: ", high, ",", NewLine,'''<br>'''"current bar low is: ", low, ",", NewLine,'''<br>'''"current bar close is: ", close, ",", NewLine,'''<br>'''"market position on chart is: ", MarketPosition, ",", NewLine,'''<br>'''"market position at broker is: ", MarketPosition_at_Broker, ",", NewLine,'''<br>'''"Condition1 is false, so no order is generated.", NewLine,'''<br>'''"Bar Status is: ", barstatus(1));'''<br>'''end;'''<br>
<br>
'''end else begin<br> '''print( "======================"Note: if using more than one data series, NewLine,<br> '''"The date is ", DateToString(DateToJulian(Date)), ",", NewLine,<br> '''"time is ", TimeToString(ELTimeToDateTime(Time)), ",", NewLine,<br> '''"bar # is ", symbol_currentbar, ",", NewLine,<br> '''"current bar open is ", open, ",", NewLine,<br> '''"current bar high is ", high, ",", NewLine,<br> '''"current bar low is ", low, ",", NewLine,<br> '''"current bar close is ", close, ",", NewLine,<br> '''"market position on chart is", MarketPosition, ",", NewLine,<br> '''"market position at broker is", MarketPosition_at_Broker, ",", NewLine,<br> '''"Condition1 is false, so no order is generatedspecify the DataNum for [BarStatus].");<br>'''end;'''
<br>
<br>

Navigation menu