View Single Post
  #4 (permalink)  
Old 06-30-2006, 02:43 PM
elihayun's Avatar
elihayun elihayun is offline
Senior Member
 
Join Date: Jan 2006
Posts: 350
elihayun is on a distinguished road
Quote:
Originally Posted by cardio
Hi

I am getting the error message invalid stops err 130 i.e.
I print out my values and they are as follows

2006.06.29 13:15:05 AUDUSD,H1: OrderDetails: SellPrice : 0.731 ,CurrentBid : 0.731 ,stoploss : 0.7319 ,takeprofit : 0.7291 ,slippage : 2

I am using the following to check my sl and tp before placing the order
Code:
/
if (StopLoss<=MarketInfo(Symbol(),MODE_STOPLEVEL)) StopLoss=MarketInfo(Symbol(),MODE_STOPLEVEL)+3;

if (TakeProfit<=MarketInfo(Symbol(),MODE_STOPLEVEL)) TakeProfit=2*(MarketInfo(Symbol(),MODE_STOPLEVEL)+3);
Sometimes the sell goes through like the following
2006.06.29 08:32:56 AUDUSD,H1: open #5976740 sell 0.01 AUDUSD at 0.7309 sl: 0.7324 tp: 0.7278 ok

Maybe my stops checking is just not functioning correctly.
Any suggestions?
Maybe u are using "+ 3" in both buy and sell. In sell u have to put "-3" to make it a valid price
Reply With Quote