Programmer looking for strategy collaboration - page 2

 
hardtop901b:

Sorry to disturb you again, i've ran it in backtest, and I think it need to fix a little bit.

Two pending orders, and then one of it opened, in this condition (please modify the code), I want the other pending order not cancel until the open position reach TP. So if it not reach TP but reach SL, hope the price then will open the other pending order and reach TP, still also can reach SL, it's Ok, at least it's already max with the two pending order.

Hope you can still help me with the code....Thanks before...(you're really help me with this EA, 20pips a day, it's really enough for me)

ok, I will fix it later today.

 
jingodelcuyo wrote >>

I just thought of one thing. The EA considers the first trade successful as long as it is profitable, even if it is a stoploss. In this condition, i.e. stoploss at profit less than 20 pips, it will not open the second trade. Is this the way you want it, or should the second trade open if the first trade closes at ANY value less than 20 pips?

The last one, the second trade open if the first trade closes at ANY value less than 20 pips.

The other pending would only be canceled if the open trade reach TP.

 
hardtop901b wrote >>

The last one, the second trade open if the first trade closes at ANY value less than 20 pips.

The other pending would only be canceled if the open trade reach TP.

ok, here is the revised code. Just to be clear, it will do the following:

1. At Hour1 (default is 00:00) it opens (1) BUY STOP and (1) SELL STOP, with BuyStop=20, SellStop=20, TakeProfit=20, StopLoss=10, and TrailStop=10

2. If one of the orders opens, the other remains pending

3. If the open order reaches TakeProfit, the other pending order is deleted, and no more orders are placed for that day

4. If the open order reaches StopLoss, the other pending order remains

5. The pending order(s) may or may not open before Hour2

6. If the second pending order does open, AND it reaches TakeProfit, no more orders are placed for that day

7. If the second pending order opens, AND it reaches StopLoss, the EA will wait for Hour2

8. If Hour2 is reached and one or both of the previous pending orders have not opened, they are deleted

9. At Hour2 (default is 09:00) two new pending orders are opened, as long as neither of the previous pending orders opened and reached TakeProfit

10. If one of the new orders opens, the other remains pending

11. If the open order reaches TakeProfit, the other pending order is deleted

12. If the open order reaches StopLoss, the other pending order remains

13. If the last pending order opens, it will remain open until it reaches TakeProfit (good recovery!) or StopLoss (a really bad day!)

14. If one or both of the second pending orders remain pending, they are deleted at Hour1 of the next day

I have assumed that you want Hour1 pending orders to delete if Hour2 is reached without TP, and likewise that Hour2 pending orders to delete if the next day Hour2 is reached without TP. Let me know if that is correct.

Have fun.

Files:
 
jingodelcuyo wrote >>

I am a programmer, and I have been working with MT4/MQL4 for about 8 months. I have written over 50 indicators and EAs, but with little backtesting/demo success because my strategies are lame. I have gotten very good at implementing strategy logic in a correct and efficient manner, and when I want to implement a particular strategy, I can write it, test it, and debug it pretty fast and with good data management. If anyone is on the "other side" (great strategies, but little programming experience), let me know if you would like to collaborate...

Also, if any gurus out there want to throw me a bone (i.e. a basic strategy that works), I would be very happy (srth[at]templestreet.cc).

Thanks,

JDC

help me...waaaaaa...

i want u help me make 1 EA used hieken ashi.open buy when blue colour and close positon when red colour n automatic open sell when red colour...my email wak_khenak@yahoo.com.my

 
heri wrote >>

help me...waaaaaa...

i want u help me make 1 EA used hieken ashi.open buy when blue colour and close positon when red colour n automatic open sell when red colour...my email wak_khenak@yahoo.com.my

Sorry, but i've tried EA with this indicator too, and the result not too good, little bit better if use this HAS with MA. But generally also not too good. But you can try it. Just my experience.

Or you can also combine it with RSI to konfirm trend...

For me HAS can only fit with manual trading, cos the changes of the HAS candle shape and color along the running price show us market condition.

But this is only in my opinion from experience, so the master know better...

Happy Trading

 
jingodelcuyo:

ok, here is the revised code. Just to be clear, it will do the following:

1. At Hour1 (default is 00:00) it opens (1) BUY STOP and (1) SELL STOP, with BuyStop=20, SellStop=20, TakeProfit=20, StopLoss=10, and TrailStop=10

2. If one of the orders opens, the other remains pending

3. If the open order reaches TakeProfit, the other pending order is deleted, and no more orders are placed for that day

4. If the open order reaches StopLoss, the other pending order remains

5. The pending order(s) may or may not open before Hour2

6. If the second pending order does open, AND it reaches TakeProfit, no more orders are placed for that day

7. If the second pending order opens, AND it reaches StopLoss, the EA will wait for Hour2

8. If Hour2 is reached and one or both of the previous pending orders have not opened, they are deleted

9. At Hour2 (default is 09:00) two new pending orders are opened, as long as neither of the previous pending orders opened and reached TakeProfit

10. If one of the new orders opens, the other remains pending

11. If the open order reaches TakeProfit, the other pending order is deleted

12. If the open order reaches StopLoss, the other pending order remains

13. If the last pending order opens, it will remain open until it reaches TakeProfit (good recovery!) or StopLoss (a really bad day!)

14. If one or both of the second pending orders remain pending, they are deleted at Hour1 of the next day

I have assumed that you want Hour1 pending orders to delete if Hour2 is reached without TP, and likewise that Hour2 pending orders to delete if the next day Hour2 is reached without TP. Let me know if that is correct.

Have fun.

Added QuantumStop feature - TakeProfit>QuantumLevel>QuantumStop>0 - when QL is reached, stoploss modified one time to openprice +(buy)/-(sell) QS.

StopModType(0=none, 1=quantum, 2=trail) - trail is just standard trailstop


For EURUSD back test (1-Jan-08 to 31-Aug-08), best results so far for:

Hour1=10

Hour2=17

BuyStop=30

SellStop=30

StopLoss=80

StopModType=1

QuantumLevel=20

QuantumStop=10

TradeMonday=true


BUT! profit level is still too low and drawdown is still too high...

Files:
 
jingodelcuyo:

Added QuantumStop feature - TakeProfit>QuantumLevel>QuantumStop>0 - when QL is reached, stoploss modified one time to openprice +(buy)/-(sell) QS.

StopModType(0=none, 1=quantum, 2=trail) - trail is just standard trailstop


For EURUSD back test (1-Jan-08 to 31-Aug-08), best results so far for:

Hour1=10

Hour2=17

BuyStop=30

SellStop=30

StopLoss=80

StopModType=1

QuantumLevel=20

QuantumStop=10

TradeMonday=true


BUT! profit level is still too low and drawdown is still too high...



And TakeProfit=30

 
jingodelcuyo:

And TakeProfit=30


corrected a mistake in deletePendingOrders()

Files:
 
jingodelcuyo wrote >>

I am a programmer, and I have been working with MT4/MQL4 for about 8 months. I have written over 50 indicators and EAs, but with little backtesting/demo success because my strategies are lame. I have gotten very good at implementing strategy logic in a correct and efficient manner, and when I want to implement a particular strategy, I can write it, test it, and debug it pretty fast and with good data management. If anyone is on the "other side" (great strategies, but little programming experience), let me know if you would like to collaborate...

Also, if any gurus out there want to throw me a bone (i.e. a basic strategy that works), I would be very happy (srth[at]templestreet.cc).

Thanks,

JDC

I can use a hand programming this entry strategy: If high is greater than or equal to high of last (n) bars and the RSI (7 bar close) is less than the highest RSI of the last (n) bars, sell.

thanks

 
heri:

help me...waaaaaa...

i want u help me make 1 EA used hieken ashi.open buy when blue colour and close positon when red colour n automatic open sell when red colour...my email wak_khenak@yahoo.com.my


This EA performs the task request, but the strategy gives mixed results. See comments in the mq4 regarding filtering of unwanted signals from the indicator.

Files:
Reason: