Coding help - page 213

 
mladen:
arroganzmaschine Check the way how trailing stops are managed in the EA from this post : https://www.mql5.com/en/forum/181334 . I think it can help you since it has all the elements (including error checking) that are needed to handle trailing stop loss

Hey mladen,

thanks for your reply. But this doesn't help me much. My posted code shows a programm that trails after the SL has been set to +2 Points. I want to do that for every open symbol and order, but it only checks the first order. In addition to that, some variables are not conform with this.

Can you help me there?

 
arroganzmaschine:
Hey mladen,

thanks for your reply. But this doesn't help me much. My posted code shows a programm that trails after the SL has been set to +2 Points. I want to do that for every open symbol and order, but it only checks the first order. In addition to that, some variables are not conform with this.

Can you help me there?

arroganzmaschine

I am afraid that I do not understand. That EA takes care of all orders and all symbols (not just one). Also, I doubt that you can trail a stop loss by using only 2 points (minimal distance from the current price allowed by brokers is usually much higher than 2 points)

 
mladen:
arroganzmaschine I am afraid that I do not understand. That EA takes care of all orders and all symbols (not just one). Also, I doubt that you can trail a stop loss by using only 2 points (minimal distance from the current price allowed by brokers is usually much higher than 2 points)

In my program, when I open a second order on the same symbol, the EA doesn't set any SL because it doesn't check every order. Do you know how to solve this problem?

Maybe you can check what I have to modify? I don't get the problem..

 

Dear Mladen

Is it logical to modify your Channeled LSMA Trend code:

if (lsmac > lsmap) cum += 1;

if (lsmac < lsmap) cum -= 1;[/PHP]

with something like:

[PHP]if (lsmac > lsmap) cum += lsmac + ATR;

if (lsmac < lsmap) cum -= lsmac + ATR;

to consider volatility in calculation?

Best,

 
-IXI-:
Dear Mladen

Is it logical to modify your Channeled LSMA Trend code:

if (lsmac > lsmap) cum += 1;

if (lsmac < lsmap) cum -= 1;[/PHP]

with something like:

[PHP]if (lsmac > lsmap) cum += lsmac + ATR;

if (lsmac < lsmap) cum -= lsmac + ATR;

to consider volatility in calculation?

Best,

-IXI-

You can try it. It seems like an interesting idea

 

please help

can anyone make this indicator (look pic) with shift day = 5

thanks

Files:
1.png  19 kb
 

Please help...how to create color bar indicator from these 2 indicator :

1. RSI Period 15 apply to close

2. Moving Average in RSI Sub Window Period 15 apply to previous indicator (RSI period 15)

the logic is :

1. if RSI value greater than Moving Average value = the bar color would become Blue

2. if RSI value less than Moving Average value = the bar color would become Red

help please, Thank you before!

Files:
1_1.png  31 kb
 

Dear Mladen,

Problem with the 4tf bars indicator as attached, I could have caused this, I did edit Unique ID and SetIndexLabels to "" for remove window info;

but I get infinite contstant error:

4 time frame Gann high-low activator EURUSDm,H4: unknown subwindow number -1 for ObjectCreate function

 
zigflip:
Dear Mladen,

Problem with the 4tf bars indicator as attached, I could have caused this, I did edit Unique ID and SetIndexLabels to "" for remove window info;

but I get infinite contstant error:

4 time frame Gann high-low activator EURUSDm,H4: unknown subwindow number -1 for ObjectCreate function

zigflip

That indicator needs to be rewritten in order to allow labels hiding (as you have tried using the "" for UniqueID - if you try to set the UniqueID to "" it will cause that error because the indicator is simply not meant to work without time labels). Here is one version that allows that - if you set the UniqueID to "" it will leave those labels out

 
mladen:
zigflip That indicator needs to be rewritten in order to allow labels hiding (as you have tried using the "" for UniqueID - if you try to set the UniqueID to "" it will cause that error because the indicator is simply not meant to work without time labels). Here is one version that allows that - if you set the UniqueID to "" it will leave those labels out

sorry think you misunderstand me, I still have the UniqueID, just renamed and shortened to "SSL" but where the indi writes some numbers (for example value of RSI on RSI indi) in the top left corner of the sub window pane, this I stopped by adding the SetIndexLabel 0,"" SetIndexLabel 1,"" ...etc x 6

works fine but I noticed the error message building fat log files, and I dont understand what the -1 its reffering to about the subwindow

I made some text blue in the first post just for the indicator name, symbol and period, as both indis are similar and giving that same error

sorry if my basic coding knowledge is irritating you, i am honestly working for myself not making indicators for commercial sales!

kind regards

Reason: