'5122740': accepted exchange sell 1.00 DINRM at market, close #133675792 buy 1.00 DINRM 149.07 '5122740': deal #117297621 sell 1.00 DINRM at 149.07 done (based on order #133675793) '5122740': order #133675793 sell 1.00 / 1.00 DINRM at 149.07 done in 1596.317 ms
이중 슬래시가 백슬래시에서 작동하는 이유는 무엇입니까? 매크로가 활성화될 때 이중 슬래시 주석을 래핑하는 이유는 무엇입니까?
주석은 매크로의 일부가 아닙니다. 매크로는 연속적이어야 합니다. 뒤로 \는 다음 줄에서 매크로를 계속합니다. // 줄의 시작 부분에서 매크로를 중단합니다. 이러한 줄은 뒤로 끝날 수 없기 때문입니다. \
메타따옴표-데모
SYMBOL_SESSION_PRICE_LIMIT_MIN == 1199.2. 하지만 더 높은 가격에도 BuyLimit을 설정할 수 없습니다.
그래서 저는 왜 매크로가 이중 슬래시가 있는 줄을 고려하는지 묻습니다. 건너뛰어야 합니다.
이 경우 주석은 빈 문자열로 대체되고(문자열 자체는 그대로 유지되는 동안 주석 텍스트 는 무시됨) 빈 문자열은 매크로를 종료합니다.
if ( true ) \
{ \
Print ( "" ); \
}
이 경우 주석은 빈 문자열 로 바뀝니다.
if ( true ) \
{ \
Print ( "" ); \
}
유능한 대본을 쓰다 보면 브레이크 수리가 어렵지 않을 것 같다. 다음은 50ms 핑으로 매우 빠르게 일어나는 일입니다.
2017.02 . 10 21 : 32 : 42.796 Trades '5122740' : accepted exchange buy 1.00 Si- 3.17 at market
2017.02 . 10 21 : 32 : 42.806 Trades '5122740' : deal # 117193624 buy 1.00 Si- 3.17 at 58810 done (based on order # 133580668 )
2017.02 . 10 21 : 32 : 42.808 Trades '5122740' : order # 133580668 buy 1.00 / 1.00 Si- 3.17 at 58810 done in 81.663 ms
2017.02 . 10 21 : 32 : 42.810 Trades '5122740' : modify # 133580668 buy 1.00 Si- 3.17 sl: 0 , tp: 0 -> sl: 58710 , tp: 58910
2017.02 . 10 21 : 32 : 42.886 Trades '5122740' : accepted modify # 133580668 buy 1.00 Si- 3.17 sl: 0 , tp: 0 -> sl: 58710 , tp: 58910
2017.02 . 10 21 : 32 : 42.888 Trades '5122740' : modify # 133580668 buy 1.00 Si- 3.17 -> sl: 58710 , tp: 58910 done in 78.188 ms
2017.02 . 10 21 : 32 : 42.888 Trades '5122740' : exchange sell 1.00 Si- 3.17 at market, close # 133580668 buy 1.00 Si- 3.17 58810
2017.02 . 10 21 : 32 : 43.079 Trades '5122740' : accepted exchange sell 1.00 Si- 3.17 at market, close # 133580668 buy 1.00 Si- 3.17 58810
2017.02 . 10 21 : 32 : 43.079 Trades '5122740' : deal # 117193626 sell 1.00 Si- 3.17 at 58810 done (based on order # 133580670 )
2017.02 . 10 21 : 32 : 43.080 Trades '5122740' : order # 133580670 sell 1.00 / 1.00 Si- 3.17 at 58810 done in 192.146 ms
2017.02 . 10 21 : 32 : 43.081 Trades '5122740' : buy limit 1.00 Si- 3.17 at 58713
2017.02 . 10 21 : 32 : 43.221 Trades '5122740' : accepted buy limit 1.00 Si- 3.17 at 58713
2017.02 . 10 21 : 32 : 43.222 Trades '5122740' : order # 133580671 buy limit 1.00 / 1.00 Si- 3.17 at market done in 141.851 ms
2017.02 . 10 21 : 32 : 43.222 Trades '5122740' : cancel order # 133580671 buy limit 1.00 Si- 3.17 at 58713
2017.02 . 10 21 : 32 : 43.652 Trades '5122740' : accepted cancel order # 133580671 buy limit 1.00 Si- 3.17 at 58713
2017.02 . 10 21 : 32 : 43.653 Trades '5122740' : cancel # 133580671 buy limit 1.00 Si- 3.17 at market done in 430.484 ms
2017.02.13 12:44:48.737 Trades '5122740': accepted buy limit 1.00 RTS-12.17 at 114430
2017.02.13 12:44:48.739 Trades '5122740': order #133670570 buy limit 1.00 / 1.00 RTS-12.17 at market done in 634.624 ms
Request.magic = 0
Request.order = 0
Request.symbol = RTS- 12.17
Request.volume = 1.0
Request.price = 114430.0
Request.stoplimit = 0.0
Request.sl = 0.0
Request.tp = 0.0
Request.deviation = 100
Request.type = ORDER_TYPE_BUY_LIMIT ( 2 )
Request.type_filling = ORDER_FILLING_RETURN ( 2 )
Request.type_time = ORDER_TIME_DAY ( 1 )
Request.expiration = 1970.01 . 01 00 : 00 : 00
Request.comment = My Order
Request.position = 0
Request.position_by = 0
Result.retcode = 10009
Result.deal = 0
Result.order = 133670570
Result.volume = 1.0
Result.price = 0.0
Result.bid = 0.0
Result.ask = 0.0
Result.comment = Request executed 634.708 + 0.002 ms
Result.request_id = 5827
Result.retcode_external = 0
MT5는 불행히도 속도가 느려집니다.
더 멋진 - 데모 1.5초 시장 수행!
'5122740': deal #117297621 sell 1.00 DINRM at 149.07 done (based on order #133675793)
'5122740': order #133675793 sell 1.00 / 1.00 DINRM at 149.07 done in 1596.317 ms
요구
Request.magic = 0
Request.order = 0
Request.symbol = DINRM
Request.volume = 1.0
Request.price = 149.04
Request.stoplimit = 0.0
Request.sl = 0.0
Request.tp = 0.0
Request.deviation = 100
Request.type = ORDER_TYPE_SELL ( 1 )
Request.type_filling = ORDER_FILLING_RETURN ( 2 )
Request.type_time = ORDER_TIME_GTC ( 0 )
Request.expiration = 1970.01 . 01 00 : 00 : 00
Request.comment =
Request.position = 133675792
Request.position_by = 0
Result.retcode = 10009
Result.deal = 117297621
Result.order = 133675793
Result.volume = 1.0
Result.price = 149.07
Result.bid = 149.04
Result.ask = 149.06
Result.comment = Request executed 1596.364 + 0.209 ms
Result.request_id = 13486
Result.retcode_external = 0
나는 이것을 비논리적이라고 생각한다. 빈 줄도 안됩니다.
// 주석이 뒤에 오는 것을 의미하며 전체 행이 주석이라는 의미는 아닙니다. 제거 // - 빈 문자열 가져오기
동의한다! 그러나 매크로의 경우 이는 불편합니다.
코드 조각을 매크로로 만들고 싶다고 상상해 보십시오. 예를 들어 함수를 매크로로 바꿉니다.
그가 각 줄 끝에 백슬래시를 던지면 끝난 것 같습니다. 안, 안돼! 이중 슬래시를 /* */로 바꿉니다. 그리고 /* */ 가 같은 줄에 없으면 정말 나쁜 것입니다.