HA_Strategy

Strategies are published here.

Moderator: admin

HA_Strategy

Postby Apprentice » Fri Jan 03, 2020 8:05 am

1.png

2.png

Based on request.
viewtopic.php?f=38&t=68676
HA_Strategy.lua
(137.26 KiB) Downloaded 578 times

HA_Strategy_with_martingale.lua
(137.96 KiB) Downloaded 389 times


MT4/MQ4 version
viewtopic.php?f=38&t=70401
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: HA_Strategy

Postby Protrader » Mon Jun 08, 2020 8:19 am

Dear,

Is it possible to modify this code ?

When one position is closed, recalculate if the conditions are always valid and open a new position on the next candle. Picture explains better.

Thank you.
Attachments
HA strategy.PNG
Protrader
 
Posts: 15
Joined: Mon Jun 08, 2020 7:48 am

Re: HA_Strategy

Postby Protrader » Tue Jun 16, 2020 2:59 pm

Dear,

Is the strategy was modified by your team Apprentice with the Yolerap's modifications ?
This could be very nice !

Thank you,
Protrader
 
Posts: 15
Joined: Mon Jun 08, 2020 7:48 am

Re: HA_Strategy

Postby Apprentice » Tue Jun 16, 2020 6:53 pm

Modifications are added.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: HA_Strategy

Postby yolerap » Wed Jun 17, 2020 1:02 pm

Thank you but it doesn't work whilst the parameters for strategy are good ( Re-download the latest version, Based on HA, no MVA filter, Direct/End of turn, ... )

Please, look picture :
Line 1 : Long position is open and close -> It's ok for me
Line 2 : Long position should have been open because there are 3 green candles before ( in relation to my last post )
Line 3 : Long position should have been open also because there are 3 green candles before

Lines 4,5 and 6 show you the same problem until the line 10.

I think the strategy open a new position only after opposite consecutive candles ( circled ).

For a variant and for you, it could be easier for you to code like this :
- When one long position is opened ( because there are 2/3/... consecutive green candles ) so at each green candle, open a new long
- When one short position is opened ( because there are 2/3/... consecutive red candles ) so at each red candle, open a new short

Thank you for further modifications,
Attachments
HA Strat.PNG
yolerap
FXCodeBase: Initiate
 
Posts: 103
Joined: Sat Aug 17, 2019 9:44 pm

Re: HA_Strategy

Postby Apprentice » Wed Jun 17, 2020 3:35 pm

Your request is added to the development list.
Development reference 1509.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: HA_Strategy

Postby Apprentice » Thu Jun 18, 2020 5:25 am

image.png

I don't have any issues. It works every time
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: HA_Strategy

Postby yolerap » Thu Jun 18, 2020 7:50 am

Yes it's working ; the strategy open positions one time but after your arrows, many other Red/green candles are closed and strategy doesn't open position. So once a position is open, you have to open a position for each candle of the same color as explained in the previous** post.

**When one long position is opened ( because there are 2/3/... consecutive green candles ) so at each green candle, open a new long
- When one short position is opened ( because there are 2/3/... consecutive red candles ) so at each red candle, open a new short

Thank you for further modifications,
yolerap
FXCodeBase: Initiate
 
Posts: 103
Joined: Sat Aug 17, 2019 9:44 pm

Re: HA_Strategy

Postby Apprentice » Fri Jun 19, 2020 4:22 am

Can you share the parameters used?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: HA_Strategy

Postby yolerap » Fri Jun 19, 2020 7:18 am

Sure,

Here the parameters and what strategy should do.

Thank you,
Attachments
Parameters.PNG
Want.PNG
yolerap
FXCodeBase: Initiate
 
Posts: 103
Joined: Sat Aug 17, 2019 9:44 pm

Next

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 13 guests