Do these codes close the stochastik indicator when the difference between the 2 lines is too large?
The code provided is an example code on how to properly create an indicator and how to get the indicator's value. That is, this is a training code for an Expert Advisor that does ONLY two things: it shows how to create an indicator correctly and how to get the indicator value.
Simple trailing - works on every tick, works both for a losing position and for a profitable position. Works with the current character and only for positions with 'Magic number'
An example of get values from the iStochastic indicator
Code: iStochastic get value.mq5
Do not forget the rules: create the indicator handle ONCE in OnInit, use CopyBuffer to get the data.
Result:
Do these codes close the stochastik indicator when the difference between the 2 lines is too large?
306178
Do these codes close the stochastik indicator when the difference between the 2 lines is too large?
The code provided is an example code on how to properly create an indicator and how to get the indicator's value. That is, this is a training code for an Expert Advisor that does ONLY two things: it shows how to create an indicator correctly and how to get the indicator value.
306178
Very Simple Intersection iMA Open Position
(code 'Very Simple Intersection iMA Open Position.mq5')
The example shows how:
306178
Updated script - printout 'ENUM_TIMEFRAMES'
Timeframe in MT5 is a bit field. Printing out 'HEX' values gives an idea of how timeframes are encoded (See timeframe coding from H1 and higher).
Result:
24 -> HEX -> '18'
306178
Simple Trailing
Code: 'Simple Trailing.mq5'
Simple trailing - works on every tick, works both for a losing position and for a profitable position. Works with the current character and only for positions with 'Magic number'
306178
Simple advisor. Always one position. The position is opened with Stop Loss and Take Profit. There are no defenses
Code: 'Stop Loss Take Profit EA.mq5'