NexusFi: Find Your Edge


Home Menu

 





IKYP - How I solved email troubles on VPS


Discussion in NinjaTrader

Updated
    1. trending_up 1,313 views
    2. thumb_up 5 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 3 attachments




 
Search this Thread

IKYP - How I solved email troubles on VPS

  #1 (permalink)
 BERN Algos 
Bologna Italy
 
Experience: Advanced
Platform: nt8
Broker: NinjaTrader
Trading: futures
Posts: 42 since Jun 2022
Thanks Given: 11
Thanks Received: 38

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
//////////////////////////////////////////////////////////////////////////////////

Attached Thumbnails
Click image for larger version

Name:	mail.jpg
Views:	58
Size:	65.7 KB
ID:	328143   Click image for larger version

Name:	mail2.jpg
Views:	57
Size:	75.8 KB
ID:	328144  
Attached Files
Elite Membership required to download: BERN ALGOS IKYP rev1.zip
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #2 (permalink)
 
WattMan's Avatar
 WattMan 
New Brunswick, NJ, USA
 
Experience: Intermediate
Platform: NT8, ToS
Broker: IBKR, TDA, NT
Trading: Stocks (B&H), Futures (started daytrading), Forex (maybe someday)
Posts: 16 since Dec 2014
Thanks Given: 40
Thanks Received: 2

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?

Reply With Quote
  #3 (permalink)
 BERN Algos 
Bologna Italy
 
Experience: Advanced
Platform: nt8
Broker: NinjaTrader
Trading: futures
Posts: 42 since Jun 2022
Thanks Given: 11
Thanks Received: 38



WattMan View 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?

My account has "!" inside too. Use only numbers as input parameter, that's how I'm using it live.

account: YourName!Mirus!123456
MyAccount (parameter): 123456

Ciao

Started this thread Reply With Quote
Thanked by:
  #4 (permalink)
 TigerStripes   is a Vendor
 
Posts: 109 since Mar 2021
Thanks Given: 33
Thanks Received: 56

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.

Reply With Quote




Last Updated on January 13, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts