timeout.wav는 "SELL GROUP" 이외의 모든/모든 스팸에 대해 울립니다.
댓글 감사합니다.
아래와 같이 시도했는데 이제 마켓이 종료된 'timeout.wav' 재생 중입니다. 하지만 'ok.wav' 가 새 주문에 대해 재생되는지 여부를 확신할 수 없습니다.
알려주시겠어요?
int _ticket = 0 ;
if ( expression )
{
...
} //---if Close
if ( _ticket > 0 )
{
PlaySound ( "ok" );
} //---if Close
//---
if ( _ticket < 0 )
{
PlaySound ( "timeout.wav" );
} //---if Close
if ( expression )
{
...
} //---if Close
if ( _ticket > 0 )
{
PlaySound ( "ok" );
} //---if Close
//---
if ( _ticket < 0 )
{
PlaySound ( "timeout.wav" );
} //---if Close
감사해요.
확인! 감사해요. 나는 월요일 에 그것을 시도할 것이다.
//--- 두 번째 편집
잘 작동합니다.
그래서 '-'버튼 을 클릭하면 많이 줄어들지 만 작동하지 않습니다.
내 '테스트' EA 코드를 볼 수 있습니다. 도움이 필요합니다.
int i ,
int_example = 1 ;
double _lotStep = 0.01 ,
_lot = 0.09 ;
string _prefix = "| TP -" ,
_edtLot = _prefix + " Lot" ,
_btnLotMinus = _prefix + " Button Minus" ;
//---init
_PanelDraw();
//---OnChartEvent
if ( sparam == _btnLotMinus )
{
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_STATE , false );
_lot = _lot - _lotStep;
if ( _lot <= 0 )
_lot = _lotStep;
Print ( "| Just You Clicked Button Lot Minues" );
return ;
} //---if Close
//---
void _PanelDraw()
{
//---Button
ObjectCreate ( 0 , _btnLotMinus, OBJ_BUTTON , 0 , 0 , 0 );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_XDISTANCE , 16 );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_YDISTANCE , 16 );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_XSIZE , 80 );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_YSIZE , 32 );
ObjectSetString ( 0 , _btnLotMinus, OBJPROP_TEXT , "-" );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_FONTSIZE , 20 );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_STATE , false );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_SELECTABLE , false );
Print ( "I am Minus" );
//---Lot
ObjectCreate ( 0 , _edtLot, OBJ_EDIT , 0 , 0 , 0 );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_COLOR , Red );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_XDISTANCE , 16 );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_YDISTANCE , 56 );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_XSIZE , 80 );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_YSIZE , 32 );
ObjectSetString ( 0 , _edtLot, OBJPROP_TEXT , "Lot: " + DoubleToStr ( _lot, 2 ) );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_FONTSIZE , 12 );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_STATE , true );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_READONLY , true );
Print ( "I am Minus" );
//---
return ;
}
int_example = 1 ;
double _lotStep = 0.01 ,
_lot = 0.09 ;
string _prefix = "| TP -" ,
_edtLot = _prefix + " Lot" ,
_btnLotMinus = _prefix + " Button Minus" ;
//---init
_PanelDraw();
//---OnChartEvent
if ( sparam == _btnLotMinus )
{
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_STATE , false );
_lot = _lot - _lotStep;
if ( _lot <= 0 )
_lot = _lotStep;
Print ( "| Just You Clicked Button Lot Minues" );
return ;
} //---if Close
//---
void _PanelDraw()
{
//---Button
ObjectCreate ( 0 , _btnLotMinus, OBJ_BUTTON , 0 , 0 , 0 );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_XDISTANCE , 16 );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_YDISTANCE , 16 );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_XSIZE , 80 );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_YSIZE , 32 );
ObjectSetString ( 0 , _btnLotMinus, OBJPROP_TEXT , "-" );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_FONTSIZE , 20 );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_STATE , false );
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_SELECTABLE , false );
Print ( "I am Minus" );
//---Lot
ObjectCreate ( 0 , _edtLot, OBJ_EDIT , 0 , 0 , 0 );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_COLOR , Red );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_XDISTANCE , 16 );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_YDISTANCE , 56 );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_XSIZE , 80 );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_YSIZE , 32 );
ObjectSetString ( 0 , _edtLot, OBJPROP_TEXT , "Lot: " + DoubleToStr ( _lot, 2 ) );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_FONTSIZE , 12 );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_STATE , true );
ObjectSetInteger ( 0 , _edtLot, OBJPROP_READONLY , true );
Print ( "I am Minus" );
//---
return ;
}
감사해요!
//---OnChartEvent
if ( sparam == _btnLotMinus )
{
ObjectSetInteger ( 0 , _btnLotMinus, OBJPROP_STATE , false );
_lot = _lot - _lotStep;
if ( _lot <= 0 )
_lot = _lotStep;
Print ( "| Just You Clicked Button Lot Minues" );
return ;
} //---if Close
이것은 OnChartEvent 함수 가 아닙니다.
이것은
void OnChartEvent ( const int id, // Event ID
const long & lparam, // Parameter of type long event
const double & dparam, // Parameter of type double event
const string & sparam // Parameter of type string events
);
if(id==CHARTEVENT_OBJECT_CLICK)
const long & lparam, // Parameter of type long event
const double & dparam, // Parameter of type double event
const string & sparam // Parameter of type string events
);
if(id==CHARTEVENT_OBJECT_CLICK)
{
//
}
괜찮아 보이지만 lotstep 자체가 0.01 아래로 내려가지 않는지 확인하십시오.
하지만 많이 줄어들지 않아 나는 그것을 보지 못했다.
Max Enrik :
하지만 많이 줄어들지 않아 나는 그것을 보지 못했다.
하지만 많이 줄어들지 않아 나는 그것을 보지 못했다.
어디서 볼 수 있을 거라 예상하시나요?
Print ( "| Just You Clicked Button Lot Minues" );
인쇄되나요?
안녕,
시장이 닫힐 때 'else {}' 코드를 사용하려고 합니다.
하지만 두 가지 소리가 섞여 있습니다. 어디가 문제입니까?
if ( sparam == "SELL GROUP" )
{
ObjectSetInteger ( 0 , "SELL GROUP" , OBJPROP_STATE , false );
_ticket = Order ( "SELL GROUP" );
PlaySound ( "ok.wav" );
}
else
{
PlaySound ( "timeout.wav" );
}
최상의.
(영어는 제 모국어가 아닙니다)