Posts

Create a tool to visually analyse data

Image
Other blogs about the topic Main Blog about creating a trading bot Stop Loss Trading strategy explained Coding Schedule applications in macOS Big Sur   Other stuff

Schedule programs on macOS

Image
Other blogs about the topic Main Blog about creating a trading bot Stop Loss Trading strategy explained Coding Schedule applications in macOS Big Sur   Other stuff

Coding

Other blogs about the topic Main Blog about creating a trading bot Stop Loss Trading strategy explained Coding Schedule applications in macOS Big Sur   Other stuff

Stop Loss Trading explained

Image
Other blogs about the topic Main Blog about creating a trading bot Stop Loss Trading strategy explained Coding Schedule applications in macOS Big Sur   Other stuff

Trading Bot on macOS Big Sur: my experiences during the project

This blog is like a daily journal, I will continue to update this post about my findings during the journey. It is more about difficulties or challenges I had to deal with than about the actual code. While most content is macOS (or Unix) related, I am very confident that the shown approaches will work in a rather similar way in other environments (Windows) as well. The actual code/approach how to make the trading bot itself I have explained (with docu/code in the documentation of the video) here: https://www.youtube.com/watch?v=l3undRJAuAU This project is mainly based on NodeJS, there are parts I am using in Python, cause I had the code already. Most important Tip De-complexify problems Start with something you can handle and increase step by step the complexity of the task. Run a script manually, before trying to schedule it, to see if the script runs at all. Run first a very simple script scheduled, before you run a complicated script, to see if you can successfully schedule a scr

toc test 2

Table of Contents Fruits more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text Red Fruits asdasds Apple Raspberry asdfasdfsad asdasd Orange Fruits more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text Orange Tangerine Vegetables more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text Vegetables Which Are Actua

QUINDIP: document your code properly in LotusScript

Image
Hi this is not related to xPages but to LotusScript: we have started years ago to use "kind-of" javadoc-ish style of documentation of our code: and just today i figured it actually is used using typeahead (similar as in the java editor): really neat ;-) enjoy

QUINDIP: intercept wrong/inexistent documentId

Image
Hi long time no post... but alas.. finally something I really like: Have you ever had the situation, that you have a xPage which is workflow enabled, and you have (maybe) multiple servers? Some users might even use the LN client front-end on another server. The workflow sends out a mail telling the approver to approve. Boom... the document did not yet replicate to the target server... you do not want either of this message displayed: what to do? hmm.. I first tried with this , sorry, was not happy with it... thing is: we use the same xpView for production and for archive, only the data source changes in the background. This will open the documents from the archive with such an URL: http://server/db.nsf/%24%24OpenDominoDocument.xsp?databaseName=server!!otherDb.nsf&documentId=6496BA354B37544CC1257C680059C04B&action=openDocument I could not get this to work.. So I had to figure out another way to intercept a "wrong" documentId. Solution: use a p

QUINDIP: set JAVA Compiler target in notes.ini

Literally EVERY time I created a Java agent or library the compiler target was set to 1.2 even though I have been using LN 7 or later... I always had to find the noteId and use a tool to manually change the source and target to 1.6. here's how you can change that behaviour: http://www-10.lotus.com/ldd/ddwiki.nsf/dx/07152009034956PMMSTR75.htm enjoy AND make sure you add an EMPTY at the end in case JavaCompilerTarget=1.6 is your last line! otherwise this setting will not be used!

hmmmmmm.. that does not really improve my trust in "stable xPages" ;-)

Image
seems i'm really not the only one getting those!!!!

QUINDIP: filter design elements in LN designer

Image
did you ever happen to notice this nice little "filter" field on the top right hand side of the LN designer when in a list of design elements? really neat! if only I could access it via keyboard, any ideas?

QUINDIP: need to run an agent as signer from an xPage?

we needed a possibility for users to "override" the workflow, ie. interfere even though they were not "authors" at the moment. The only way was to do with an agent running with more access rights. solution was: us "sessionAsSigner" this would not work: var agent = currentDatabase.getAgent("(agnXPageWFMoveToState60)"); agent.runWithDocumentContext(currentDocument.getDocument() ); return "xsp-reopen"; this did work (kudos to Sven Hasselbach ): var agent = sessionAsSigner.getCurrentDatabase().getAgent("(agnXPageWFMoveToState60)"); agent.runWithDocumentContext(currentDocument.getDocument() ); return "xsp-reopen"; hope this helps some people to achieve similar things

INDIP: add visual indicator to type ahead

Image
that's how it looks: field with type ahead waiting for input: field with type ahead thinking field with type ahead failure this is the XML code of the field for the events: <xp:eventHandler event="onkeypress" submit="false" id="eventHandler2"> <xp:this.script><![CDATA[if (event.keyCode==9 || event.keyCode==13){ removeVisual('view:_id1:inputText3') }else{ addVisual('view:_id1:inputText3'); }]]></xp:this.script> </xp:eventHandler> <xp:eventHandler event="onblur" submit="false" id="eventHandler3"> <xp:this.script><![CDATA[removeVisual('view:_id1:inputText3')]]></xp:this.script> </xp:eventHandler> and this is the style assigned to the field: <xp:this.styleClass> <![CDATA[#{javascript:if( currentDocument.isEditable()){ return 'useTypeAhead'; }}]]> </xp:this.styleClass> this is n

INDIP: how to figure out the id of an element which triggered an event!

Image
here's the scenario: We have what we call dynamic tables. It lets the user add as many rows as he requires. Really neat. In some of the fields we use type ahead. Recently I figured: it would be nice to see an indicator if the server is "thinking"... something like I could do it easily via one specific field from which I knew it's id ... But in those dynamic tables I have no clue on which field the event for type ahead was triggered.... until now: Cudos to  Paul Calhoun with his incredibly useful tips about CSJS (something I usually avoid as much as I can) There I found the solution! You can call SERVER side JS from CLIENT side JS... isn't that fantastic? here's how: call the SSJS like this: "#{javascript:<ServerSide JavaScript>}" example to alert the id of an element via it's event, in this case onFocus, which was triggered: alert( "#{javascript:BackingBean.getElementId(this)}" ) For those ones interested