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
Check this (
im having a similar problem with my code can you help me?
i wrote a code and then under that i just added a code that i will show now and it gives me unexpected end of program and semicolon expectd at the end where it says monitor tp after it
int start()
{ int StopMultd=10;
double TP=NormalizeDouble(TakeProfit*StopMultd,Digits);
//-------------------------------------------------------------------+
//Check open orders
//-------------------------------------------------------------------+
if(OrdersTotal()>0){
for(int i=1; i<=OrdersTotal(); i++) // Cycle searching in orders
{
if (OrderSelect(i-1,SELECT_BY_POS)==true) // If the next is available
{
if((MonitorTakeProfit==true)&&(TakeProfit>0)&&(OrderMagicNumber()==0)){ // monitor tp
// Calculate take profit
double tpb=NormalizeDouble(OrderOpenPrice()+TP*Point,Digits);
double tps=NormalizeDouble(OrderOpenPrice()-TP*Point,Digits);
Comment("Modifying take profit");
if((OrderType()==OP_BUY)&&(OrderTakeProfit()==0)&&(OrderSymbol()==Symbol()))
if((OrderType()==OP_SELL)&&(OrderTakeProfit()==0)&&(OrderSymbol()==Symbol()))
} // monitor tp
Comment("");
}
}
}
//+------------------------------------------------------------------+
}
im having a similar problem with my code can you help me?
i wrote a code and then under that i just added a code that i will show now and it gives me unexpected end of program and semicolon expectd at the end where it says monitor tp after it
This code seems Old; it is using the start() Event instead of OnTick(). You should change that and use #property strict.
You have 2 empty if statements that are preventing the program to compile.
Align your code and look.
1) read the rules for posting in the forum.
2) format with the CODE button.
3) DO NOT hijack another OP's thread.
4) post more of your code if you want help.