Reply

Using Both Renko Bars & Time Charts?

15 replies

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #115509

Hello,

 

I’m attempting to use Time Charts and Renko Bars at the same time. My question is regarding how the EA software is looking at the Statement.

 

Example:

If the stochastic main is greater than the signal on the H1 time frame && the stochastic on the renko bars has crossed up THEN take a trade.

 

So with the Stochastic the main moves through out the bars price movement. I want to have the H1 stochastic to only check at the open of the bar on the H1 time frame. It seems that it is checking at the open of every renko bar. 

 

Is there a way to have it only check the H1 time frame at the open?

 

I hope I was clear enough here. Let me know if I need to figure out a different way to explaining.

 

Thank you for your time.

 

Regards,

 

James

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #139171

hello,

 

i’m guessing i need to ask this a different way. 

 

i’m have the ea running on a renko offline chart. i’m wanting to get the stochastic value on the h1 time-frame at the close of the h1 bar only. is there a way to do this? it seems it checks on the close of every renko bar instead. does anyone have any input? 

 

thanks in advance for any help coding this to function correctly.

 

regards,

 

james

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139188

Hello,

 

if you only need to get Stoch value once per H1 bar you would have to create a “helping” condition that checks the hour value and catches only the moment it is changed (increased by 1 or reset to 0)

 

You can store hour number and then compare: if (currentHour > storedHour) then “save the Stochastic (H1 TF) value”

This way you will avoid getting H1 Stochastic value on each renko tick

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #139191

Tomas,

 

Thank you for the replay as always. 🙂

 

I started to try this approach but was having trouble figuring out how to the IF question. I’ll take another crack at it and see if I can figure out using the time function to store the value.

 

Regards,

 

James

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #139192

Tomas,

 

I hate to ask because I know you are probably pretty busy with answering everyones questions etc…

 

Is it possible to get an example of using time and get the value of the indicator at that certain time? I feel I should know this by now but I’m drawing a blank on where to start.

 

Thank you either way. 

 

Regards,

 

James

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139203

Yes sure, I will create a sample and post here

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #139204

Tomas,

 

Thank you, thank you…I’ve been trying everything I can think of. I’m sure I’m missing something obvious (as usual). I will continue to work at it and will be looking forward to your help and example. 

 

Thanks again,

 

James

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #139214

Hello Tomas

 

I was looking to use the Daily, H1 time frames. I’ve tried to do the greater than or less than but I’m not getting the right outcome. 

 

Regards,

 

James

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #139230

Hello Tomas,

 

This is what I came up with. Please let me know if I’m thinking about this right? Thank you for your time.

 

// h4_stoch_up

 
IF ((((Stochastic( PERIOD_H4 , h4_kp , h4_dp , h4_s , Low/High , Simple )[1] Crosses Above Stochastic( PERIOD_H4 , h1_kp , h4_dp , h4_s , Low/High , Simple )[1]) 
      Or (Stochastic( PERIOD_H4 , h4_kp , h4_dp , h4_s , Low/High , Simple )[1] > Stochastic( PERIOD_H4 , h1_kp , h4_dp , h4_s , Low/High , Simple )[1])) 
      And ((TimeCurrent() = GetTime(( 0 , 0 , 0 ))) 
      Or ((TimeCurrent() = GetTime(( 4 , 0 , 0 ))) 
      Or ((TimeCurrent() = GetTime(( 8 , 0 , 0 ))) 
      Or ((TimeCurrent() = GetTime(( 12 , 0 , 0 ))) 
      Or ((TimeCurrent() = GetTime(( 16 , 0 , 0 ))) 
      Or (TimeCurrent() = GetTime(( 20 , 0 , 0 ))))))))))
THEN
   // Action #1
      // assign value to variable
      h4_stoch_up = 1;
 
   // Action #2
      // assign value to variable
      h4_stoch_dn = 0;
 
   // Action #3
      // assign value to variable
      h4_stoch_value = Stochastic( PERIOD_H4 , h4_kp , h4_dp , h4_s , Low/High , Simple )[1];
 
   // Action #4
      // Log to journal
      Log(“H4StochValue: “+h4_stoch_value+” H4StochDirection: “Up””);
 
 
Regards,
 
James

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139247

Hello James,

 

yes, your solution shown in previous post should work. Have you tested this? Is it working?

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #139248

Tomas,

 

It didn’t look like it was working before the close of the markets on friday. I’ll check it again. I’m looking to setup the ability to test the renko bars. Any recommendations for that?

 

Regards,

 

James

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139382

Hello James,

 

I have not tested renkos in MetaTrader yet but I can have a look at it so I will be able to provide additional help with setting up rule in Wizard

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #140102

Hello Tomas,

 

First, Happy Thanksgiving! I hope you have a great day and weekend.

 

I have a question and think you can help. 

 

If I’m using renko bars and I have 10 pip bar set to the M2 timeframe and 5 pip bar set to the M3 timeframe, can I have the EA take the information from those 2 charts. 

 

Example: If the 10 pip bars show a down trend and there is a pullback and then 5 pip bars show a reversal back into that trend to make the trade from the 5 pip bars then.

 

Thanks again for all your help. I’ve learned a lot in the last year.

 

Regards,

 

James

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #140109

Hello,

 

period M2 and period M3 is also available in EA Wizard when you choose but I have not tested it yet. Have you tried to use these parameters in your EA?

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #140110

Hello Tomas,

 

No, I haven’t tried yet. I was just thinking it would really help with getting pure price direction if I could setup charts with larger pip boxes and then reference them for the trade.

 

I did see the M2,M3 in the options but I thought to ask first incase it was not possible and so not to waste time working on it. LOL

 

Thanks for the input. I’ll let you know what I figure out.

 

Regards,

 

James

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

7 years ago #140295

Hey Tomas,

 

Happy Holiday’s!

 

I’m struggling with this idea of using different time-frames and renko bars. It’s a bit complicated but I will try and explain what I’m looking for.

 

  • Currently I’m running and testing the EA on the Renko bar offline chart (I’m not sure this is the best way). 

// H1-uBBv

 

IF ((((TimeCurrent() = GetTime(( 0 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 1 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 2 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 3 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 4 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 5 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 6 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 7 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 8 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 9 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 10 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 11 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 12 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 13 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 14 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 15 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 16 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 17 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 18 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 19 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 20 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 21 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 22 , 0 , 0 )))

      Or (TimeCurrent() = GetTime(( 23 , 0 , 0 ))))))))))))))))))))))))))

      And (Close( PERIOD_H1 )[1] >= BollingerBand_Upper( PERIOD_H1 , bb_period , bb_deviations , bb_shift , Close )[1])))

THEN

   // Action #1

      // assign value to variable

      H1_uBB_valid = 1;

 

   // Action #2

      // assign value to variable

      H1_uBB_price = Close[1];

 

   // Action #3

      // Log to journal

      Log(“”H1 BB valid””);

 

END IF;

 

//——————————————————————–

// H1-lBBv

 

IF ((((TimeCurrent() = GetTime(( 0 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 1 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 2 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 3 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 4 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 5 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 6 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 7 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 8 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 9 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 10 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 11 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 12 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 13 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 14 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 15 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 16 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 17 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 18 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 19 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 20 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 21 , 0 , 0 )))

      Or ((TimeCurrent() = GetTime(( 22 , 0 , 0 )))

      Or (TimeCurrent() = GetTime(( 23 , 0 , 0 ))))))))))))))))))))))))))

      And (Close( PERIOD_H1 )[1] <= BollingerBand_Lower( PERIOD_H1 , bb_period , bb_deviations , bb_shift , Close )[1])))

THEN

   // Action #1

      // assign value to variable

      H1_lBB_valid = 1;

 

   // Action #2

      // assign value to variable

      H1_lBB_price = Close( PERIOD_H1 )[1];

 

   // Action #3

      // Log to journal

      Log(“”H1 BB valid””);

 

END IF;

 

//——————————————————————–

// RB-uBBv

 

IF  (IsBarOpen is True) && ((Close[1] >= BollingerBand_Upper( bb_period , bb_deviations , bb_shift , Close )[1]))

THEN

   // Action #1

      // assign value to variable

      RB_uBB_valid = 1;

 

   // Action #2

      // assign value to variable

      RB_uBB_price = Close[1];

 

END IF;

 

//——————————————————————–

// RB-lBBv

 

IF  (IsBarOpen is True) && ((Close[1] <= BollingerBand_Lower( bb_period , bb_deviations , bb_shift , Close )[1]))

THEN

   // Action #1

      // assign value to variable

      RB_lBB_valid = 1;

 

   // Action #2

      // assign value to variable

      RB_lBB_price = Close[1];

 

END IF;

 

//——————————————————————–

// buy(1)

 

IF (((Market Position() is Flat)

      And ((turn_ea_onoff = 0)

      And ((RB_lBB_valid = 1)

      And ((H1_lBB_valid = 1)

      And ((IndicatorLowest( 4 , 0 )(Stochastic( PERIOD_M1 , 14 , 3 , 3 , Low/High , Simple )[1]) <= 20)

      And ((Lowest( PERIOD_M1 , 4 )[1] <= IndicatorLowest( 4 , 0 )(BollingerBand_Lower( 50 , 2.1 , 0 , Close )[1]))

      And ((Close( PERIOD_M1 )[2] <= SMA( PERIOD_M1 , 8 , Close )[2])

      And (Close( PERIOD_M1 )[1] > SMA( PERIOD_M1 , 8 , Close )[1])))))))))

THEN

   // Action #1

   Buy initial_lots lots at Market

      Magic Number = buymagic1;

 

 

   // Action #2

      // assign value to variable

      buy1_be = 1;

 

 

Let me know if any of this makes any sense. I will continue to hack away at it until I hear back. Thank you for all your time you have spent helping me learn and understand this amazing software. 🙂

 

Regards,

 

James

0

Viewing 15 replies - 1 through 15 (of 15 total)