This script section provides access to the order rejection message so that additional information can be added. When this script section is active it will automatically provide instrument and order context at the same time.
This script section becomes accessible when an order is in process of being rejected.
Rejected message can happen for a range of conditions established in the Unit Size or Can Add Unit script sections. What the rejected message reports is included and determined by the script section's statements. Orders are rejected when the conditions created to reject an order are found. The rejections of an order uses the order.Reject function. This function handles the rejection details and it also carries the information that explains why the order was rejected.
The order.processingMessage property is the method for how an order rejection message is added to the Trading Blox Builder Filter Log.csv file that is in the Results Folder where Trading Blox Builder is installed. After every test, the Filter Log.csv file is updated after a test is completed.
The Filter Log.csv file has a record of every rejected order. The Filter Log.csv is a ".csv" (comma separated values) file that will easily open into a spreadsheet. The message that appears in this script section when there is script statements to display the rejection message, this script section will execute each time an order is rejected.
Access to this rejection message property provides an opportunity to adjust a rejection messages with additional details so those changes can appear in the log window, and in the Filter Log.csv file.
Adding message details to the Filter.Log can improve understanding about why an order that should not have been rejected, or specific order rejection that is a problem, can be accessed and adjusted before the rejection-message is added to the Filter.Log.
Order Rejection Conditions Example: |
---|
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' The Order.Reject function is given a message ' when an order is flagged for rejection. |
When a rejected order happens, this Fitered Order Notification script section is executed so the rejection message can be seen at the time of an order rejection. When there are scripts in this section, those script will execute and the PRINT statements in the script will send the rejection information to the Main Screen's Log window display.
The Trading Blox Builder MACD Portfolio Manager and others use script to control in which the Entry Orders cannot create an order that will be able to go in a Long or a Short direction.
When this happens in a system, and the Entry Order script in the system does not check to see if the Portfolio Manager has blocked a Long or Short order, the order direction created the Portfolio Manager intended to block, will cause a Portfolio Manager Rejection message when the Broker Function attempts to create the order.
This automatic rejection of a huge amount of orders that should not have been created in the first place, will fill the Log Window Order Rejection display. This is a problem when the task of watching order rejections is to find a problem quickly. In many cases, there wouldn't be any rejected orders if the Entry Orders script section had tested the symbols properties to see if the Portfolio Manager had blocked orders in the direction that the Entry Order section will attempt to create an order.
Allowing automatic rejection of orders will fill the Filtered Log window with so much information that shows the Portfolio Manager didn't intend an order be created with that symbol in the direction today it is being blocked. Take a look at the above example. It shows how the current the Donchian's Turtle SingleUnit Entry Exit block to show how easy it will be to remove those Portfolio Manager Rejections.
In the above image, the script-text in each red box outline will prevent an order in a direction that the Portfolio Manager attempted to prevent. It can stop the rejections because the Trade Control Properties (click to see the trade control property details).
When an Entry Orders statement test the status of these trade-direction properties, the orders in the direction the Portfolio Manager blocks will not be created.
Edit Time: 10/23/2020 11:35:38 AM |
Topic ID#: 669 |