Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 781 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Altering a TRADE struct's entry price #486075
06/07/22 19:02
06/07/22 19:02
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Never worked with structs before, and neither with C for that matter, so I'm not sure how to proceed. I want to modify the entry price of a trade that is entered with enterLong() for instance. Is this possible?

I tried the following:

TRADE* T = enterLong();
T->fEntryPrice = myentry;

but the script crashes the first time these lines are executed.

I also realised that Fill=8 mode exists which is probably a better alternative for what I'm trying to do but I'm almost there with my current approach...

Re: Altering a TRADE struct's entry price [Re: MegaTanker] #486076
06/07/22 19:15
06/07/22 19:15
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
The script crashes of course when T is 0. You must always check that.

Re: Altering a TRADE struct's entry price [Re: MegaTanker] #486077
06/07/22 19:39
06/07/22 19:39
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Ah yes, always returns 0 during lookback crazy


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1