PDA

View Full Version : PivotMagic v4 EA: Something new, could prove profitable!



Mebelgixxa
01-01-2023 20:16,
Hi ,

I've been working in an EA using pivots and it was shown to be truly amazingly accurate in predicting overall motion of the sign under normal market conditions.

After working on a range of versions and posting the ex4 document in forex-tsd and egybuilderFX, I was able to come up with ver 4 which is less risky and has a dynamic stoploss mechanism.

The idea is to establish an emergency exit egy as follows: after waiting for a specific number of pubs (time here relevant to chart period), you finish that time is running out and also an exit is a much better idea, so attempt to exit the soonest with the minimal reduction possible. The time to wait is defined in the parameter (wait_time_b4_SL).

After that number of pubs has passed and we're still not in a profitable standing, then wait till you arrive to a stage that would have minimal reduction. The tolerated reduction is increased in time, i.e., the more we wait the more likely the trend is way opposite to our predictions (some news event triggered enormous rise/fall in price), so we would accept a bigger reduction. But in the long run, this reduction could always be recovered (unless a warfare or so takes place).

As the stoploss is dynamic, so is the takeprofit. I am using the saying: let your profits run cut your losses.

One thing you will note is that the stoploss feature relies on time, as everything else in a pivot egy. Remember, we're not currently utilizing rings EMAs and stuff, we're using the that the market will always correct itself. I might have assigned a value for stoploss, but it doesn't conform to the essence of the usage of pivots, which presumes that within a specific timeframe, the price is expected to return to the pivot.

So this variant is a way ahead of the rest in that it protects your loss no matter what happens because of a news event, this variant will let you handle that unusual hike/nosedive in price and forfeit some losses to get you going again.

Besides that, the other features are more or less same as the earlier versions. But to be fair, allow me to describe here the user-set parameters used in this version:

Lots // number of lots to trade (generally, 1 lot is $10k): not limited although default is 1.

TrailingStop // the amount of the trailing stop required to maximize profit (infinite default option is 55)

aggression_level; // how aggressive do you want the program to behave concerning taking trades. In a level, By way of example, any line that is broken pivot is going to be a trade possibility. But in levels that are aggressive, we're likely to trade only if P2 and greater or reduced lines and S2 have been broken in a certain direction. (the value ranges from 1 to 12 and 10 is default).

Wait_time_b4_SL; // the range of bars (moments to get a normal 1M chart) to wait before starting a exit egy. It could take before the order is closed since a function is going to be called to minimize the potential loss.

MAGIC; // the magic number could be given by the trader for the ability to track trades of various charts.

VolatilityToleranceLevel; // This is what I like to maintain 1 for today. It's a risky market and you won't want to end up losing your cash. I only put it here to let gamblers to raise it into double/triple their profit or loss for that matter (ranges from 1 to 10)

tp_limit; // how many times is a trailing point allowed. I put this here since I know that some brokers don't allow more than 5 tp modifiions for a specific order. The default is 5 but it's a fantastic idea to raise it up if your broker is kind enough to permit you to achieve that. It is going to improve your profit.

Pivot_span; // that is how many pubs that are used to calculate a specific pivot. Clearly it means that the 100 bars will specify your own line. I discovered this to be useful than hours because of timezones. (default=100)

Do check it out and see whether it'd work nicely on your own account.

I can't reiterate enough that this remains an EXPERIMENT so don't go beyond forward experimenting with this. Also notice that this version is usable without any time limitations (unlike earlier versions) but it is also best to come back and check for updates.

The source code of this EA is only available to people who support it. I am not greedy or asking for cash. But people who are also eager to help develop this EA and can help improve it and who understand programming is welcome to contact me so I can send the source code. I am not seeking money unlike some.

One very important note is the fact that you should always follow the development of the EA in case you begin testing since there is no static stoploss. If there was a technical problem that resulted in bettering your computer or the server or a power outage, the EA will be useless and you have to follow the order yourself. The SL is there but it is dynamic and requires the EA program to run all the time.

One more thing:

I noticed that a few who started forward examining noted that new orders weren't made in various currencies at the same time. I couldn't figure out that. But I added a condition that if the number differs, a new order can occur. So in the event that you employ magic numbers that are different to different charts, I expect you will be able to get simultaneous orders in various currencies.

Let us hope this would be a positive advancement in the EA. You can examine it (backtest, forward testing) using any time period. But I only used M1 M5 so far. Ensure that you change the wait_time_b4_SL so (lower value for greater timeframes).

I nearly forgot to say that connected you will find the backtest results --according to default parameter values- for the EURUSD (M1) in April 6, 2005 to December 31 2005 (nearly 8 weeks ). The effects of the dynamic stoploss feature are evident in August, which observed a powerful opposite trend due to news events in the time. The modeling quality is terrible, I understand... But I presume it won't be a hell distinct from a 90% modeling quality.

Here's the graph:

http://img50.imageshack.us/img50/347...ytester7rh.gif
I truly miss the 0 percent reduction results of prior versions. But for the longer term I think this model is better. But you're still able to have 0 percent if you set the wait_time_b4_SL parameter into a high amount (let us say 1,000,000).

Note that unlike earlier models, there are almost no gaps in this test, meaning that virtually every trade day there have been several trades. As a result of the new energetic stoploss feature.

Another important note is to understand this EA is intraweek not intraday. It's not a method. It takes time to operate effectively. So don't panic or worry whether it ends with loss on a specific day. Upon the introduction of the trading day, it should resume as normal.

I would like to ask programmers here if there is a way to freeze a status (numbers, signals, variables) of the EA before weekends and resume everything with the old information on Mondays. Is there a way to do that. I imagine if we close the EA and begin on Monday, some info will be missing (including time pending because last order). There might be a purpose to retrieve those data once the EA begins with a pending order in place.
https://www.nigeriaforextrading.com/attachments/15185547061567629796.zip
https://www.nigeriaforextrading.com/attachments/1518554707490526659.zip