Coding help - page 412

 
Mastercash:
Thank you for your kind response, but ...... what I mean is this, assuming that the ea open an order, eurusd, and there is another signal from usdjpy, if the order of eurusd is still running, it will not be able to take usdjpy order....one order at a time....I dont want it to be having more than 1 order runing at a time.....Thanks

Find two lines that go like this (in check_can_open() and orders_count() functions) :

if( OrderSymbol() != Symbol() ) continue;

and delete them. That way, only one order will be active across all the signals

 

hello dear friends

i have some excellent indicators that they do not observe in new mt4 ver

please help me rework them

thank you so much

Files:
bullnbear.mq4  13 kb
 

Hello Mladen,

I am trying to make an EA using Trend Magic_mtf which you had kindly modified quite a while ago, and I am trying to understand the code, specially what happens in the buffers bufGreen and bufRed while the Trend Magic line is being drawn on the chart.

The way I understand, when green line is being drawn the value of bufGreen=0 and the value of bufRed=1 and conversely when red line is being drawn bufGreen=1 and bufRed=0. Please look at the code and tell me if I am correct to think so.

Attached is the indi for your quick reference.

I wish You and all Forex-TSD members a wonderful New Year.

Files:
 
Farhad_1:
Hello Mladen,

I am trying to make an EA using Trend Magic_mtf which you had kindly modified quite a while ago, and I am trying to understand the code, specially what happens in the buffers bufGreen and bufRed while the Trend Magic line is being drawn on the chart.

The way I understand, when green line is being drawn the value of bufGreen=0 and the value of bufRed=1 and conversely when red line is being drawn bufGreen=1 and bufRed=0. Please look at the code and tell me if I am correct to think so.

Attached is the indi for your quick reference.

I wish You and all Forex-TSD members a wonderful New Year.

Hello Farhad_1, since Trend Magic is using cci < 0 for buffRed(sells)

and cci > 0 for buffBlue(buys) maybe an easier way would be to call a cci, should get the

same results.

 

Hello and thank you Mrtools, but for making the EA using a Wizard I need to know the value of the buffer (or buffers) for Green and Red part of the line. i.e. I need to know which buffer and its value would cause the line to be plotted in green, also the same for the red.

Any help would be appreciated.

 
mrtools:
Hello Farhad_1, since Trend Magic is using cci < 0 for buffRed(sells)

and cci > 0 for buffBlue(buys) maybe an easier way would be to call a cci, should get the

same results.

Please refer to my last post, and in addition, Trend Magic_mtf is slightly different to the original Trend Magic which only used cci. The new Trend Magic is mtf and also has ATR Period and ATR Multiple incorporated in it. I think it was improved by Mladen.

 
Farhad_1:
Please refer to my last post, and in addition, Trend Magic_mtf is slightly different to the original Trend Magic which only used cci. The new Trend Magic is mtf and also has ATR Period and ATR Multiple incorporated in it. I think it was improved by Mladen.

Farhad_1

"Trend magic" is just a renamed super trend

And mrtools is right : atr does not affect the color at all. Only cci(CCPeriod) determines the color. When that cci is above 0, it is green, when it is bellow 0, it is red. Where there is a difference in color, it is where that indicator repaints (better to use some correctly coder non repainting version of super trend)

Files:
tm.gif  82 kb
 
mladen:
Farhad_1

"Trend magic" is just a renamed super trend

And mrtools is right : atr does not affect the color at all. Only cci(CCPeriod) determines the color. When that cci is above 0, it is green, when it is bellow 0, it is red. Where there is a difference in color, it is where that indicator repaints (better to use some correctly coder non repainting version of super trend)

Thank you Mrtools and Mladen. I have been checking all the Super Trend indis on Forex-TSD and other forums but have not found one which is mtf, nrp, and also allows settings for cci period, ATR period and ATR Multiplier. Do you know of any version which allows the setting of those parameters, and if such Super Trend doesn't exist, which version do you think is the best? I prefer to have the line drawn on the chart.

Is there a program or indi which allows checking of an indicator for repainting, so one doesn't watch the chart bar by bar to find out if the indicator repaints?

 
Farhad_1:
Thank you Mrtools and Mladen. I have been checking all the Super Trend indis on Forex-TSD and other forums but have not found one which is mtf, nrp, and also allows settings for cci period, ATR period and ATR Multiplier. Do you know of any version which allows the setting of those parameters, and if such Super Trend doesn't exist, which version do you think is the best? I prefer to have the line drawn on the chart. Is there a program or indi which allows checking of an indicator for repainting, so one doesn't watch the chart bar by bar to find out if the indicator repaints?

Farhad_1

Try out the one from this post : https://www.mql5.com/en/forum/general

 
mladen:
Farhad_1 Try out the one from this post : https://www.mql5.com/en/forum/general

Thanks Mladen

Reason: