Jump to content

We have moved to Discord. Please click here to join us in the Trading Terminal Discord server.



These forums are read-only.

Balazs Horvath

DAS hotkey script fo fixed entry amount with fixed stop loss

Recommended Posts

Balazs Horvath

Hi,

I am a newby and trying to write scripts in my DAS pro trial version (14-day trial). I went through the DAS video series on BBT site and downloaded a couple of the scripts available, but I haven’t found the one I was really looking for: fixed entry amount (like $10,000) at ask +0.05 with a fixed amont of stop-loss (like $100). I made a script with ChatGPT and tested it in the replay mode but it didn’t work properly. Chat GPT says it’s because the replay mode doesn’t support trigger orders.

Anyways, here is the script I tried:

Price=Ask+0.05;
DefShare=10000/Price;
Share=DefShare;
RiskPerShare=100/Share;
StopPrice=Price - RiskPerShare;
ROUTE=LIMIT;
TIF=DAY+;
BUY=Send;
TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice ACT:SELL QTY=Share TIF:DAY+ WAIT=Send

Can anyone help what is wrong with it? (Or there is no problem, just DAS replay mode doesn’t support trigger orders as Chat GPT said)

 

Thanks for your reply!

Share this post


Link to post
Share on other sites
peterB

the syntax is just wrong. you got chatgpt into hallucination mode which happens quite often - it gives you information made up which does not exist

for hotkeys go here

Share this post


Link to post
Share on other sites
Balazs Horvath

Thank you, Peter. Appreciated!

Share this post


Link to post
Share on other sites

[[Template core/front/global/mobileNavigation is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.