You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
possible loss of data due to type conversion
Try it.
Show me the line from the code to which the compiler points
There are a lot of lines like that, which is why I asked for an adapted module for the new terminals. But thanks for your willingness to help)
There are a lot of lines like that, which is why I asked for an adapted module for the new terminals. But thanks for your willingness to help)
Right on this line :
" possible loss of data due to type conversion"
should be the line number and position in the code line with the error.
That's how easy, you can fix all errors, knowing the exact location in the code
right on this line :
" possible loss of data due to type conversion"
there should be a line number and a position in the code line with the error.
That is an easy way to fix all the errors, knowing the exact location in the code.
I have taken the Expert Advisor offeredby Alekseu Fedotov and tried to modify it to suit my needs.
My needs are the following: At a crossover of the wands, we open a position, and close it at the opposite crossover. If possible, we transfer the position to Breakeven.
But in the end nothing is opened. I am racking my brains. What may be the problem?
I took the EA offeredby Alekseu Fedotov and tried to modify it to suit my needs.
My needs are the following: If they are crossed, we open a position. If they are crossed again, we close it. If possible, we transfer the position to Breakeven.
But in the end nothing is opened. I am racking my brains. What may be the problem?
show the line from the code with the error from CMM, for the last time I offer to help.
show a code snippet on how you read the signal from the indicator in your EA
takeprofit = 400,
slippage = 10,
Magic = 777;
extern double Lot = 0.5,
buy_level = 15;
void OnTick()
{
for (int i=0; i<OrdersTotal(); i++)
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
if (OrderSymbol()==Symbol() && Magic==OrderMagicNumber())return;
double STO = iStochastic(NULL,15,2,3,1,MODE_SMA,0,MODE_SIGNAL,0);
double SL=0,TP=0;
if (STO > buy_level)
{
if (takeprofit!=0) TP = NormalizeDouble(Ask + takeprofit*Point,Digits);
if (stoploss!=0) SL = NormalizeDouble(Ask - stoploss* Point,Digits);
if (OrderSend(Symbol(),OP_BUY, Lot,NormalizeDouble(Ask,Digits),slippage,SL,TP,NULL,Magic)==-1) Print(GetLastError());
PlaySound("timeout.wav");
Print("Ордер успешно размещен");
}
}
takeprofit = 400,
slippage = 10,
Magic = 777;
extern double Lot = 0.5,
buy_level = 15;
void OnTick()
{
for (int i=0; i<OrdersTotal(); i++)
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
if (OrderSymbol()==Symbol() && Magic==OrderMagicNumber())return;
double STO = iStochastic(NULL,15,2,3,1,MODE_SMA,0,MODE_SIGNAL,0);
double SL=0,TP=0;
if (STO > buy_level)
{
if (takeprofit!=0) TP = NormalizeDouble(Ask + takeprofit*Point,Digits);
if (stoploss!=0) SL = NormalizeDouble(Ask - stoploss* Point,Digits);
if (OrderSend(Symbol(),OP_BUY, Lot,NormalizeDouble(Ask,Digits),slippage,SL,TP,NULL,Magic)==-1) Print(GetLastError());
PlaySound("timeout.wav");
Print("Ордер успешно размещен");
}
}
Right here:
iStochastic(NULL,15,2,3,1,MODE_SMA,0,MODE_SIGNAL,0);
change period (timeframe) to 1,5,15,30,60,240,1440,10080,43200 //M1.M5.M30 ... etc.
or enter Period() instead of 15, then when you switch TF manually, the current one will be automatically set