why no trade?please help me

 

i think maybe this line is wrong,but don't know why:

double lot=NormalizeDouble(AccountInfoDouble(ACCOUNT_MARGIN_FREE)*MaximumRisk/((rt[1].high-rt[1].low+symb_ask-symb_bid)*SYMBOL_POINT),2);

i want to use the high of the signal bar (the bar before the open bar) added the spread as stop when sell,

and make sure the stop value is less than 2% margin.

maybe there are lots of mistakes,can you help me correct it?

thanks a lot!

Files:
 
fight4fc:

i think maybe this line is wrong,but don't know why:

double lot=NormalizeDouble(AccountInfoDouble(ACCOUNT_MARGIN_FREE)*MaximumRisk/((rt[1].high-rt[1].low+symb_ask-symb_bid)*SYMBOL_POINT),2);

i want to use the high of the signal bar (the bar before the open bar) added the spread as stop when sell,

and make sure the stop value is less than 2% margin.

maybe there are lots of mistakes,can you help me correct it?

thanks a lot!

double point_value=SymbolInfoDouble(_Symbol,SYMBOL_POINT);
 
Arthur Albano:

Or perhaps you might use:

double TickSize = SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_SIZE);
Reason: