EA request Heiken Ashi

Place your new trading idea here to see if someone can automate it.
Locked
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: EA request Heiken Ashi

Post by milanese »

TraderDesk wrote:
milanese wrote:
milanese wrote:
TraderDesk wrote: Tommaso, I have it working now based on the bars. Good so far. I will post more functionality that will be needed later for this function.

Now I have below the function "Add additional positions in Trend". This is to be used once the first position is taking with the previous function. The below function will be to add additional positions as needed in the trend as long as price does not close above the HA line... I have added three configurations:

1. Amount of pips to be in proximity of HA line
2. Wait X amount of bars before opening another position
3. Max Amount of open positions allow concurrently

This will allow a position to be opened up once price comes within x amount of pips to HA line. So for example Price cross down the HA line and a new position opened up after 2 bars closed. That occurs from the first function. Now I would use the second function (Amount of pips to be in proximity of HA line) to configure wait (DelayAddOpenPositionForXBars) X bars to close from last buy/sell position before opening an additional position AND if Price is with X amount of pips of HA line AND maximum amount of positions currently open does NOT exceed X amount (MaxAmountPositions).
AddadditionalpositionsinTrend.png
Am I making sense here?
I hope I have understood it :D I will give a try to code this kind of stacking extension ;)

Cheers :)
Tommaso
ok now finally, I had forgotten something sorry, please look as it is as you want it..
Edit:I fixed some logic bug in AdditionalTrades part, now should it work, please all who had downloaded, download again :D

Cheers :)
Tommaso
Testing it now... Will let you know how TraderDeskHeikenAshiF is working...

Now I have another feature to look at. Is it possible to have the EA look at a higher time-frame to determine if it will open the first position? For example, I open the EA on the 15 minute time-frame. I look at the 4 hour time-frame and I see price is above the HA line so the EA will open only buy positions...

If the price on the 4 hour time-frame is below the HA line then it will open only sell position on the 15 minute EA... This is to keep the EA opening positions ONLY in the direction of the 4 hour time-frame...

Now I would like to see if would allow us to have this configurable to whatever time-frame we want.

If I want to open the EA on the 5 minute chart, I would like to be able the EA to look at the 15 or 30 or 1 hour or 4 hour or daily HA line to determine the larger trend...

Would this be possible?
yes without doubt it can be done, but will wait for your report about the last one.. so that we have always something first that works as intended before integrating new functions..
so bugfinding is much easier ..

Cheers :)
Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
TraderDesk
Trader
Posts: 479
Joined: Wed Nov 16, 2011 2:12 pm
Location: Estonia

Re: EA request Heiken Ashi

Post by TraderDesk »

Hmmm... I am running it on the 1 minute charts... Do the DeltaTimeLiveTrades and DeltaTimeHistoTrades values need to be change for the 1 minute charts?
TraderDesk
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: EA request Heiken Ashi

Post by milanese »

TraderDesk wrote:Hmmm... I am running it on the 1 minute charts... Do the DeltaTimeLiveTrades and DeltaTimeHistoTrades values need to be change for the 1 minute charts?
yes set them to 60 or what ever you want 60 means 1 min

Cheers :)
Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
TraderDesk
Trader
Posts: 479
Joined: Wed Nov 16, 2011 2:12 pm
Location: Estonia

Re: EA request Heiken Ashi

Post by TraderDesk »

milanese wrote:
TraderDesk wrote:Hmmm... I am running it on the 1 minute charts... Do the DeltaTimeLiveTrades and DeltaTimeHistoTrades values need to be change for the 1 minute charts?
yes set them to 60 or what ever you want 60 means 1 min

Cheers :)
Tommaso

Okay let's see if I have this understood correctly:

DeltaTimeLiveTrades=60
DeltaTimeHistoTrades=60

Basically I should have those set for the timeframe I am using them in... i.e. 60 for 1 minute charts, 300 for 5 minute charts, 900 for 15 minute charts etc....

DelayTheEntryForXBars=2

That would be used for the FIRST time when Price CROSSES the HA line and will delay opening a position for 2 bars. Is that correct?

DelayTheAdditionalEntryForXBars=3

This would be used once the original position was open and we would want to open another position. The value 3 would mean the EA would NOT open a position until three bars have close from the previous open position. Is that correct?

PriceFromHALine=5

Now I am confused here. Does this apply to original position to be open or the additional positions that would be open once they came with 5 pips of the HA line?

AddAdditionalPositionsInTrend=1

Now does this mean the EA will open ONLY 1 more position from the original position?

MaxAdditionalPositions=3

I understand that this means max open positions no matter what... Safety feature. Is that correct?
TraderDesk
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: EA request Heiken Ashi

Post by milanese »

TraderDesk wrote:
milanese wrote:
TraderDesk wrote:Hmmm... I am running it on the 1 minute charts... Do the DeltaTimeLiveTrades and DeltaTimeHistoTrades values need to be change for the 1 minute charts?
yes set them to 60 or what ever you want 60 means 1 min

Cheers :)
Tommaso

Okay let's see if I have this understood correctly:

DeltaTimeLiveTrades=60
DeltaTimeHistoTrades=60

Basically I should have those set for the timeframe I am using them in... i.e. 60 for 1 minute charts, 300 for 5 minute charts, 900 for 15 minute charts etc....

DelayTheEntryForXBars=2

That would be used for the FIRST time when Price CROSSES the HA line and will delay opening a position for 2 bars. Is that correct?

DelayTheAdditionalEntryForXBars=3

This would be used once the original position was open and we would want to open another position. The value 3 would mean the EA would NOT open a position until three bars have close from the previous open position. Is that correct?

PriceFromHALine=5

Now I am confused here. Does this apply to original position to be open or the additional positions that would be open once they came with 5 pips of the HA line?

AddAdditionalPositionsInTrend=1

Now does this mean the EA will open ONLY 1 more position from the original position?

MaxAdditionalPositions=3

I understand that this means max open positions no matter what... Safety feature. Is that correct?
Ok I will try to explain a little
PriceFromHALine this is used at moent for both, there is no special one for the additional trades so far..
AddAdditionalPositionsInTrend this is used to activate deactivate the additional trade function
MaxAdditionalPositions here was a bug it was (n-1) that way I attach an update, this the max. for additional trades, so trade max is one higher..
DeltaTimeLiveTrades=60
DeltaTimeHistoTrades=60
yes this is a kind of safety future ;) so the bot will not directly reopen positions after closing or opening..

Cheers :)

Tommaso
You do not have the required permissions to view the files attached to this post.
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
TraderDesk
Trader
Posts: 479
Joined: Wed Nov 16, 2011 2:12 pm
Location: Estonia

Re: EA request Heiken Ashi

Post by TraderDesk »

I just had three buys on EURJPY with a minute of each other... They should not do that as I have the "DelayTheAdditionalEntryForXBars=3" set for bars to close before opening a new position... See below chart...
chart1.png
Should it not wait three bars BEFORE opening a new additional position if conditions are met?

Thanks...
You do not have the required permissions to view the files attached to this post.
Last edited by TraderDesk on Fri Nov 15, 2013 6:21 pm, edited 1 time in total.
TraderDesk
TraderDesk
Trader
Posts: 479
Joined: Wed Nov 16, 2011 2:12 pm
Location: Estonia

Re: EA request Heiken Ashi

Post by TraderDesk »

milanese wrote:
Ok I will try to explain a little
PriceFromHALine this is used at moent for both, there is no special one for the additional trades so far..
AddAdditionalPositionsInTrend this is used to activate deactivate the additional trade function
MaxAdditionalPositions here was a bug it was (n-1) that way I attach an update, this the max. for additional trades, so trade max is one higher..
DeltaTimeLiveTrades=60
DeltaTimeHistoTrades=60
yes this is a kind of safety future ;) so the bot will not directly reopen positions after closing or opening..

Cheers :)

Tommaso
Okay.. AddAdditionalPositionsInTrend this is used to activate deactivate the additional trade function means 1 = YES and 0= NO.....

extern int DelayTheEntryForXBars=2;
extern double PriceFromHALine=5; should be optional for the crossover and opening of the original position.

--------------------------------------

extern int DelayTheAdditionalEntryForXBars=3;
extern double PriceFromHALine=5; Must be included as the EA must open an additional position when price comes back to the HA line...
Tommaso thanks for having patience as I am a trader not a coder :)
Last edited by TraderDesk on Fri Nov 15, 2013 6:37 pm, edited 1 time in total.
TraderDesk
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: EA request Heiken Ashi

Post by milanese »

TraderDesk wrote:I just had three buys on EURJPY with a minute of each other... They should not do that as I have the "DelayTheAdditionalEntryForXBars=3" set for bars to close before opening a new position... See below chart...
chart1.png
Should it not wait three bars BEFORE opening a new additional position if conditions are met?

Thanks...
I see the problem it is how the 3 bars are handeled in code later I will take a look

Cheers:)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: EA request Heiken Ashi

Post by milanese »

milanese wrote:
TraderDesk wrote:I just had three buys on EURJPY with a minute of each other... They should not do that as I have the "DelayTheAdditionalEntryForXBars=3" set for bars to close before opening a new position... See below chart...
chart1.png
Should it not wait three bars BEFORE opening a new additional position if conditions are met?

Thanks...
I see the problem it is how the 3 bars are handeled in code later I will take a look

Cheers:)

Tommaso
Ok here comes next update, now the DeltaTime Var are automatic set =TF
the problem you had described should now too be resolved

Cheers :)

Tommaso
You do not have the required permissions to view the files attached to this post.
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
TraderDesk
Trader
Posts: 479
Joined: Wed Nov 16, 2011 2:12 pm
Location: Estonia

Re: EA request Heiken Ashi

Post by TraderDesk »

milanese wrote:
milanese wrote:
TraderDesk wrote:I just had three buys on EURJPY with a minute of each other... They should not do that as I have the "DelayTheAdditionalEntryForXBars=3" set for bars to close before opening a new position... See below chart...
chart1.png
Should it not wait three bars BEFORE opening a new additional position if conditions are met?

Thanks...
I see the problem it is how the 3 bars are handeled in code later I will take a look

Cheers:)

Tommaso
Ok here comes next update, now the DeltaTime Var are automatic set =TF
the problem you had described should now too be resolved

Cheers :)

Tommaso
Okay, trying it out now... I had posted this above buy I don't know if it made sense to you...

extern int DelayTheEntryForXBars=2;
extern double PriceFromHALine=5; should be optional for the crossover and opening of the original position.
--------------------------------------
extern int DelayTheAdditionalEntryForXBars=3;
extern double PriceFromHALine=5; Must be included as the EA must open an additional position when price comes back to the HA line...
TraderDesk
Locked

Return to “Ideas for Possible Automation”