PLEASE HELP! EA 1 pip STOP

 


I'm testing an EA. I'm having trouble placing stop.
Simple. I want to enter the market every day at 14:00. USD/CAD. In candle 1 minute. opened up, the price rise 2 pips. BUY or if the price drops 2 pips. SELL. with STOP 1 pip. and TARGET 80 pips. I am using this code. but it does not work, please help me.

int ordens = OrdersTotal();

 if(ordens == 0){
 if(Hour() >13 && Hour() < 15 && Minute() < 01){
 if(Close[0] > Open[0]){
 OrderSend(Symbol(),OP_BUY,0.10,Ask,3,Ask-1*Point,Ask+80*Point,0,0,0,Green);
 }else{
 if(Close[0] < Open[0]){
 OrderSend(Symbol(),OP_SELL,0.10,Bid,3,Bid+1*Point,Bid-80*Point,0,0,0,Red);
 }
 }
 }
 }
 
Feefhee:

I'm testing an EA. I'm having trouble placing stop.
Simple. I want to enter the market every day at 14:00. USD/CAD. In candle 1 minute. opened up, the price rise 2 pips. BUY or if the price drops 2 pips. SELL. with STOP 1 pip. and TARGET 80 pips. I am using this code. but it does not work, please help me!

<CODE REMOVED>

Please read some other posts before posting . . .

Please edit your post . . . please use the SRC button to post code: How to use the SRC button.


What errors are you getting ? What are Function return values ? How do I use them ?

 

Ask-1*Point

  1. You Buy at the Ask, the SL is relative to the Bid
  2. 1*Point is NOT a pip on a 5 digit broker
  3. You can NOT place a stop closer to the market then MODE_STOPLEVEL
 
WHRoeder:

Ask-1*Point

  1. You Buy at the Ask, the SL is relative to the Bid
  2. 1*Point is NOT a pip on a 5 digit broker
  3. You can NOT place a stop closer to the market then MODE_STOPLEVEL


could show me an example of what I need to test please? is my first EA.

 
RaptorUK:


What errors are you getting ? What are Function return values ? How do I use them ?

Feefhee

could show me an example of what I need to test please? is my first EA.

Read this, it tells you what you can and can't do: Requirements and Limitations in Making Trades

You need to know what your StopLevel and FreezeLevel are . . . use MarketInfo() with MODE_STOPLEVEL and MODE_FREEZELEVEL

Reason: