B=(A-B)*Point ; Comment("Value of difference ", B); Bは、直前のローソクの終値からB=closeで設定したローソクの終値を引いたものになります [....] while(B > B) and most likely not while a if condition { Comment("Value Difference ", B); OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Ask+TakeProfit*Point,,, "macd sample",16384,0,Green);
}
while(0-V<Round) and most likely not while a if condition
こんにちは!何が問題なのかがわからないのですが、「?成行注文を修正しない
slb =NormalizeDouble(Bid - (StopLoss * Point),Digits); // 買いポジションのストップを計算する//
tpb =NormalizeDouble(Ask + (TakeProfit* Point),Digits); // 買いポジションの利益を計算//
sls =NormalizeDouble(Ask + (StopLoss * Point),Digits)。// 売りポジションのストップ算出//
tps =NormalizeDouble(Bid - (TakeProfit* Point),Digits);
//===============================
int total=OrdersTotal();
int n=0;
for (int i=total-1; i>=0; i--)
{
if(OrderSelect(i, SELECT_BY_POS))
{
if(OrderSymbol()==Symbol())です。
{
n++;
}}
if ( total == 1 )
{
for (int k=total-1; k>=0; k--)
{
if(OrderSelect(k, SELECT_BY_TICKET))
Alert("order is", k);
{
if ((OrderType()==OP_BUY)&&(OrderTakeProfit()==0)&&(OrderStopLoss()==0)))
{
OrderModify(k,OrderOpenPrice(),slb,tpb,0,Blue);
Alert("error",GetLastError());
}}}
return(0);} }.
どうしたものか..............................助けてくれ
どんな新人の質問でも、掲示板を乱雑にしないように。プロに負けるな。あなたがいないとどこにも行けない。
フォーラムを散らかさないように、どんな初心者の質問でも。プロに負けるな。あなたがいないとどこにも行けない。
ループの中にCommentを入れると反映されないので、while条件を満たしていないのだと思います。 また、ループの上では変数Bが0.0011など通常の期待値と同じになっていますが、Pointを掛けると0になってしまいます!!!!
int start()
{
double A,B,C ;A=Close[1];B=Close[Bars];
C=A-B ;Comment("Value of differencei ", B*Point);
while (B*Point >)Swing)
{ Comment("差の値", B);
OrderSend(Symbol(,OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Ask+TakeProfit*Point,")macd sample",16384,0,Green);}
while (0-B*Point<Point)
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+stoploss*Point,Bid-TakeProfit*Point,"")macd sample",16384,0,Red);
Alert("Value ", B);
Comment("Value differencei ",B);
//----
//----
return(0);
}.
よくわからないけど、正しいやり方は
int start()
{
double A,B,C ;A=Close[1];B=Close[bars]; Close[bars] の意味; ?・?Close[バーナンバーシークエンス逆引き、カレントなし]。
前ローソク足終値[1]. 前ローソク足終値[2].
B=(A-B)*Point ; Comment("Value of difference ", B); Bは、直前のローソクの終値からB=closeで設定したローソクの終値を引いたものになります [....]
while(B > B) and most likely not while a if condition
{ Comment("Value Difference ", B);
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Ask+TakeProfit*Point,,, "macd sample",16384,0,Green);
}
while(0-V<Round) and most likely not while a if condition
{.
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+stoploss*Point,Bid-TakeProfit*Point, "macd sample",16384,0,Red);
} }.
Alert("Value ",B);
Comment("Value differencei ",B);
//----
//----
return(0);
}.
間違っているかもしれませんが...。
あなたのコードには多くの誤りがあります......あなたは何をしたいですか......どのような結果?ロシア文字はないはずなのですが...。
Cが1.23456のような数値をメモリ上に持っているため、スプレッドシートにCを入れることはできません
0-Bは負の数になってしまうので...。
であり、以下のように損益を計算するのがよいでしょう。
slb =NormalizeDouble(Bid - (StopLoss * Point),Digits); // 買いポジションのストップを計算//
tpb =NormalizeDouble(Ask + (TakeProfit* Point),Digits); // 買いポジションの利益を計算//
sls =NormalizeDouble(Ask + (StopLoss * Point),Digits)です。// 売りポジションのストップを計算する//
tps =NormalizeDouble(Bid - (TakeProfit* Point),Digits); // 売りポジションの利益を計算する//。
ループの中にCommentを入れると反映されないので、while条件を満たしていないのだと思います。 また、ループの上では変数Bが0.0011など通常の期待値と同じになっていますが、Pointを掛けると0になってしまいます!!!!
int start()
{
double A,B,C ;A=Close[1];B=Close[Bars];
C=A-B ;Comment("Value of differencei ", B*Point);
while (B*Point >)Swing)
{ Comment("差の値", B);
OrderSend(Symbol(,OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Ask+TakeProfit*Point,")macd sample",16384,0,Green);}
while (0-B*Point<Point)
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+stoploss*Point,Bid-TakeProfit*Point,"")macd sample",16384,0,Red);
Alert("Value ", B);
Comment("Value differencei ",B);
//----
//----
return(0);
}.
で、AとBの差にPointを掛けろとウダウダ言ってるんだろ?
AとBの値は実数である。その差にPointを掛けることで、さらに小数点 以下の桁数を増やすことができます。Spread」整数と比較するために整数を得る必要がある場合、むしろPointで割るべきです。