Jump to content


Photo

how to make external variable?


  • Please log in to reply
34 replies to this topic

#1 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 15 March 2017 - 07:48 AM

hi,

 

i am a new user of ea wizard. would like to ask how to make an external variable of lets say aligator(to change the parimeter of jaw, teeth and lips)? and how to make an external variable when to active where price from below touch jaw or teeth or lips and we sell and vice versa. thanks in advance



#2 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,238 posts

Posted 15 March 2017 - 08:44 PM

Hello,

 

do you mean you want to change a variable value while EA is already active and running?



#3 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 16 March 2017 - 03:35 AM

hi tomas,

 

no, not when ea is already active and running, but in the process of making the ea with ea wizard.

there are  two questions:

1. how to make external variable to change the lips or jaws or lips and their shift.

2. how to make external variable to choose which one we want to active (either jaws or lips or teeth ) when price for example from below going up and touch the indicator and we open sell order. 

 

thanks



#4 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,238 posts

Posted 20 March 2017 - 12:34 AM

Hello,

 

here is the example on how to use variable to use long or/and short trades and how to define shift using a variable. Let me know if any questions

Attached Files



#5 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 21 March 2017 - 03:19 AM

thanks tomas, will ask many question



#6 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 27 March 2017 - 05:20 AM

hi tomas, here another question, :D

 

i make a simple ea based on aligator.  the strategy is "enter sell at  market if price cross above jaws of aligator and boolean is true  and exit market if next candle close higher than open"

but the result turn out ugly.

1. how to open only 1 trade after the price cross above jaws and close only after  next candle close higher than open? (right now the ea open and close at the same time and so many times :( .

2. how to activate variable boolean is true?

 

here i attach sample of ea i made. please correct and advice. thank you alot.



#7 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 27 March 2017 - 05:21 AM

here is the file. thanks

Attached Files



#8 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,238 posts

Posted 27 March 2017 - 09:16 PM

Hello,

 

check the modified file attached

Attached Files



#9 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 28 March 2017 - 11:10 AM

thanks tomas, will check it



#10 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 30 March 2017 - 04:58 AM

hi tomas, i ve check dan run ea into mt4. come out many "order failed, error 134. and other is exit not exacly we program. it open and close at the same time rather than close if next bar close > open (ea not close if next bar close < open we wait till we find next bar is close > open) in this case our order is sell. 

please advise where should i change. thanks



#11 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,238 posts

Posted 30 March 2017 - 08:22 PM

Hello,

 

we need to add "isbaropen = true" into the close condition. It should exit as you need. See file attached

 

Error 134 means "No Enough Money". Does this happen when backtesting?

Attached Files



#12 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 03 April 2017 - 04:51 AM

thanks tomas, will check it :)



#13 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 03 April 2017 - 05:16 AM

Hello,

 

 

Error 134 means "No Enough Money". Does this happen when backtesting?

yes it happen when backtesting. this error doesnt come out anymore but new one come  :D "test generator:unmatch data error(volume limit 12065 at 2017.03.13.00.00 exceeded)

and  what is the different if we tick true or false "support ECN brokers". thanks



#14 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,238 posts

Posted 03 April 2017 - 07:52 PM

Hello,

 

you can try to re-download M1 data in your MetaTrader. This error is related to data mismatch (volume).

 

With ECN brokers the profit-target and stop-loss are set slightly different way which is why there is the "switch" inside every EA generated 



#15 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 17 April 2017 - 05:02 AM

hi tomas,
i try to make another ea:D . the rule is buy if rsi < 25. how to open the second or third trade if price is still <25. and all trade close if rsi > 75. thanks. attactment is sample i make

Attached Files



#16 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,238 posts

Posted 17 April 2017 - 07:53 PM

Hello,

 

you need to generate a unique magic number for each entry because you cannot open two orders with magic number 1000. You can do it by generating a random number. See the example attached

Attached Files



#17 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 18 April 2017 - 04:54 AM

thanks tomas. try to do it.

for rsi i would like to change the level  from 30 to 35 and 70 to 75.  but cannot find where can i change the number. how can i do it?.  thanks



#18 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 18 April 2017 - 08:16 AM

hi, tomas,

the rule is buy when rsi < 25 and sell rsi >75. open every bar while rsi still <25. max trade limit to 10

 

while making i realize i cannot use bid < rsi 25. because price and value of rsi is different. what should i use instead?

and also how to limit certain trade can be opened?

attach is what i have made.  please advice thanks

Attached Files



#19 tomas262

tomas262

    Advanced Member

  • Moderators
  • 2,238 posts

Posted 19 April 2017 - 07:10 PM

Hello,

 

so you want to buy (multiple trades) as long as RSI stays below 25?

What is the max number of trades you want to open?



#20 nitroz

nitroz

    Member

  • Members
  • PipPip
  • 29 posts

Posted 20 April 2017 - 03:51 AM

yes. may be 10. but i will put it on external variable, and the other important things is how to make change output of rsi ? thanks tomas






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users