Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now, It is Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Having a bunch of strategies in a VPS running while you are busy with something different is not the most relaxing thing ever. You know, if something could go wrong, it will.
Now, Ninjatrader comes with the possibility to configure so-called share services, email in particular, that can be used as a "whatchdog" service to improve user feeling even when a connection to the VPS is not possible. This process is not complex by itself but it becomes more and more messy when you start sending mail. I'm not the only one experiencing up and down days, some smoothly working, some other absolutely not, with no apparent reason.
I spent a lot of time searching solutions in forum and other stuff, this is my conclusion and how I addressed it.
a) more or less all public mail servers have this two-step verification process. It's not trivial but feasible, follow instructions, it will work.
b) public mail servers like gmail, yahoo, etc. have anti-spam filters AI-based. This is something barely not documented, for obvious reasons, but this is the point in my opinion. My "account equity" emails are simply too similar to each other, with no natural language in them, the same title, only numbers. They are seen as spam by the AI filter. In some kind of erratic way, after a dozen of email, the AI puts this kind of message in black list and starts rejecting any of them. At least for some days.
Once I came to the conclusion above, that's how I configured my system to solve this issue:
c) I created a strategy that generates smart, anti-spam email by randomly changing title and filling text body with different information each time. The strategy is called IKYP and it's attached. A couple of examples of email generated by IKYP are attached as well.
d) I added a MX record to DNS in my window server. You can find details by typing "add mx record windows server" in google. I'm totally numb at IT, so if I was able to do it, everybody can.
Strategy instructions are included into the code. Btw:
//////////////////////////////////////////////////////////////////////////////////
// IKYP - I'll Keep You Posted - strategy by BERN ALGOS - November 2022 - Rev01
//
// This strategy is intended to keep VPS user informed on a regular basis on his
// algos trading progress. IKYP sends an email every time a change in account balance
// is detected with a sampling time of 5 minutes. A mail is anyway sent every
// 2 hours even if the account balance is unchanged, to keep user informed that
// both NT & VPS are running.
// The account balance is resumed in the mail title, open and closed trades are listed
// inside the mail body. Title text is randomly changed to reduce the spam ranking
// assigned by most of mail servers filters to chain of quite similar emails.
//
// How to use it:
// - Edit email and account name in strategy parameters
// - Select a running instrument (MES in example)
// - Recommended timeframe is 5 minutes
// - Enable the strategy in the strategy tab
//
// Requires a sharing service properly configured in NT8
//////////////////////////////////////////////////////////////////////////////////
The following 4 users say Thank You to BERN Algos for this post:
Thanks a lot. Played with your script. Did the required NT8 service setup. While the script works like a charm on SIM accounts (including additional custom created SIM accounts within NT8), I am unable to have the strategy script activate on my live account. I suspect that is because the NT given account name has spaces " " and "!" characters in the account name.
If this helps, I am running this on my desktop (and not a VPS) and can get the emails as well as SMS messages from SIM accounts (but only those!). Any guidance?
I am looking to make an indie which traces when an order has been opened & what is it long or short, is the OnBarUpdate in your zip the best way to to that, basically attach a signal or object to track when that for each loop detects a position opened or details on an opened pos.
I have tried it in OnStateDefault similarly though it will only trace the order info well enough if the indie is added to a chart w an already placed pos.