NexusFi: Find Your Edge


Home Menu

 





IKYP - How I solved email troubles on VPS


Discussion in NinjaTrader

Updated
    1. trending_up 1,214 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

(login for full post details)
  #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:	49
Size:	65.7 KB
ID:	328143   Click image for larger version

Name:	mail2.jpg
Views:	48
Size:	75.8 KB
ID:	328144  
Attached Files
Register to download File Type: zip BERN ALGOS IKYP rev1.zip (2.5 KB, 36 views)
Started this thread Reply With Quote
The following 4 users say Thank You to BERN Algos for this post:

Can you help answer these questions
from other members on NexusFi?
TPO letter distribution for E-mini?
Emini and Emicro Index
convert tradingview pinescript to ninjascript indicator …
The Elite Circle
Any experience with Affordable Indicators - Duplicate Ac …
Trading Reviews and Vendors
PowerLanguage/EasyLanguage Trying to use a Function as a …
EasyLanguage Programming
Optimal Futures Trading Workflow
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
GFIs1 1 DAX trade per day journal
26 thanks
Big Mike in Ecuador
18 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
11 thanks
King Of The Nasdaq
10 thanks
Sam fired from OpenAI!
9 thanks

(login for full post details)
  #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: 15 since Dec 2014
Thanks Given: 36
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
(login for full post details)
  #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
The following user says Thank You to BERN Algos for this post:
(login for full post details)
  #4 (permalink)
 TigerStripes   is a Vendor
 
Posts: 108 since Mar 2021
Thanks Given: 33
Thanks Received: 54

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


© 2023 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