script to close at 1 pip - page 2

 
azman818:
I don't know if I've done this correctly. I've saved as script and tried to execute when my one pip is up. The journal recorded "loaded successfully" and then "removed" the very same instant but trade did not close. I've then saved as EA and "attach to chart" and journal records successful load but still NO close. pls tell where I've gone wrong.
Maybe there is no order selected to calculate with OrderOpenPrice...
You've definetly not done it correctly.
 

Thanks for the help. Even with order selected - NO close. Did it work on your trade, Zap?

 
Hmm..Let me try it.  Like he was saying, it might be because the code is not initiating the trade, it might not want to close it for some reason.  Gonna try it myself on a demo (just start randomly buying-selling things just to get it to react).  I will then check the journals and see if it is just ignoring the trades since it is not initiating them. 
 
asmocon:
extern int TrailingStopShortScalp = 1;
extern int TrailingStopLongScalp = 1;

And then - Point*TrailingStopShortScalp

--Basically that part makes it close after 1pip of postive movement. So, if you manually open a trade and say there is a -2 pip spread on the trade. So, you open it and it is opened at 1.8888. Since that is -2 already, when it becomes 1.8891, which is just positive +1 pip profit, it will close. Of the code said:

extern int TrailingStopShortScalp = 0;
extern int TrailingStopLongScalp = 0;

It would close it right when it hit the break-even, which would be 1.8890. Hope that makes sense.

If this doesn't work for some reason, let me know. Like if you want to just try it and watch it (manually close it if it doesn't automatically do it). Enjoy.
Hi asmocon, I am a newbie in mq4 expert, I was trying your scalp script, and I have 2 questions:

1) If I want to change the break even pips from 1 to 10, could I easily make it by changing the value 0 to 10 like this :

extern int TrailingStopShortScalp = 1; ---> extern int TrailingStopShortScalp = 10 , isn't it ?
extern int TrailingStopLongScalp = 1; extern int TrailingStopLongScalp = 10

2) There are three Models in Expert Advisor and confuse how to chose :
- " Every Tick (based on available least timeframes with fractal interpolation of every thick) "
- " Control Points (based on the nearest less timeframes with fractal interpolation of 12 control points)
- " Open price only (fastest method to analyze the bar just completed)

    What I must to chose ? Thanks!
 
Zap:
Would you write me to forexzap AT gmail DOT com please, I am interested too.
jswanson:
I have a broker with an institutional price feed that i negotiated for personal use. Perhaps we should talk about this. I'm looking for a good scalper that grabs one pip per trade. I have 1 pip spreads on EUR and JPY. Many times the spreads are 0.

Hi, I do also have access to an institutional price feed and I am working on a scalper as well, so I thought we could share some ideas and experience.

You can directly contact me at latiz01 AT yahoo DOT com.

One of the things is to trade only if the spread is less than 1 or so, but I was wondering if it's possible since MT4 was designed mostly for fixed spread.

Do you think it is possible to write a condition in the EA such as this one?

 
azman818 wrote >>
hi, i'm newbie on metatrader and at mql4. can anyone help with a simple script to close trade at 1 pip. i'll open trade manually but would like to automate close only. any help much appreciated.

Hi did u ever get yr e.a. written. I have a similar one that I'm pretty sure I could adapt. Can anyone tell me if private messages are allowed on this forum. or is it possible to send another member an email. Thanks.

 
chingching wrote >>

Hi did u ever get yr e.a. written. I have a similar one that I'm pretty sure I could adapt. Can anyone tell me if private messages are allowed on this forum. or is it possible to send another member an email. Thanks.

To send a private message click on the name of the person you want to send a private message. It's the name located at the top left hand corner of their comment, right next to the date. This will take you to their information page. All the way to the right hand side of your computer screen you will see a link for sending private messages. It's there by itself.

 
I know I am a little late by over a year since the last post, however I am looking for the same thing. To close a manually opened trade when it is 1 or 2 pips (customizable) clear of the spread of the opening price. It doesn't have to be scalping (Doesn't have to be under a minute, since scalping is 1 min or less). Just so if anyone has managed to have this done, do inform me yea, harris AT wread DOT org. Syukran in advance.
Reason: