Get better (spread) values
-
Hello my friends, I would like to know how I can create an EA, or else do to know the best values of (Spread).
I don't know how to make a condition to generate this history.
My idea would be to create an EA and use it in the backtest or demo account.For example:
This EA would monitor 24 hours and record the values that the spread reached during 24 hours in the period for example 1 week.Record the minimum spread value reached.
Record the maximum value of (spread) reached.Getting the minimum and maximum values example:
EURUSD
(spread) minimum value 6
(spread) maximum value 50
So let's say we have an average, which would be the value of (spread) 30
If the value of (spread) is greater than (30) it means that the spread of that particular pair is above the average (high or large).
If the value of (spread) is less than (30) it means that the spread of that particular pair is below the average (low or small).Based on this, we can then obtain and work with the strategies based on the spread values that best suit each strategy.
-
@ontrade you'd have to create an array and then use statistical functions to find the minimums, maximums and averages.. Its quite serious data science, if you go that road.
If you used mt5, you could just look at the history, lol

-
@roar Thank you my friend.
I have already found and I am setting up a personalized spread table for each currency I intend to trade with EA.
Could you help me with a few more things?The first question is:
For example, let's say that I want to use the same strategy (crossing 2 averages) in 10 different pairs within the same metatrader 5, I must use the same robot in each currency, or I can create a multipares EA and it in one screen check if the crossing rules happened in the other 9 currencies and open the independent orders of placing the EA in the other screens?
If this is possible, how can I do it? -
@ontrade yes, just put "set current market for next blocks" before your strategy
-
@roar said in Get better (spread) values:
@ontrade yes, just put "set current market for next blocks" before your strategy
is there a specific block for this?
-
@ontrade yes, its name is "set current market for next blocks" lol
Use the search box in the builder