Gamestudio Links
Zorro Links
Newest Posts
Blind Zorro Window
by AndrewAMD. 09/11/26 15:30
Parent/child object
by 3run. 09/11/26 06:21
ZorroGPT
by TipmyPip. 09/09/26 14:35
[MED] Import from FBX (2010) missing!!!
by USER0328. 09/03/26 18:03
Purchase A8 full licence version
by ukgamer. 08/30/26 14:27
Retrieve optimize() variables order (edited)
by NorbertSz. 08/25/26 13:24
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/17/26 07:54
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (3run, TipmyPip, USER0328), 2,597 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
speedx, liop, Bauer097, riggi89, shuhari
19233 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
TradeIsEntry #487690
07/28/23 09:23
07/28/23 09:23
Joined: Jul 2023
Posts: 12
helsinki
M
Miska Offline OP
Newbie
Miska  Offline OP
Newbie
M

Joined: Jul 2023
Posts: 12
helsinki
Hello

I have started to code and trade with Zorro. Im just beginner and have only some codeing experience 13 years ago. Anyway, I have some problems with TradeIsEntry: PriseIsEntry dont regognice when the entry has done.

First solution, both are in run-function ():

//Entry, first

if((priceH(5)<priceH(4))....{
Entry=priceH(3);
Trade_price=priceH(3);
Counter1+=1;
}

// Examining if the first trade has been entered

if((TradeIsEntry) and (Counter1==1)){
Counter1+=1;
Trade_price=priceReal();

}

Second approch:

//Entry, first, in run function

if((priceH(5)<priceH(4))....{
enterLong(1,priceH(3),sl_10,0,0);
Trade_price=priceH(3);
Counter1+=1;
printf("Counter_BuyStop: %f\n",Counter1);
}

//Examine if trade is entried

int manage(){
if(TradeIsEntry) Counter1+=1;
return 0;
}

function run()
...

So how I can make the TradeIsEntry to work so I can determinate that stop limit has reached and trade is entried?

Thanks for your help

Miska

Re: TradeIsEntry [Re: Miska] #487693
07/28/23 17:11
07/28/23 17:11
Joined: Feb 2017
Posts: 1,831
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,831
Chicago
It is hard to interpret your code snippets out of context. Post the full code.

Re: TradeIsEntry [Re: Miska] #487695
07/30/23 14:06
07/30/23 14:06
Joined: Jul 2023
Posts: 12
helsinki
M
Miska Offline OP
Newbie
Miska  Offline OP
Newbie
M

Joined: Jul 2023
Posts: 12
helsinki
Ok, understand... its little a bit diffucult to put all to the code...

Is it possbile to give some short code example how the TradeIsEntry work? How I can detect that Entry=priceH(3) has been generated to actual trade? Or is the TradeIsEntry only possbile way or easiest?

Thanks

Re: TradeIsEntry [Re: Miska] #487698
08/02/23 09:38
08/02/23 09:38
Joined: Jul 2023
Posts: 12
helsinki
M
Miska Offline OP
Newbie
Miska  Offline OP
Newbie
M

Joined: Jul 2023
Posts: 12
helsinki
Can anybody give a example...

Re: TradeIsEntry [Re: Miska] #487699
08/02/23 13:41
08/02/23 13:41
Joined: Feb 2017
Posts: 1,831
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,831
Chicago
Did you even set up your TMF correctly? Are you pointing to it when you call enterLong/enterShort? If not, your code will not work.

These booleans will be set up whenever the TMF is called. Check them all and print stuff to the log to verify behavior:
TradeIsNewBar
TradeIsEntry
TradeIsStop
TradeIsProfit

At the bottom are some code samples showing a proper TMF setup:
https://zorro-project.com/manual/en/trade.htm

Re: TradeIsEntry [Re: AndrewAMD] #487701
08/03/23 09:28
08/03/23 09:28
Joined: Jul 2023
Posts: 12
helsinki
M
Miska Offline OP
Newbie
Miska  Offline OP
Newbie
M

Joined: Jul 2023
Posts: 12
helsinki
Ok, so when Im using TradeIsEntry all these trades or entries( stops) have to set up via tmf process. So I have to make these trades/entries before run-function in different TMF-prosedure(as it is in manual)? And after that I can check if TradeIsEntry. Ok, I ll try this. Thanks Andrew!

Re: TradeIsEntry [Re: AndrewAMD] #487722
08/10/23 10:32
08/10/23 10:32
Joined: Jul 2023
Posts: 12
helsinki
M
Miska Offline OP
Newbie
Miska  Offline OP
Newbie
M

Joined: Jul 2023
Posts: 12
helsinki
Thanks for help...algo is now working...


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1