[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 521

 
MaxZ:

Thank you for your reply! I came across just such a pattern. Thought it was an effect caused by some settings in MT.


Beginner's answer to Beginner!? :))))

And how, with the template, I don't understand something?
 
Usual_Trader:

I do not like the history on some brokerage companies, Expert Advisor is much worse optimized, but I am satisfied with trading conditions. I have an idea to divide the Expert Advisor into 2 parts - one part works with one brokerage company, monitors the chart and generates signals, the second part works with another one, takes signals from the first one and places orders.

So, there are two ways to solve this problem

1) subscribe to our own signals according to the latest update of MQ. But we would like to make the exchange within one computer

2) Arrange the exchange through a file (or buffer). Maybe someone has done similar? Throw me a link, please, or tell me where to dig

From this EA, you can make a library and connect it to your working EA.
 
MaxZ:

Here's the famous idnikator.

Can you get a picture like this!? :))))))

By the way, Can anyone rewrite the indicator so it draws the same as the picture above!?


r772ra:

And how, with a template, I don't understand something?

I'm a nerd at this... I didn't make the template. Here's how it's done, with the help of a template:

<window>
height=83
<indicator>
name=Custom Indicator
<expert>
name=Heiken Ashi
flags=339
window_num=0
<inputs>

...

</inputs>
</expert>

...

</indicator>
</window>
 
Usual_Trader:


Why are you making such a mess? Since your entry point into the market is the entry point to the opposite side, you should first close and then immediately open an order, without creating a bunch of logical variables. In this case, you are working on a zero bar and stochastic conditions may change even on every tick.

Or, if you want something more or less similar to work, try to swap the while loops that open and close the loop - first close, then open, but imho, in this style of writing it is difficult to debug the program. Learn to use functions, for example, separate functions for closing and opening


- Thank you), I will try,

- As for the "You work on the zero bar and stochastic conditions may change even on every tick", i think you mean it's better to work on the 1st and 2nd bar?

- And one more question if i may? Why I don't always open orders when the stochastics lines are crossed (you can see it on the chart). I don't have any other orders open and I have a tolerance for deviation of crossed lines in the criteria for such crossings?

 
MaxZ:

By the way, could someone rewrite the indicator so that it draws the same way as in the picture above!?

When you just change the line

#property indicator_chart_window

to

#property indicator_separate_window

the histogram starts drawing infinitely downwards (the bodies of white candles close everything and go infinitely downwards), not like in the picture:

How to deal with this, Who can tell!? :))))

 
MaxZ:

When you just change the line

to

the histogram starts drawing infinitely downwards (the bodies of white candles cover everything and go infinitely downwards), not as in the picture:

How do I fight this?!? :))))

It looks like there is no way... I searched in search, it says there is no way. Only the magic of templates helps. That's the problem... And the template option doesn't work.

I don't need the indicator. I'll have to explain how to determine the colour of the candles received by the indicator! :)

 
Equilibrium:


- Thanks), I will try it,

- About - "In this case you work on a zero bar and stochastic conditions may change even on every tick", as far as I understand you mean that it is better to work on 1 and 2 bars?

- And one more question if i may? Why I don't always open orders when the stochastics lines are crossed (you can see it on the chart). I don't have any other orders open and I have a tolerance for deviation of crossed lines in the criteria for such crossings?


1)make this parameter a variable and test it. At least, although the price may go a bit during this time, but there will be less false signals

2) The entry/exit conditions are not clear to me - why subtract or add 1? I used to do (I don't have the code saved, unfortunately) M2>S2 && M1=S1 and M2 <S2 && M1=S1 and plus check that stochastic is above/below threshold. It worked for some currencies and timeframes, but I don't dare to use it for real as it is too unstable.

 
TarasBY:
You can make a library out of this EA and connect it to your working EA.

thanks for the tip
 
Usual_Trader:


1)make this parameter a variable and test it. At least, although the price may move a bit during this time, there will be fewer false signals

2) Entry/exit conditions are not quite clear to me - why subtract or add 1? I used to do (I haven't saved the code) M2>S2 && M1=S1 and M2 <S2 && M1=S1, plus I checked if stochastic is above/below threshold. I tried it with some currencies and timeframes but I didn't risk using it for real as it is too unstable.


I will try it again. By the way, the criteria"M2>S2 && M1=S1 && M2 <S2 && M1=S1" was set to workonly at 0 and 1 bar, but it didn't work at crossing lines. Then I assigned int type to M0 and S0, and I think I understand why only some things started to work...

PS:"It worked on some currencies and timeframes, but I didn't dare to put it on real - too unstable", I'm not going to put it on stochastics alone either, I will definitely add something else).Thanks again!

 
Pacman:

Hi all!

Dear forum users, help me out here.

I have an indicator that displays highs and lows for the last n bars. The information is displayed as a symbol and I want it as a line.

Can you please tell me how to correct the code?


Already corrected, search earlier :

Reason: