double highest_open_price= 0 ;
int highest_Ticket=- 1 ;
for ( int pos= OrdersTotal ()- 1 ; pos>= 0 ; pos--)
if ( OrderSelect ( 0 ,SELECT_BY_POS,MODE_TRADES) // Only my orders w/
&& OrderMagicNumber()== 0// my magic number
&& OrderSymbol()== Symbol () // and my pair.
&& OrderOpenPrice()>=highest_open_price)
{
highest_open_price=OrderOpenPrice();
highest_Ticket=OrderTicket();
}
int look_pips= 0 ;
for (pos= OrdersTotal ()- 1 ; pos>= 0 ; pos--)
highest_open_price= MathAbs (High[pos]-Low[pos])/ Point ; //pips levels of the barif (Bid>=highest_open_price && look_pips >=my_pips)
Print ( "The last price movement more than " ,my_pips);
RefreshRates();
highest_Ticket= OrderSend ( Symbol (),OP_SELL,mylot(),Bid, 0 , 0 , 0 , "My Comment" , 0 , 0 ,Red);
my_pips 가 extern에 추가되었음을 기억하십시오. double my_pips =10; 또한 5digit 중개인에 맞게 계산되지 않았으므로 후자를 추가합니다.
님의 글을 보기 전에 다시 쓰려고 했던 실수에 대해 사과드립니다. 틱 값으로 변경하기 위해 더 많은 작업을 수행했습니다.
이제 틱 값을 사용하여 핍을 계산합니다.....
double highest_open_price= 0 ;
int highest_Ticket=- 1 ;
for ( int pos= OrdersTotal ()- 1 ; pos>= 0 ; pos--)
if ( OrderSelect ( 0 ,SELECT_BY_POS,MODE_TRADES) // Only my orders w/
&& OrderMagicNumber()== 0// my magic number
&& OrderSymbol()== Symbol () // and my pair.
&& OrderOpenPrice()>=highest_open_price)
{
highest_open_price=OrderOpenPrice();
highest_Ticket=OrderTicket();
}
double tickvalue = (MarketInfo( Symbol (),MODE_TICKVALUE));
if ( Digits == 5 || Digits == 3 ){
tickvalue = tickvalue* 10 ;
}
if (Bid>=highest_open_price + tickvalue* 10 )
Print ( "The last price movement more than " ,tickvalue);
RefreshRates();
highest_Ticket= OrderSend ( Symbol (),OP_SELL,mylot(),Bid, 0 , 0 , 0 , "My Comment" , 0 , 0 ,Red);
now to add my comment on this tick value. one thing i know is -----10pips is a movement of price upward or down to definite number point stored while 10tick
is count of moving price without storing number
else 10tick can complete in 1 candle far below pips. while 10pips can complete in more than 20bars/candle or even 1bar/candle.
conclusion i dont think i got it right?
please point me through
in addition double MYPIP= MarketInfo(Symbol(), MODE_DIGITS); can it work on this case to get pip
if (Bid>=highest_open_price + PipDecimal * 10 )
{
Print ( "The last price movement more than " ,PipDecimal);
RefreshRates();
highest_Ticket= OrderSend ( Symbol (),OP_SELL,mylot(),Bid, 0 , 0 , 0 , "My Comment" , 0 , 0 ,Red);
}
예, 10핍을 원합니다.
그리고 내가 추가한 이 조건이 맞는지 확인하십시오.............
길잃은 코드를 게시하지 마십시오 }
그건 헷갈 린다
전략 테스터에서 EA를 시도하면 당신이 옳은지 아닌지 알 수 있습니다
} -- WHRoeder님 이 지적해주셔서 수정했습니다.
내 생각 에 WHRoeder : 포인트와 핍 에 대한 그의 요점이 옳습니다. 이제 핍 이 고려되어야 한다고 생각합니다.
이제 높은 값을 얻었으므로 내 핍을 계산한 방법을 확인하십시오.............
my_pips 가 extern에 추가되었음을 기억하십시오. double my_pips =10; 또한 5digit 중개인에 맞게 계산되지 않았으므로 후자를 추가합니다.나는 당신이 무엇을하려고하는지 전혀 모릅니다
첫 번째 루프에서 high_open_price 값을 얻습니다.
그런 다음 주문을 다시 반복하고 다른 값을 지정합니다.
왜?????
나는 당신이 무엇을하려고하는지 전혀 모릅니다
첫 번째 루프에서 high_open_price 값을 얻습니다.
그런 다음 주문을 다시 반복하고 다른 값을 지정합니다.
왜?????
님의 글을 보기 전에 다시 쓰려고 했던 실수에 대해 사과드립니다. 틱 값으로 변경하기 위해 더 많은 작업을 수행했습니다.
이제 틱 값을 사용하여 핍을 계산합니다.....
수정해주셔서 감사합니다.
이제 나는 코드를 함께 결합하여 가장 높은 점수를 얻었습니다.
그런 다음 다시 테스트했지만 결과가 코드와 일치하지 않는 이유는 무엇입니까? 내가 뭔가를 놓치고 있습니까? 어떤 조건이 있습니까
나는 여전히 코드에 추가해야 합니까 아니면 시장을 닫았기 때문입니까... 감사합니다
또는 두 배 PipDecimal = (MarketInfo(Symbol(),MODE_DIGITS)); 고려된다.
중괄호가 없으면 매 틱마다 새로운 거래가 열립니다.
대단해! 그것은 잘 작동했습니다 ... 완벽하게 발견되었습니다.
그러나 유일한 문제는 두 번째 주문 중에 첫 번째 성공적인 주문이 잘 열린 후 여러 주문을 계속 여는 것입니다.
제가 잘못한 것이 있습니까?