Support Board
Date/Time: Tue, 11 Mar 2025 05:14:06 +0000
[Programming Help] - Null Function ACSIL
View Count: 501
[2023-08-13 19:42:14] |
User373245 - Posts: 48 |
Is there a null to an order execution, function in ACSIL....I have my buy/sell entry built but have a criteria where I would not want the order to execute based on a a variable being present in another spot? And need to null, either from the alert signal or the order execution?
|
[2023-08-13 20:25:20] |
ForgivingComputers.com - Posts: 1021 |
Is there a null to an order execution, function in ACSIL.
By null do you mean cancel an order that has already been submitted? You can cancel limit and stop orders that are unfilled. Your best approach is to only do sc.BuyEntry or sc.SellEntry with whatever criteria gets you into a trade. |
[2023-08-13 22:27:51] |
User373245 - Posts: 48 |
NO mean to not have the oder occur. It's an if statement to the alert happening in the first place. Essentially I have an alert condition on my weekly I use for a large trade...not an entry but if the the weekly alert comes in within the day trade alert(the day trade signals my buy order) or at time of...I take a big trade, if the direction agrees. So if I get a day buy and my weekly has a weekly up volatility(long, not up as strong) alert I take a bigger trade then normal. IF my day trade comes in and the weekly volatility is in the opposite direction I do not take the day trade. So if I get a day buy signal and the weekly is volatility down(as in short/sell)....I need to not submit a buy order. Its more of a reason to not trade...not a cancel working trade. |
[2023-08-13 22:28:29] |
User373245 - Posts: 48 |
order not oder
|
[2023-08-13 22:45:49] |
User373245 - Posts: 48 |
Maybe I could set the original entry signal up and have the weekly as a not true in a boolean variable???? this is my buy signal that triggers my by trade if(LongArray[sc.Index] == 1) if(LongArray, !weeklyVol[sc.Index] == 1) something like this....I am a little new to coding so I dont have a strong strong grasp yet! |
[2023-08-13 22:57:18] |
ForgivingComputers.com - Posts: 1021 |
My suggestion is don't use alerts to trigger entries. Whatever logic the alert is performing can be coded in ACSIL. Then you can put other conditions you want around it. This if(LongArray, !weeklyVol[sc.Index] == 1)
is invalid. LongArray needs an index, and there are no commas in an if statement. I think you want this: if(LongArray[sc.Index]== 1 && weeklyVol[sc.Index] != 1)
The arrays are of the type float, so putting a ! in front doesn't really make sense. |
[2023-08-13 23:29:42] |
User373245 - Posts: 48 |
I realized that after I sent it...I would need to build an array of it first! I see...Thank you!! The alert logic is soooooo complicated. Like 30 calculations, 17 chart books and 5 time frames! It took me nearly 5 years to get it working correctly from a simple alert! Literally. And that thing is bomb!!!! I do not wan to touch it. I simply need to get everything after that automated so it takes the trade for me! I have always traded manually from the alert and just checked my weekly and a did the exit calculation manually (which I have to code as well) One I can not code at that level. I understand the math and fundamentals to cross differentials... plus the latency issue relative to the simple alert has been worked out and has great execution. I fear all that in source code would have some issues...but also I just can not code at that level yet...so for now. I have the automation built to grab the alert signal from the Id label and just doing the rest on the ACSIl side...simple stuff I did manually. thank you for the beta!! |
[2023-08-13 23:33:46] |
ForgivingComputers.com - Posts: 1021 |
OK, then I suggest you start with the source code for scsf_TradingSystemBasedOnAlertCondition and add the additional logic you need.
|
[2023-08-13 23:40:02] |
User373245 - Posts: 48 |
Perfectt thanks!! I have it executing the trade and about 60% of my criteria is coded and its all working good. I was saving my weekly as it was a little more complicated as well as the exits...as I use pivots to exit and depends on where the alert triggers relative to what pivot. So I need to create % equivalency relative to the pivot and a couple if >= statements relative to how much of the remainder and or next pivot to take. But I am initiating the buy and sell as should be! I will ad the weekly! thanks!
|
To post a message in this thread, you need to log in with your Sierra Chart account: