//+------------------------------------------------------------------+//| Check for long position opening |//+------------------------------------------------------------------+bool CSampleExpert::LongOpened( void )
{
bool res= false ;
//--- check for long position (BUY) possibility
{
double price=m_symbol.Ask();
double tp =m_symbol.Bid()+m_take_profit;
//--- check for free moneyif (m_account.FreeMarginCheck( Symbol (), ORDER_TYPE_BUY ,InpLots,price)< 0.0 )
printf ( "We have no money. Free Margin = %f" ,m_account.FreeMargin());
else
{
//--- open positionif (m_trade.PositionOpen( Symbol (), ORDER_TYPE_BUY ,InpLots,price, 0.0 ,tp))
printf ( "Position by %s to be opened" , Symbol ());
else
{
printf ( "Error opening BUY position by %s : '%s'" , Symbol (),m_trade.ResultComment());
printf ( "Open parameters : price=%f,TP=%f" ,price,tp);
}
}
//--- in any case we must exit from expert
res= true ;
}
//--- resultreturn (res);
}
//+------------------------------------------------------------------+//| Check for short position opening |//+------------------------------------------------------------------+bool CSampleExpert::ShortOpened( void )
{
bool res= false ;
//--- check for short position (SELL) possibility
{
double price=m_symbol.Bid();
double tp =m_symbol.Ask()-m_take_profit;
//--- check for free moneyif (m_account.FreeMarginCheck( Symbol (), ORDER_TYPE_SELL ,InpLots,price)< 0.0 )
printf ( "We have no money. Free Margin = %f" ,m_account.FreeMargin());
else
{
//--- open positionif (m_trade.PositionOpen( Symbol (), ORDER_TYPE_SELL ,InpLots,price, 0.0 ,tp))
printf ( "Position by %s to be opened" , Symbol ());
else
{
printf ( "Error opening SELL position by %s : '%s'" , Symbol (),m_trade.ResultComment());
printf ( "Open parameters : price=%f,TP=%f" ,price,tp);
}
}
//--- in any case we must exit from expert
res= true ;
}
//--- resultreturn (res);
}
//+------------------------------------------------------------------+
Свойства ордеров - Торговые константы - Константы, перечисления и структуры - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
119 행은 다음과 같아야 합니다. if (AccountInfoString(ACCOUNT_COMPANY)=="Alpari" || AccountInfoString(ACCOUNT_COMPANY)=="Forex Club International Limited") TypeFilling = ORDER_FILLING_FOK ;
119 행은 다음과 같아야 합니다. if (AccountInfoString(ACCOUNT_COMPANY)=="Alpari" || AccountInfoString(ACCOUNT_COMPANY)=="Forex Club International Limited") TypeFilling = ORDER_FILLING_FOK ;
좋은 아침!
테스터에서 위치를 열지 않으려는 경우 오류가 발생합니다.
ERR_TRADE_SEND_FAILED
4756
거래 요청을 보내지 못했습니다.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
뭔가 고쳐져야 할 것 같아
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\
이제 이 기능을 이것으로 대체하려고 합니다.
좋은 아침!
테스터에서 위치를 열지 않으려는 경우 오류가 발생합니다.
ERR_TRADE_SEND_FAILED
4756
거래 요청을 보내지 못했습니다.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
뭔가 고쳐져야 할 것 같아
네. 이것은 FilingFock 주문 유형인 Forexclub 딜러입니다. 내가 개를 산책시키고 고칠게. Forexclub에 아직 사람이 남아 있다고 생각하지 않았습니다 ...
네. 이것은 FilingFock 주문 유형인 Forexclub 딜러입니다. 내가 개를 산책시키고 고칠게. Forexclub에 아직 사람이 남아 있다고 생각하지 않았습니다 ...
충전 모드는 외환 딜러의 이름이 아닌 규칙에 따라 설정해야 합니다.
추가되었습니다.
예는 CTrade 거래 클래스에서 볼 수 있습니다.
설정마진모드
현재 계정 설정에 따라 마진 계산 모드를 설정합니다.
SetTypeFillingBySymbol
지정된 기호의 설정에 따라 실행할 주문 유형을 설정합니다.
네. 이것은 FilingFock 주문 유형인 Forexclub 딜러입니다. 내가 개를 산책시키고 고칠게. Forexclub에 아직 사람이 남아 있다고 생각하지 않았습니다 ...
나는 알지 못했습니다 - 귀하의 중개인이 여전히 여기에 등록되어 있음이 확실합니다
와우 벌었다
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\
교환 -----------
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\
꽤 잘되고있는 것 같습니다
와우 벌었다
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\
교환 -----------
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\
꽤 잘되고있는 것 같습니다
알고리즘에 의한 사전 테스트가 있기 때문에 결과가 동일한지 궁금합니다.
잠시 테스트하는 동안 컴퓨터가 약하고 테스트가 천천히 진행 중입니다.
언뜻보기에는 그렇게 - 최종 결과를 봅시다.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \
Expert의 테스터에 오류가 없습니다.
좋은 아침!
테스터에서 위치를 열지 않으려는 경우 오류가 발생합니다.
ERR_TRADE_SEND_FAILED
4756
거래 요청을 보내지 못했습니다.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
뭔가 고쳐야 할 것 같아
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\
이제 이 기능을 이것으로 대체하려고 합니다.
필요하지 않습니다.
119 행은 다음과 같아야 합니다. if (AccountInfoString(ACCOUNT_COMPANY)=="Alpari" || AccountInfoString(ACCOUNT_COMPANY)=="Forex Club International Limited") TypeFilling = ORDER_FILLING_FOK ;
AUTOOrderSELL도 마찬가지입니다. 그리고 모든 것. :)
필요하지 않습니다.
119 행은 다음과 같아야 합니다. if (AccountInfoString(ACCOUNT_COMPANY)=="Alpari" || AccountInfoString(ACCOUNT_COMPANY)=="Forex Club International Limited") TypeFilling = ORDER_FILLING_FOK ;
AUTOOrderSELL도 마찬가지입니다. 그리고 모든 것. :)
뭐, 일단은 이대로 놔둘게 - 테스트 후에 고칠게
- 테스터를 중지하고 싶지 않음
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\
한 가지 나쁜 점은 지금 테스트가 진행되고 있다는 것입니다. 그리고 나는 곁눈질로 여기를 과대평가하는 것 같습니다.
충전 모드는 외환 딜러의 이름이 아닌 규칙에 따라 설정해야 합니다.
추가되었습니다.
예는 CTrade 거래 클래스에서 볼 수 있습니다.
설정마진모드
현재 계정 설정에 따라 마진 계산 모드를 설정합니다.
SetTypeFillingBySymbol
지정된 기호의 설정에 따라 실행할 주문 유형을 설정합니다.
매우 감사합니다. 물론 머신에서는 필요하지만 방법을 못찾아서 어떤 브로커에게 무엇이 필요한지 짤막한 형태로 패치를 만들었습니다 :) 그 중 2개만 존재합니다. 고맙습니다.