Information
Username: | galafrin |
Member since: | 26 Jan 2013 |
Last login: | 27 Apr 2023 |
Status: | Active |
Activity
Where | Created | Comments |
---|---|---|
Algorithms | 2 | 18 |
Forum Topics | 6 | 55 |
Jobs | 0 | 5 |
About
Last Algorithm Comments
On video It looks so good it could be fit to compete and I wish there was a demo version to backtest for anything would do behind the scene, what demo is meant to prevent.
It's basically the Price ROC in angle degrees sliced in 9 parts,,
Thanks for uploading your code, At first sight it is remainder of ADX volatility , in fact it is quiet near at double the period but with a simpler code.
There might be an error in line 85 ;
_iSeries[index] = ((1 - _k)*_iSeries[1] + _k*diff/sum);
it should be
_iSeries[index] = ((1 - _k)*_iSeries[index-1] + _k*diff/sum);
Based on the formula of exponential moving average
trend_meanreversion you are right, I downloaded Demarker https://ctrader.com/algos/indicators/show/411 and renamed it as Osc_Demarker , by doing that there is no need to change the code above.
Positions.Closed abarca todo los symboles , entonces hay que filtrar en closedPosition así:
var pos = arg.Position;
if ( arg.Position.SymbolCode != Symbol.Code ) return;
if ((pos.NetProfit < 0))
Positions.Closed -= closedposition;
OnStart();
Suerte.
Merci pour le partage du code Ludohoebi.
Hello Paul, to get it work in non-english localized system , it need this :
line 236
fxNews = new FxNewsDailyFxDownloadPath, IncludeMediumLevelNews, IncludeHighLevelNews, CustomDateFormat);
replaced by this:
CultureInfo CI = Thread.CurrentThread.CurrentCulture ;
Thread.CurrentThread.CurrentCulture = new CultureInfo ( "en-US" ) ;
fxNews = new FxNews(DailyFxDownloadPath, IncludeMediumLevelNews, IncludeHighLevelNews, CustomDateFormat);
Thread.CurrentThread.CurrentCulture = CI ;
Then it works in all cultures, otherwise it refuses alphabetic Myfxbook date format on non-english culture system.
Thanks for sharing the code Paul.
Hi Paul, this is indeed a working turn around to modeless WPF form that cAlgo won't let us pop for a reason.
You form must be modal as it keeps the control from returning to its parent windows which is the cBot that launched it, not cTrader. Yes the form can be minimized and you can handle cTrader but the cBot is bloked until you close the form. I used your example to modify stops in batch until I realize the cBot was hung. Then I tried to make it modeless, got OnTick control but this time the form was frozen.
Anyway it is no big deal if modeless form aren't available from any cBot , there is always the option to set up a cBot that would only lauch a form to perform punctual tasks such as trading then stop.
Hello, cBot from which this form is launched loose control until the form is closed, as it is modeless, Form.Show() would make it modeless only with another form, meaning it does not work with "Aplication,Run(form)", contrary to what I wrote above. I can't have this example working modeless nor my own cBot which would take advantage of any modeless form actually. this in order to interact with the cBot while it is running, it would be great to achieve that.
Got it, it is both of the two worlds:
this.form.Show();
Application.Run(form);
now you have got both Windows and ctrader at hands.
It is probably designed no to be: for the cBot to regain OnTick control, this form needs to be modeless as opposed to modal as it is right now, alhough changing "Application.Run(form) "by "this.form.Show() " as described in MSDN won't be enought in this case, then the from freezes, which is just the contrarian effect.
After setting up a form of my own, it turned out the form keeps exclusive control until it is closed, it never passes it to OnTick while open, it would be better if, say, the form could stay open, relinquish control to Ctrader without closing, and regain control when focus is set by user. No idea if there is a mehod to achieve that goal, I'll post if any.
Last Jobs Comments
or carlosbarberomarcos@gmail.com
Telegram channel Car Bar
Helo I can do this job
Hello as a member since 2914 and a freelancer I can do this job if you agree
Hello as a member since 2014 I can do this job, ready to take on if you agree
Hola, sencillo pero eficaz robot sin embargo la pregunta de confirmar la señal antes de abrir queda por resolver.