Coding help - page 553

 
mladen:
apprentice coder

The simplest way would be to do something like this :

iMA(symbol,timeFrame,1,0,MODE_SMA,PRICE_CLOSE,0)

and that would cause a kind of a forced data download

It works! Thanks

 

Hello mladen ,

I have follow what you say and change the "OrdersTotal()>0 to OrdersTotal()>1" .

But it will close when it was a single position open too.

Because i still cant post the full code to the forum .

The full code i have save at notepad , can you please help me to check what is the problem ?

Thanks .

Steven.

Files:
code.txt  2 kb
 
stevenpun:
Hello mladen ,

I have follow what you say and change the "OrdersTotal()>0 to OrdersTotal()>1" .

But it will close when it was a single position open too.

Because i still cant post the full code to the forum .

The full code i have save at notepad , can you please help me to check what is the problem ?

Thanks .

Steven.

Steven

OrdersTotal()>1

excludes a case when orders total is equal to 1

 

Dearest MLADEN,

if i can replace usual/built in MAs with any custom MAs , (for example HMA or NMA or any) in this EA ...... if yes,do it needs all code of that new custom MA in side EA code or just iCustom call is enough ?

regards

Files:
 
mntiwana:
Dearest MLADEN,

if i can replace usual/built in MAs with any custom MAs , (for example HMA or NMA or any) in this EA ...... if yes,do it needs all code of that new custom MA in side EA code or just iCustom call is enough ?

regards

mntiwana

All that is needed is to replace the iMA() call with the iCustom() call to the desired custom averages indicator. The rest is more or less, 100% the same

 
mladen:
mntiwana All that is needed is to replace the iMA() call with the iCustom() call to the desired custom averages indicator. The rest is more or less, 100% the same

Dearest MLADEN,

thanks for helping,i will be asking you step by step for to learn how to add some custom indi,...my next question is which name and method should be used at appropriate place if Hull parabolic 2.1 will be used. and in iCustom which name should be used .....pictures are attached and indicator too,thanks.

regards

Files:
1_6.png  132 kb
2_4.png  132 kb
 
mntiwana:
Dearest MLADEN,

thanks for helping,i will be asking you step by step for to learn how to add some custom indi,...my next question is which name and method should be used at appropriate place if Hull parabolic 2.1 will be used. and in iCustom which name should be used .....pictures are attached and indicator too,thanks.

regards

mntiwana

Where you have iMA() it should be replaced with something like this :

iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,HullPower,0,0);

You will have to add HullPower parameter in the EA

 
mladen:
mntiwana

Where you have iMA() it should be replaced with something like this :

iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,HullPower,0,0);

You will have to add HullPower parameter in the EA

Dearest MLADEN,

thanks boss,...and where do i add Power parameters,for example i want Hull Power 2,in picture 5 if is the right place ? and what about Bar To Use ? ...if some thing needed to be add at extern ,thanks,

regards

Files:
3_2.png  131 kb
4_2.png  142 kb
5_1.png  156 kb
 
mntiwana:
Dearest MLADEN,

thanks boss,...and where do i add Power parameters,for example i want Hull Power 2,in picture 5 if is the right place ? and what about Bar To Use ? ...if some thing needed to be add at extern ,thanks,

regards

Check the call to the iCustom()

You have it there : iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,HullPower,0 ,0);

 
mladen:
Check the call to the iCustom() You have it there : iCustom(NULL,0,"Hull parabolic 2.1",PERIOD_CURRENT,Ma1Period,Ma1Price,HullPower,0 ,0);

Dearest MLADEN,

much thanks,i did it as you pointed (picture 6) and compiled with no error or warning,can please see at picture 4,what to do with these bars,is there any function of them ?

regards

Files:
6.png  131 kb
4_2.png  142 kb
Reason: