Suoritettu

Write Pine Script alert code equivalent for strategy.opentrades.

For [login to view URL], I need code that will do the same thing for use in Alerts.

[login to view URL] can be used to limit the amount of open buy orders and sell orders.

[login to view URL](id = "Buy", long = true, qty = 1, oca_name = "Group1", when = [login to view URL] >= 0 and [login to view URL] <= 1 and buycondition

A maximum of 2 Buy trades will remain open at any time.

Sell trades will need to close 1 Buy trade before another Buy trade can be executed.

Example:

B B B S S B

The first 2 Buys executed. The 3rd Buy ignored. The last 2 Sells closed 1 of the Buys (see [login to view URL] Sell settings below). Since one of the Buys has now been closed, the last Buy will be allowed to be executed. This continues forever.

Note: “Executed” means I get an alert to buy or sell. "Ignored" means I don't get an alert to buy or sell.

[login to view URL](id = "Sell", long = false, qty = 0.5, oca_name = "Group1", oca_type = [login to view URL], when = [login to view URL] >= 1 and [login to view URL] <=4 and sellcondition

A maximum of 4 Sell trades will execute.

Additional Sells will be ignored if there are no Buys.

Example:

B S B B S S S S S B S S S S S

The first 4 Sells closed the first 2 Buys. The 3rd Buy was ignored. The 5th and 6th Sells are ignored. The 4th Buy executes. The 7th and 8th Sell closed the 4th Buy. The 9th, 10th, and 11th Sells are ignored.

Taidot: Pine Script

Näytä lisää: write spider script, sqlserver write file script, write perl script send logs, write introduction script, script key code, write perl script match name, write mssql script, read write xml file vba code, write signup page php code, write medical script, unix shell script alert log file, write java script code odd numbers, write vba script outlook 2007, script redirect code, write file script linux, php joke script free code

Tietoa työnantajasta:
( 0 arvostelua ) EVANSVILLE, United States

Projektin tunnus: #20437725

Myönnetty käyttäjälle:

forexmts

Hi, I'm a software developer with focus on metatrader platform. I've got many years experience both in trading and coding. Programming languages - MQL4/5, AFL, PineScript.

$100 USD 7 päivässä
(2 Arvostelua)
2.9