Requests & Ideas, the beginning - page 38

 

Hi,

Could you please post a graph for this strategy for a better understanding ?

Thanks!

 
tangocash:
The following is a post made by tkimble in FF yesterday, some of you might be familiar with his other trading systems. Looks simple enough to be programmed into an EA, was hoping one of the programming gurus could help us out.

In order to automate any system, there should be clear rules about MM, Enters, SL's and Exits.

Newbies always think that the most important aspect of a trade is the enter, but Professional traders know that the most important part of a trading system are the MM, SL's and the Exits.

Signal enters are the least important aspectof any trading system. There are thousand of ways to enter a trade, but most systems fail in the other aspects.

How are the Exits in this one ?

 

Trend Hugger

Here its coded but you'll have to play with it. Like Project1972 said you need to look at the S/L MM and TP. I did not put any money management code into it I just threw it together like the author suggested. I did make 1 change to it however and that is I gave you the option of using the highest and lowest point over the last x bars which you can define +/- your defined stoploss. If you want to try this method set your StopMethod to 0, or you can do it from your entrypoint by setting StopMethod to 1.

you need to put the MakeMagicNumber file in your /include folder. As its coded I think this system is basically a breakeven strategy.

Files:
 

RSI protect and ProfitProtect

Hi!! I'm learning mql4 and coding my own EAs, for the moment only for learning purpose.

I have this code for profit protect and I've wroten the RSI protect, I thought that was working fine but I've noticed that work only when the lots is 0.1, why? because if you trade 0.1 lot, 1pip=1$ and this what I wrote. I want the rules of this code but protect in pips. Any help? I think that I have to get the pip value, I don't know how to code that.

Thanks and sorry if my english is no good.

void start(){

if(OrdersTotal()>0){

for(int i=0;i<=OrdersTotal()-1;i++){

OrderSelect(i, SELECT_BY_POS);

if (OrderMagicNumber() == MagicNumber){

if(OrderType()==0 || OrderType()==1){

if(OrderProfit()>=ProfitProtectStart && OrderType()==0 && ticketID!=OrderTicket()){

OrderModify(OrderTicket(),OrderOpenPrice(),buystart+(Point*ProtectProfit),OrderTakeProfit(),0,Blue);

ticketID=OrderTicket();

}

else if(OrderProfit()>=ProfitProtectStart && OrderType()==1 && ticketID!=OrderTicket()){

OrderModify(OrderTicket(),OrderOpenPrice(),sellstart-(Point*ProtectProfit),OrderTakeProfit(),0,Blue);

ticketID=OrderTicket();

}

}

}

}

}

if(OrdersTotal()>0){

for(int j=0;j<=OrdersTotal()-1;j++){

OrderSelect(j, SELECT_BY_POS);

if (OrderMagicNumber() == MagicNumber){

if(OrderType()==0 || OrderType()==1){

if (OrderProfit()>=OverProtect && iRSI(NULL,0,3,PRICE_CLOSE,0)>90 && OrderType()==0) {

OrderClose(OrderTicket(),OrderLots(),Bid,2,Violet);

}

if (OrderProfit()>=OverProtect && iRSI(NULL,0,3,PRICE_CLOSE,0)<10 && OrderType()==1){

OrderClose(OrderTicket(),OrderLots(),Ask,2,Violet);}

}

}

}

}................

 

can you please provide the rest of your code, it would help to debug this

 

Hi cyberpasta,

In your script you should use two formulas for calculation of Profit in pips:

- BUY: Profit = (Bid - OrderOpenPrice())/Point

-SELL: Profit = (OrderOpenPrice()-Ask)/Point,

because OrderProfit() gives values in currency of the deposit(or USD).

Regards,

Igor

 

help please

I am writing this breakout EA. Its doing what I want it to do except I am having issues with the Trailing stop. When it places an order I want to be able to close part of it at T1, move the stoploss to my entry and then trail the rest to t2. It does all that except it starts trailing at some odd places that I can't understand. It should start trailing right after it closes the part at t1 and it moves 1 more pip. Don't worry about bounce mode leave that as false, thats a future project. It works on the gbpjpy 15 min tf and the start time is 500 gmt stop time is 630 gmt.

 

heres the file i hit manage attachments and it posted my thread

Files:
 

Help with time time based trading

Need help.............

Can anyone help me code an EA with the following simple guidlines??

Symbol- Current

TimeFrame- Current

Trading ONLY London open (0800) till (0900)

Buy if- current bar open > close one bar back

current bar open > 40 bars back (prevous day close)

Sell if-open current < close one bar back

open current < close 40 barsback(previous day close)

Lots- 0.1

StopLoss- open

Take profit- open

Trail- open

Signal Mode- tick

Thannk you in advance.

Jayborde12

 

a quick question why does the new bar have to open any different then the previous bar's close it would normally do that the majority of the time anyways except when it gaps. Secondly with no trailing stop, tp, or SL how do you plan to monitor the trade

Reason: